DPC++ Runtime
Runtime libraries for oneAPI DPC++
scheduler.hpp
Go to the documentation of this file.
1 //==-------------- scheduler.hpp - SYCL standard header file ---------------==//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #pragma once
10 
14 #include <sycl/detail/cg.hpp>
15 
16 #include <cstddef>
17 #include <memory>
18 #include <queue>
19 #include <set>
20 #include <shared_mutex>
21 #include <unordered_map>
22 #include <unordered_set>
23 #include <vector>
24 
170 
171 // For testing purposes
172 class MockScheduler;
173 
174 namespace sycl {
175 inline namespace _V1 {
176 namespace ext::oneapi::experimental::detail {
177 class exec_graph_impl;
178 class node_impl;
179 } // namespace ext::oneapi::experimental::detail
180 namespace detail {
181 class queue_impl;
182 class event_impl;
183 class context_impl;
184 class DispatchHostTask;
185 
186 using ContextImplPtr = std::shared_ptr<detail::context_impl>;
187 using EventImplPtr = std::shared_ptr<detail::event_impl>;
188 using QueueImplPtr = std::shared_ptr<detail::queue_impl>;
189 using StreamImplPtr = std::shared_ptr<detail::stream_impl>;
190 
191 using QueueIdT = std::hash<std::shared_ptr<detail::queue_impl>>::result_type;
192 using CommandPtr = std::unique_ptr<Command>;
193 using FusionList = std::unique_ptr<KernelFusionCommand>;
194 using FusionMap = std::unordered_map<QueueIdT, FusionList>;
195 
202 struct MemObjRecord {
203  MemObjRecord(ContextImplPtr Ctx, std::size_t LeafLimit,
204  LeavesCollection::AllocateDependencyF AllocateDependency)
205  : MReadLeaves{this, LeafLimit, AllocateDependency},
206  MWriteLeaves{this, LeafLimit, AllocateDependency}, MCurContext{Ctx} {}
207 
208  // Contains all allocation commands for the memory object.
209  std::vector<AllocaCommandBase *> MAllocaCommands;
210 
211  // Contains latest read only commands working with memory object.
213 
214  // Contains latest write commands working with memory object.
216 
217  // The context which has the latest state of the memory object.
219 
220  // The mode this object can be accessed with from the host context.
221  // Valid only if the current context is host.
223 
224  // The flag indicates that the content of the memory object was/will be
225  // modified. Used while deciding if copy back needed.
226  bool MMemModified = false;
227 };
228 
263 //
264 // +----------+ +----------+ +----------+
265 // | | | | | |
266 // | Allocate |<----| Execute |<----| Execute |
267 // | | | | | |
268 // +----------+ +----------+ +----------+
269 //
297 // +----------+
298 // | |
299 // | D |
300 // | |
301 // +----------+
302 // / \
303 // / \
304 // v v
305 // +----------+ +----------+
306 // | | | |
307 // | B | | C |
308 // | | | |
309 // +----------+ +----------+
310 // \ /
311 // \ /
312 // v v
313 // +----------+
314 // | |
315 // | A |
316 // | |
317 // +----------+
367 class Scheduler {
368 public:
381  addCG(std::unique_ptr<detail::CG> CommandGroup, const QueueImplPtr &Queue,
382  sycl::detail::pi::PiExtCommandBuffer CommandBuffer = nullptr,
383  const std::vector<sycl::detail::pi::PiExtSyncPoint> &Dependencies = {});
384 
392 
403 
404  void waitForEvent(const EventImplPtr &Event, bool *Success = nullptr);
405 
428  bool removeMemoryObject(detail::SYCLMemObjI *MemObj, bool StrictLock = true);
429 
441 
446  void releaseHostAccessor(Requirement *Req);
447 
449  static Scheduler &getInstance();
451  static bool isInstanceAlive();
452 
454 
456 
457  static MemObjRecord *getMemObjRecord(const Requirement *const Req);
458 
459  void deferMemObjRelease(const std::shared_ptr<detail::SYCLMemObjI> &MemObj);
460 
461  void startFusion(QueueImplPtr Queue);
462 
463  void cleanUpCmdFusion(sycl::detail::queue_impl *Queue);
464 
465  void cancelFusion(QueueImplPtr Queue);
466 
468 
469  bool isInFusionMode(QueueIdT Queue);
470 
471  Scheduler();
472  ~Scheduler();
475 
476  void enqueueCommandForCG(EventImplPtr NewEvent,
477  std::vector<Command *> &AuxilaryCmds,
478  BlockingT Blocking = NON_BLOCKING);
479 
489  std::vector<std::shared_ptr<ext::oneapi::experimental::detail::node_impl>>
490  Nodes,
491  const QueueImplPtr &Queue, std::vector<Requirement *> Requirements,
492  std::vector<detail::EventImplPtr> &Events);
493 
494 protected:
495  using RWLockT = std::shared_timed_mutex;
496  using ReadLockT = std::shared_lock<RWLockT>;
497  using WriteLockT = std::unique_lock<RWLockT>;
498 
502 #ifdef _WIN32
503  WriteLockT Lock(MGraphLock, std::defer_lock);
504  while (!Lock.try_lock_for(std::chrono::milliseconds(10))) {
505  // Without yield while loop acts like endless while loop and occupies the
506  // whole CPU when multiple command groups are created in multiple host
507  // threads
508  std::this_thread::yield();
509  }
510 #else
511  WriteLockT Lock(MGraphLock);
512  // It is a deadlock on UNIX in implementation of lock and lock_shared, if
513  // try_lock in the loop above will be executed, so using a single lock here
514 #endif // _WIN32
515  return Lock;
516  }
517 
521 #ifdef _WIN32
522  WriteLockT Lock(MFusionMapLock, std::defer_lock);
523  while (!Lock.try_lock_for(std::chrono::milliseconds(10))) {
524  // Without yield while loop acts like endless while loop and occupies the
525  // whole CPU when multiple command groups are created in multiple host
526  // threads
527  std::this_thread::yield();
528  }
529 #else
531  // It is a deadlock on UNIX in implementation of lock and lock_shared, if
532  // try_lock in the loop above will be executed, so using a single lock here
533 #endif // _WIN32
534  return Lock;
535  }
536 
540 
544 
545  void cleanupCommands(const std::vector<Command *> &Cmds);
546 
548 
549  static void enqueueLeavesOfReqUnlocked(const Requirement *const Req,
550  ReadLockT &GraphReadLock,
551  std::vector<Command *> &ToCleanUp);
552 
553  static void
554  enqueueUnblockedCommands(const std::vector<EventImplPtr> &CmdsToEnqueue,
555  ReadLockT &GraphReadLock,
556  std::vector<Command *> &ToCleanUp);
557 
558  // May lock graph with read and write modes during execution.
559  void cleanupDeferredMemObjects(BlockingT Blocking);
560 
561  // POD struct to convey some additional information from GraphBuilder::addCG
562  // to the Scheduler to support kernel fusion.
567  };
568 
570  void takeAuxiliaryResources(const EventImplPtr &Dst, const EventImplPtr &Src);
572  EventImplPtr &Event, std::vector<std::shared_ptr<const void>> Resources);
573  void cleanupAuxiliaryResources(BlockingT Blocking);
574 
581  class GraphBuilder {
582  public:
583  GraphBuilder();
584 
597  std::unique_ptr<detail::CG> CommandGroup, const QueueImplPtr &Queue,
598  std::vector<Command *> &ToEnqueue,
599  sycl::detail::pi::PiExtCommandBuffer CommandBuffer = nullptr,
600  const std::vector<sycl::detail::pi::PiExtSyncPoint> &Dependencies = {});
601 
606  Command *addCGUpdateHost(std::unique_ptr<detail::CG> CommandGroup,
607  const QueueImplPtr &HostQueue,
608  std::vector<Command *> &ToEnqueue);
609 
613  Command *addCopyBack(Requirement *Req, std::vector<Command *> &ToEnqueue);
614 
619  std::vector<Command *> &ToEnqueue);
620 
622  void optimize();
623 
626  void optimize(const EventImplPtr &Event);
627 
628  void cleanupCommand(Command *Cmd, bool AllowUnsubmitted = false);
629 
636  void rescheduleCommand(Command *Cmd, const QueueImplPtr &Queue);
637 
641 
645  const Requirement *Req,
646  std::vector<Command *> &ToEnqueue);
647 
650 
653 
655  void removeRecordForMemObj(SYCLMemObjI *MemObject);
656 
658  void addNodeToLeaves(MemObjRecord *Record, Command *Cmd,
660  std::vector<Command *> &ToEnqueue);
661 
663  void updateLeaves(const std::set<Command *> &Cmds, MemObjRecord *Record,
665  std::vector<Command *> &ToCleanUp);
666 
676  Command *connectDepEvent(Command *const Cmd, const EventImplPtr &DepEvent,
677  const DepDesc &Dep,
678  std::vector<Command *> &ToCleanUp);
679 
680  void startFusion(QueueImplPtr Queue);
681 
684  void cleanUpCmdFusion(sycl::detail::queue_impl *Queue);
685 
686  void cancelFusion(QueueImplPtr Queue, std::vector<Command *> &ToEnqueue);
687 
689  std::vector<Command *> &ToEnqueue,
690  const property_list &);
691 
693 
704  std::vector<
705  std::shared_ptr<ext::oneapi::experimental::detail::node_impl>>
706  Nodes,
707  const QueueImplPtr &Queue, std::vector<Requirement *> Requirements,
708  std::vector<detail::EventImplPtr> &Events,
709  std::vector<Command *> &ToEnqueue);
710 
711  std::vector<SYCLMemObjI *> MMemObjs;
712 
713  private:
723  Command *insertMemoryMove(MemObjRecord *Record, Requirement *Req,
724  const QueueImplPtr &Queue,
725  std::vector<Command *> &ToEnqueue);
726 
727  // Inserts commands required to remap the memory object to its current host
728  // context so that the required access mode becomes valid.
729  Command *remapMemoryObject(MemObjRecord *Record, Requirement *Req,
730  AllocaCommandBase *HostAllocaCmd,
731  std::vector<Command *> &ToEnqueue);
732 
734  insertUpdateHostReqCmd(MemObjRecord *Record, Requirement *Req,
735  const QueueImplPtr &Queue,
736  std::vector<Command *> &ToEnqueue);
737 
739  std::set<Command *> findDepsForReq(MemObjRecord *Record,
740  const Requirement *Req,
741  const ContextImplPtr &Context);
742 
743  EmptyCommand *addEmptyCmd(Command *Cmd,
744  const std::vector<Requirement *> &Req,
745  const QueueImplPtr &Queue,
746  Command::BlockReason Reason,
747  std::vector<Command *> &ToEnqueue,
748  const bool AddDepsToLeaves = true);
749 
750  void createGraphForCommand(Command *NewCmd, CG &CG, bool isInteropTask,
751  std::vector<Requirement *> &Reqs,
752  const std::vector<detail::EventImplPtr> &Events,
753  QueueImplPtr Queue,
754  std::vector<Command *> &ToEnqueue);
755 
756  protected:
759 
762  const Requirement *Req,
763  const ContextImplPtr &Context,
764  bool AllowConst = true);
765 
766  friend class Command;
767 
768  private:
769  friend class ::MockScheduler;
770 
775  getOrCreateAllocaForReq(MemObjRecord *Record, const Requirement *Req,
776  const QueueImplPtr &Queue,
777  std::vector<Command *> &ToEnqueue);
778 
779  void markModifiedIfWrite(MemObjRecord *Record, Requirement *Req);
780 
781  FusionMap::iterator findFusionList(QueueIdT Id) {
782  return MFusionMap.find(Id);
783  }
784 
785  void removeNodeFromGraph(Command *Node, std::vector<Command *> &ToEnqueue);
786 
789  std::queue<Command *> MCmdsToVisit;
791  std::vector<Command *> MVisitedCmds;
792 
795  FusionMap MFusionMap;
796 
801  void printGraphAsDot(const char *ModeName);
802  enum PrintOptions {
803  BeforeAddCG = 0,
804  AfterAddCG,
805  BeforeAddCopyBack,
806  AfterAddCopyBack,
807  BeforeAddHostAcc,
808  AfterAddHostAcc,
809  AfterFusionComplete,
810  AfterFusionCancel,
811  Size
812  };
813  std::array<bool, PrintOptions::Size> MPrintOptionsArray{false};
814  };
815 
889  public:
901  static void waitForEvent(const EventImplPtr &Event,
902  ReadLockT &GraphReadLock,
903  std::vector<Command *> &ToCleanUp,
904  bool LockTheLock = true, bool *Success = nullptr);
905 
915  static bool enqueueCommand(Command *Cmd, ReadLockT &GraphReadLock,
916  EnqueueResultT &EnqueueResult,
917  std::vector<Command *> &ToCleanUp,
918  Command *RootCommand,
919  BlockingT Blocking = NON_BLOCKING);
920 
933  static bool handleBlockingCmd(Command *Cmd, EnqueueResultT &EnqueueResult,
934  Command *RootCommand, BlockingT Blocking);
935  };
936 
945  void waitForRecordToFinish(MemObjRecord *Record, ReadLockT &GraphReadLock);
946  bool checkLeavesCompletion(MemObjRecord *Record);
947 
951 
952  std::vector<Command *> MDeferredCleanupCommands;
954 
955  std::vector<std::shared_ptr<SYCLMemObjI>> MDeferredMemObjRelease;
957 
958  std::unordered_map<EventImplPtr, std::vector<std::shared_ptr<const void>>>
961 
963 
964  friend class Command;
965  friend class DispatchHostTask;
966  friend class queue_impl;
967  friend class event_impl;
968  friend class ::MockScheduler;
969 
970 private:
971  static void printFusionWarning(const std::string &Message);
972 
973  static KernelFusionCommand *isPartOfActiveFusion(Command *Cmd);
974 };
975 
976 } // namespace detail
977 } // namespace _V1
978 } // namespace sycl
Base class for memory allocation commands.
Definition: commands.hpp:458
Base class for all types of command groups.
Definition: cg.hpp:53
The Command class represents some action that needs to be performed on one or more memory objects.
Definition: commands.hpp:107
The empty command does nothing during enqueue.
Definition: commands.hpp:416
The KernelFusionCommand is placed in the execution graph together with the individual kernels of the ...
Definition: commands.hpp:724
A wrapper for CircularBuffer class along with collection for host accessor's EmptyCommands.
std::function< void(Command *, Command *, MemObjRecord *, EnqueueListT &)> AllocateDependencyF
void optimize(const EventImplPtr &Event)
[Provisional] Optimizes subgraph that consists of command associated with Event passed and its depend...
Command * addCommandGraphUpdate(ext::oneapi::experimental::detail::exec_graph_impl *Graph, std::vector< std::shared_ptr< ext::oneapi::experimental::detail::node_impl >> Nodes, const QueueImplPtr &Queue, std::vector< Requirement * > Requirements, std::vector< detail::EventImplPtr > &Events, std::vector< Command * > &ToEnqueue)
Adds a command buffer update operation to the execution graph.
void cleanupCommand(Command *Cmd, bool AllowUnsubmitted=false)
std::vector< SYCLMemObjI * > MMemObjs
Definition: scheduler.hpp:711
void decrementLeafCountersForRecord(MemObjRecord *Record)
Decrements leaf counters for all leaves of the record.
void optimize()
[Provisional] Optimizes the whole graph.
MemObjRecord * getMemObjRecord(SYCLMemObjI *MemObject)
EventImplPtr completeFusion(QueueImplPtr Queue, std::vector< Command * > &ToEnqueue, const property_list &)
Command * addHostAccessor(Requirement *Req, std::vector< Command * > &ToEnqueue)
Enqueues a command to create a host accessor.
void cleanupCommandsForRecord(MemObjRecord *Record)
Removes commands that use the given MemObjRecord from the graph.
GraphBuildResult addCG(std::unique_ptr< detail::CG > CommandGroup, const QueueImplPtr &Queue, std::vector< Command * > &ToEnqueue, sycl::detail::pi::PiExtCommandBuffer CommandBuffer=nullptr, const std::vector< sycl::detail::pi::PiExtSyncPoint > &Dependencies={})
Registers command group and adds it to the dependency graph.
void removeRecordForMemObj(SYCLMemObjI *MemObject)
Removes the MemObjRecord for the memory object passed.
Command * addCopyBack(Requirement *Req, std::vector< Command * > &ToEnqueue)
Enqueues a command to update memory to the latest state.
Command * connectDepEvent(Command *const Cmd, const EventImplPtr &DepEvent, const DepDesc &Dep, std::vector< Command * > &ToCleanUp)
Perform connection of events in multiple contexts.
Command * addCGUpdateHost(std::unique_ptr< detail::CG > CommandGroup, const QueueImplPtr &HostQueue, std::vector< Command * > &ToEnqueue)
Registers a command group that updates host memory to the latest state.
MemObjRecord * getOrInsertMemObjRecord(const QueueImplPtr &Queue, const Requirement *Req, std::vector< Command * > &ToEnqueue)
void cancelFusion(QueueImplPtr Queue, std::vector< Command * > &ToEnqueue)
void addNodeToLeaves(MemObjRecord *Record, Command *Cmd, access::mode AccessMode, std::vector< Command * > &ToEnqueue)
Adds new command to leaves if needed.
void rescheduleCommand(Command *Cmd, const QueueImplPtr &Queue)
Reschedules the command passed using Queue provided.
void cleanUpCmdFusion(sycl::detail::queue_impl *Queue)
Clean up the internal fusion commands held for the given queue.
AllocaCommandBase * findAllocaForReq(MemObjRecord *Record, const Requirement *Req, const ContextImplPtr &Context, bool AllowConst=true)
Searches for suitable alloca in memory record.
DepDesc findDepForRecord(Command *Cmd, MemObjRecord *Record)
Finds a command dependency corresponding to the record.
void updateLeaves(const std::set< Command * > &Cmds, MemObjRecord *Record, access::mode AccessMode, std::vector< Command * > &ToCleanUp)
Removes commands from leaves.
Graph Processor provides interfaces for enqueueing commands and their dependencies to the underlying ...
Definition: scheduler.hpp:888
static void waitForEvent(const EventImplPtr &Event, ReadLockT &GraphReadLock, std::vector< Command * > &ToCleanUp, bool LockTheLock=true, bool *Success=nullptr)
Waits for the command, associated with Event passed, is completed.
static bool enqueueCommand(Command *Cmd, ReadLockT &GraphReadLock, EnqueueResultT &EnqueueResult, std::vector< Command * > &ToCleanUp, Command *RootCommand, BlockingT Blocking=NON_BLOCKING)
Enqueues the command and all its dependencies.
static bool handleBlockingCmd(Command *Cmd, EnqueueResultT &EnqueueResult, Command *RootCommand, BlockingT Blocking)
Check if successfully enqueued command is expected to be blocking for the dependent commands before i...
DPC++ graph scheduler class.
Definition: scheduler.hpp:367
void waitForEvent(const EventImplPtr &Event, bool *Success=nullptr)
Waits for the event.
Definition: scheduler.cpp:269
ReadLockT acquireFusionReadLock()
Provides shared access to std::shared_timed_mutex object with deadlock avoidance to the Fusion map.
Definition: scheduler.hpp:543
EventImplPtr addCopyBack(Requirement *Req)
Registers a command group, that copies most recent memory to the memory pointed by the requirement.
Definition: scheduler.cpp:223
static void enqueueUnblockedCommands(const std::vector< EventImplPtr > &CmdsToEnqueue, ReadLockT &GraphReadLock, std::vector< Command * > &ToCleanUp)
Definition: scheduler.cpp:381
ReadLockT acquireReadLock()
Provides shared access to std::shared_timed_mutex object with deadlock avoidance.
Definition: scheduler.hpp:539
EventImplPtr addHostAccessor(Requirement *Req)
Adds nodes to the graph, that update the requirement with the pointer to the host memory.
Definition: scheduler.cpp:307
std::unordered_map< EventImplPtr, std::vector< std::shared_ptr< const void > > > MAuxiliaryResources
Definition: scheduler.hpp:959
void registerAuxiliaryResources(EventImplPtr &Event, std::vector< std::shared_ptr< const void >> Resources)
Definition: scheduler.cpp:586
void cleanupAuxiliaryResources(BlockingT Blocking)
Definition: scheduler.cpp:593
std::unique_lock< RWLockT > WriteLockT
Definition: scheduler.hpp:497
EventImplPtr completeFusion(QueueImplPtr Queue, const property_list &)
Definition: scheduler.cpp:631
EventImplPtr addCommandGraphUpdate(ext::oneapi::experimental::detail::exec_graph_impl *Graph, std::vector< std::shared_ptr< ext::oneapi::experimental::detail::node_impl >> Nodes, const QueueImplPtr &Queue, std::vector< Requirement * > Requirements, std::vector< detail::EventImplPtr > &Events)
Adds a command buffer update operation to the execution graph.
Definition: scheduler.cpp:674
QueueImplPtr getDefaultHostQueue()
Definition: scheduler.hpp:453
std::shared_timed_mutex RWLockT
Definition: scheduler.hpp:495
void cleanupDeferredMemObjects(BlockingT Blocking)
Definition: scheduler.cpp:514
static void enqueueLeavesOfReqUnlocked(const Requirement *const Req, ReadLockT &GraphReadLock, std::vector< Command * > &ToCleanUp)
Definition: scheduler.cpp:362
void enqueueCommandForCG(EventImplPtr NewEvent, std::vector< Command * > &AuxilaryCmds, BlockingT Blocking=NON_BLOCKING)
Definition: scheduler.cpp:166
bool isInFusionMode(QueueIdT Queue)
Definition: scheduler.cpp:645
void cancelFusion(QueueImplPtr Queue)
Definition: scheduler.cpp:621
std::shared_lock< RWLockT > ReadLockT
Definition: scheduler.hpp:496
std::vector< std::shared_ptr< SYCLMemObjI > > MDeferredMemObjRelease
Definition: scheduler.hpp:955
void startFusion(QueueImplPtr Queue)
Definition: scheduler.cpp:608
bool checkLeavesCompletion(MemObjRecord *Record)
Definition: scheduler.cpp:29
static MemObjRecord * getMemObjRecord(const Requirement *const Req)
Definition: scheduler.cpp:428
void releaseHostAccessor(Requirement *Req)
Unblocks operations with the memory object.
Definition: scheduler.cpp:346
void waitForRecordToFinish(MemObjRecord *Record, ReadLockT &GraphReadLock)
This function waits on all of the graph leaves which somehow use the memory object which is represent...
Definition: scheduler.cpp:45
static Scheduler & getInstance()
Definition: scheduler.cpp:261
void cleanUpCmdFusion(sycl::detail::queue_impl *Queue)
Definition: scheduler.cpp:614
EventImplPtr addCG(std::unique_ptr< detail::CG > CommandGroup, const QueueImplPtr &Queue, sycl::detail::pi::PiExtCommandBuffer CommandBuffer=nullptr, const std::vector< sycl::detail::pi::PiExtSyncPoint > &Dependencies={})
Registers a command group, and adds it to the dependency graph.
Definition: scheduler.cpp:95
void takeAuxiliaryResources(const EventImplPtr &Dst, const EventImplPtr &Src)
Assign Src's auxiliary resources to Dst.
Definition: scheduler.cpp:574
void cleanupCommands(const std::vector< Command * > &Cmds)
Definition: scheduler.cpp:432
const QueueImplPtr & getDefaultHostQueue() const
Definition: scheduler.hpp:455
void NotifyHostTaskCompletion(Command *Cmd)
Definition: scheduler.cpp:472
WriteLockT acquireWriteLock()
Provides exclusive access to std::shared_timed_mutex object with deadlock avoidance.
Definition: scheduler.hpp:501
bool removeMemoryObject(detail::SYCLMemObjI *MemObj, bool StrictLock=true)
Removes buffer from the graph.
Definition: scheduler.cpp:279
WriteLockT acquireFusionWriteLock()
Provides exclusive access to std::shared_timed_mutex object with deadlock avoidance to the Fusion map...
Definition: scheduler.hpp:520
std::vector< Command * > MDeferredCleanupCommands
Definition: scheduler.hpp:952
void deferMemObjRelease(const std::shared_ptr< detail::SYCLMemObjI > &MemObj)
Definition: scheduler.cpp:501
void releaseResources(BlockingT Blocking=BlockingT::BLOCKING)
Definition: scheduler.cpp:409
Class representing the implementation of command_graph<executable>.
Objects of the property_list class are containers for the SYCL properties.
Encapsulates a single SYCL queue which schedules kernels on a SYCL device.
Definition: queue.hpp:119
std::unordered_map< QueueIdT, FusionList > FusionMap
Definition: scheduler.hpp:194
std::hash< std::shared_ptr< detail::queue_impl > >::result_type QueueIdT
Definition: scheduler.hpp:191
std::shared_ptr< sycl::detail::context_impl > ContextImplPtr
Definition: event_impl.hpp:32
std::unique_ptr< KernelFusionCommand > FusionList
Definition: scheduler.hpp:193
std::shared_ptr< detail::stream_impl > StreamImplPtr
Definition: commands.hpp:50
std::shared_ptr< event_impl > EventImplPtr
Definition: cg.hpp:43
std::string string
Definition: handler.hpp:426
std::shared_ptr< sycl::detail::queue_impl > QueueImplPtr
Definition: event_impl.hpp:34
std::unique_ptr< Command > CommandPtr
Definition: scheduler.hpp:192
class __SYCL_EBO __SYCL_SPECIAL_CLASS __SYCL_TYPE(local_accessor) local_accessor class __SYCL_EBO __SYCL_SPECIAL_CLASS AccessMode
Definition: accessor.hpp:3233
Definition: access.hpp:18
Dependency between two commands.
Definition: commands.hpp:81
Result of command enqueueing.
Definition: commands.hpp:62
Memory Object Record.
Definition: scheduler.hpp:202
MemObjRecord(ContextImplPtr Ctx, std::size_t LeafLimit, LeavesCollection::AllocateDependencyF AllocateDependency)
Definition: scheduler.hpp:203
std::vector< AllocaCommandBase * > MAllocaCommands
Definition: scheduler.hpp:209