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 
11 #include <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  // Contains all allocation commands for the memory object.
208  std::vector<AllocaCommandBase *> MAllocaCommands;
209 
210  // Contains latest read only commands working with memory object.
212 
213  // Contains latest write commands working with memory object.
215 
216  // The context which has the latest state of the memory object.
218 
219  // The mode this object can be accessed from the host (host_accessor).
220  // Valid only if the current usage is on host.
222 
223  // The flag indicates that the content of the memory object was/will be
224  // modified. Used while deciding if copy back needed.
225  bool MMemModified = false;
226 };
227 
262 //
263 // +----------+ +----------+ +----------+
264 // | | | | | |
265 // | Allocate |<----| Execute |<----| Execute |
266 // | | | | | |
267 // +----------+ +----------+ +----------+
268 //
296 // +----------+
297 // | |
298 // | D |
299 // | |
300 // +----------+
301 // / \
302 // / \
303 // v v
304 // +----------+ +----------+
305 // | | | |
306 // | B | | C |
307 // | | | |
308 // +----------+ +----------+
309 // \ /
310 // \ /
311 // v v
312 // +----------+
313 // | |
314 // | A |
315 // | |
316 // +----------+
366 class Scheduler {
367 public:
381  addCG(std::unique_ptr<detail::CG> CommandGroup, const QueueImplPtr &Queue,
382  bool EventNeeded,
383  sycl::detail::pi::PiExtCommandBuffer CommandBuffer = nullptr,
384  const std::vector<sycl::detail::pi::PiExtSyncPoint> &Dependencies = {});
385 
393 
404 
405  void waitForEvent(const EventImplPtr &Event, bool *Success = nullptr);
406 
429  bool removeMemoryObject(detail::SYCLMemObjI *MemObj, bool StrictLock = true);
430 
442 
447  void releaseHostAccessor(Requirement *Req);
448 
450  static Scheduler &getInstance();
452  static bool isInstanceAlive();
453 
454  static MemObjRecord *getMemObjRecord(const Requirement *const Req);
455 
456  void deferMemObjRelease(const std::shared_ptr<detail::SYCLMemObjI> &MemObj);
457 
458  void startFusion(QueueImplPtr Queue);
459 
460  void cleanUpCmdFusion(sycl::detail::queue_impl *Queue);
461 
462  void cancelFusion(QueueImplPtr Queue);
463 
465 
466  bool isInFusionMode(QueueIdT Queue);
467 
470 
471  void enqueueCommandForCG(EventImplPtr NewEvent,
472  std::vector<Command *> &AuxilaryCmds,
473  BlockingT Blocking = NON_BLOCKING);
474 
484  std::vector<std::shared_ptr<ext::oneapi::experimental::detail::node_impl>>
485  Nodes,
486  const QueueImplPtr &Queue, std::vector<Requirement *> Requirements,
487  std::vector<detail::EventImplPtr> &Events);
488 
489  static bool
490  areEventsSafeForSchedulerBypass(const std::vector<sycl::event> &DepEvents,
491  ContextImplPtr Context);
492  static bool
493  areEventsSafeForSchedulerBypass(const std::vector<EventImplPtr> &DepEvents,
494  ContextImplPtr Context);
495 
496 protected:
497  using RWLockT = std::shared_timed_mutex;
498  using ReadLockT = std::shared_lock<RWLockT>;
499  using WriteLockT = std::unique_lock<RWLockT>;
500 
504 #ifdef _WIN32
505  WriteLockT Lock(MGraphLock, std::defer_lock);
506  while (!Lock.try_lock_for(std::chrono::milliseconds(10))) {
507  // Without yield while loop acts like endless while loop and occupies the
508  // whole CPU when multiple command groups are created in multiple host
509  // threads
510  std::this_thread::yield();
511  }
512 #else
513  WriteLockT Lock(MGraphLock);
514  // It is a deadlock on UNIX in implementation of lock and lock_shared, if
515  // try_lock in the loop above will be executed, so using a single lock here
516 #endif // _WIN32
517  return Lock;
518  }
519 
523 #ifdef _WIN32
524  WriteLockT Lock(MFusionMapLock, std::defer_lock);
525  while (!Lock.try_lock_for(std::chrono::milliseconds(10))) {
526  // Without yield while loop acts like endless while loop and occupies the
527  // whole CPU when multiple command groups are created in multiple host
528  // threads
529  std::this_thread::yield();
530  }
531 #else
533  // It is a deadlock on UNIX in implementation of lock and lock_shared, if
534  // try_lock in the loop above will be executed, so using a single lock here
535 #endif // _WIN32
536  return Lock;
537  }
538 
542 
546 
547  void cleanupCommands(const std::vector<Command *> &Cmds);
548 
550 
551  static void enqueueLeavesOfReqUnlocked(const Requirement *const Req,
552  ReadLockT &GraphReadLock,
553  std::vector<Command *> &ToCleanUp);
554 
555  static void
556  enqueueUnblockedCommands(const std::vector<EventImplPtr> &CmdsToEnqueue,
557  ReadLockT &GraphReadLock,
558  std::vector<Command *> &ToCleanUp);
559 
560  // May lock graph with read and write modes during execution.
561  void cleanupDeferredMemObjects(BlockingT Blocking);
562 
563  // POD struct to convey some additional information from GraphBuilder::addCG
564  // to the Scheduler to support kernel fusion.
569  };
570 
572  void takeAuxiliaryResources(const EventImplPtr &Dst, const EventImplPtr &Src);
574  EventImplPtr &Event, std::vector<std::shared_ptr<const void>> Resources);
575  void cleanupAuxiliaryResources(BlockingT Blocking);
576 
583  class GraphBuilder {
584  public:
585  GraphBuilder();
586 
599  std::unique_ptr<detail::CG> CommandGroup, const QueueImplPtr &Queue,
600  std::vector<Command *> &ToEnqueue, bool EventNeeded,
601  sycl::detail::pi::PiExtCommandBuffer CommandBuffer = nullptr,
602  const std::vector<sycl::detail::pi::PiExtSyncPoint> &Dependencies = {});
603 
608  Command *addCGUpdateHost(std::unique_ptr<detail::CG> CommandGroup,
609  std::vector<Command *> &ToEnqueue);
610 
614  Command *addCopyBack(Requirement *Req, std::vector<Command *> &ToEnqueue);
615 
620  std::vector<Command *> &ToEnqueue);
621 
623  void optimize();
624 
627  void optimize(const EventImplPtr &Event);
628 
629  void cleanupCommand(Command *Cmd, bool AllowUnsubmitted = false);
630 
637  void rescheduleCommand(Command *Cmd, const QueueImplPtr &Queue);
638 
642 
646  const Requirement *Req);
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  Command::BlockReason Reason,
746  std::vector<Command *> &ToEnqueue);
747 
748  void createGraphForCommand(Command *NewCmd, CG &CG, bool isInteropTask,
749  std::vector<Requirement *> &Reqs,
750  const std::vector<detail::EventImplPtr> &Events,
751  QueueImplPtr Queue,
752  std::vector<Command *> &ToEnqueue);
753 
754  protected:
757 
760  const Requirement *Req,
761  const ContextImplPtr &Context,
762  bool AllowConst = true);
763 
764  friend class Command;
765 
766  private:
767  friend class ::MockScheduler;
768 
773  getOrCreateAllocaForReq(MemObjRecord *Record, const Requirement *Req,
774  const QueueImplPtr &Queue,
775  std::vector<Command *> &ToEnqueue);
776 
777  void markModifiedIfWrite(MemObjRecord *Record, Requirement *Req);
778 
779  FusionMap::iterator findFusionList(QueueIdT Id) {
780  return MFusionMap.find(Id);
781  }
782 
783  void removeNodeFromGraph(Command *Node, std::vector<Command *> &ToEnqueue);
784 
787  std::queue<Command *> MCmdsToVisit;
789  std::vector<Command *> MVisitedCmds;
790 
793  FusionMap MFusionMap;
794 
799  void printGraphAsDot(const char *ModeName);
800  enum PrintOptions {
801  BeforeAddCG = 0,
802  AfterAddCG,
803  BeforeAddCopyBack,
804  AfterAddCopyBack,
805  BeforeAddHostAcc,
806  AfterAddHostAcc,
807  AfterFusionComplete,
808  AfterFusionCancel,
809  Size
810  };
811  std::array<bool, PrintOptions::Size> MPrintOptionsArray{false};
812  };
813 
887  public:
899  static void waitForEvent(const EventImplPtr &Event,
900  ReadLockT &GraphReadLock,
901  std::vector<Command *> &ToCleanUp,
902  bool LockTheLock = true, bool *Success = nullptr);
903 
913  static bool enqueueCommand(Command *Cmd, ReadLockT &GraphReadLock,
914  EnqueueResultT &EnqueueResult,
915  std::vector<Command *> &ToCleanUp,
916  Command *RootCommand,
917  BlockingT Blocking = NON_BLOCKING);
918 
931  static bool handleBlockingCmd(Command *Cmd, EnqueueResultT &EnqueueResult,
932  Command *RootCommand, BlockingT Blocking);
933  };
934 
943  void waitForRecordToFinish(MemObjRecord *Record, ReadLockT &GraphReadLock);
944  bool checkLeavesCompletion(MemObjRecord *Record);
945 
949 
950  std::vector<Command *> MDeferredCleanupCommands;
952 
953  std::vector<std::shared_ptr<SYCLMemObjI>> MDeferredMemObjRelease;
955 
956  std::unordered_map<EventImplPtr, std::vector<std::shared_ptr<const void>>>
959 
960  friend class Command;
961  friend class DispatchHostTask;
962  friend class queue_impl;
963  friend class event_impl;
964  friend class ::MockScheduler;
965 
966 private:
967  static void printFusionWarning(const std::string &Message);
968 
969  static KernelFusionCommand *isPartOfActiveFusion(Command *Cmd);
970 };
971 
972 } // namespace detail
973 } // namespace _V1
974 } // namespace sycl
Base class for memory allocation commands.
Definition: commands.hpp:453
Base class for all types of command groups.
Definition: cg.hpp:161
The Command class represents some action that needs to be performed on one or more memory objects.
Definition: commands.hpp:106
The empty command does nothing during enqueue.
Definition: commands.hpp:411
The KernelFusionCommand is placed in the execution graph together with the individual kernels of the ...
Definition: commands.hpp:725
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)
MemObjRecord * getOrInsertMemObjRecord(const QueueImplPtr &Queue, const Requirement *Req)
Command * addCGUpdateHost(std::unique_ptr< detail::CG > CommandGroup, std::vector< Command * > &ToEnqueue)
Registers a command group that updates host memory to the latest state.
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.
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.
GraphBuildResult addCG(std::unique_ptr< detail::CG > CommandGroup, const QueueImplPtr &Queue, std::vector< Command * > &ToEnqueue, bool EventNeeded, 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 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:886
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:366
void waitForEvent(const EventImplPtr &Event, bool *Success=nullptr)
Waits for the event.
Definition: scheduler.cpp:252
ReadLockT acquireFusionReadLock()
Provides shared access to std::shared_timed_mutex object with deadlock avoidance to the Fusion map.
Definition: scheduler.hpp:545
EventImplPtr addCopyBack(Requirement *Req)
Registers a command group, that copies most recent memory to the memory pointed by the requirement.
Definition: scheduler.cpp:204
static void enqueueUnblockedCommands(const std::vector< EventImplPtr > &CmdsToEnqueue, ReadLockT &GraphReadLock, std::vector< Command * > &ToCleanUp)
Definition: scheduler.cpp:364
ReadLockT acquireReadLock()
Provides shared access to std::shared_timed_mutex object with deadlock avoidance.
Definition: scheduler.hpp:541
EventImplPtr addCG(std::unique_ptr< detail::CG > CommandGroup, const QueueImplPtr &Queue, bool EventNeeded, 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
EventImplPtr addHostAccessor(Requirement *Req)
Adds nodes to the graph, that update the requirement with the pointer to the host memory.
Definition: scheduler.cpp:290
std::unordered_map< EventImplPtr, std::vector< std::shared_ptr< const void > > > MAuxiliaryResources
Definition: scheduler.hpp:957
void registerAuxiliaryResources(EventImplPtr &Event, std::vector< std::shared_ptr< const void >> Resources)
Definition: scheduler.cpp:561
void cleanupAuxiliaryResources(BlockingT Blocking)
Definition: scheduler.cpp:568
std::unique_lock< RWLockT > WriteLockT
Definition: scheduler.hpp:499
EventImplPtr completeFusion(QueueImplPtr Queue, const property_list &)
Definition: scheduler.cpp:606
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:649
std::shared_timed_mutex RWLockT
Definition: scheduler.hpp:497
void cleanupDeferredMemObjects(BlockingT Blocking)
Definition: scheduler.cpp:489
static void enqueueLeavesOfReqUnlocked(const Requirement *const Req, ReadLockT &GraphReadLock, std::vector< Command * > &ToCleanUp)
Definition: scheduler.cpp:345
void enqueueCommandForCG(EventImplPtr NewEvent, std::vector< Command * > &AuxilaryCmds, BlockingT Blocking=NON_BLOCKING)
Definition: scheduler.cpp:147
bool isInFusionMode(QueueIdT Queue)
Definition: scheduler.cpp:620
void cancelFusion(QueueImplPtr Queue)
Definition: scheduler.cpp:596
std::shared_lock< RWLockT > ReadLockT
Definition: scheduler.hpp:498
std::vector< std::shared_ptr< SYCLMemObjI > > MDeferredMemObjRelease
Definition: scheduler.hpp:953
void startFusion(QueueImplPtr Queue)
Definition: scheduler.cpp:583
bool checkLeavesCompletion(MemObjRecord *Record)
Definition: scheduler.cpp:29
static MemObjRecord * getMemObjRecord(const Requirement *const Req)
Definition: scheduler.cpp:399
void releaseHostAccessor(Requirement *Req)
Unblocks operations with the memory object.
Definition: scheduler.cpp:329
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:244
void cleanUpCmdFusion(sycl::detail::queue_impl *Queue)
Definition: scheduler.cpp:589
void takeAuxiliaryResources(const EventImplPtr &Dst, const EventImplPtr &Src)
Assign Src's auxiliary resources to Dst.
Definition: scheduler.cpp:549
void cleanupCommands(const std::vector< Command * > &Cmds)
Definition: scheduler.cpp:403
void NotifyHostTaskCompletion(Command *Cmd)
Definition: scheduler.cpp:443
WriteLockT acquireWriteLock()
Provides exclusive access to std::shared_timed_mutex object with deadlock avoidance.
Definition: scheduler.hpp:503
bool removeMemoryObject(detail::SYCLMemObjI *MemObj, bool StrictLock=true)
Removes buffer from the graph.
Definition: scheduler.cpp:262
WriteLockT acquireFusionWriteLock()
Provides exclusive access to std::shared_timed_mutex object with deadlock avoidance to the Fusion map...
Definition: scheduler.hpp:522
std::vector< Command * > MDeferredCleanupCommands
Definition: scheduler.hpp:950
void deferMemObjRelease(const std::shared_ptr< detail::SYCLMemObjI > &MemObj)
Definition: scheduler.cpp:476
void releaseResources(BlockingT Blocking=BlockingT::BLOCKING)
Definition: scheduler.cpp:380
static bool areEventsSafeForSchedulerBypass(const std::vector< sycl::event > &DepEvents, ContextImplPtr Context)
Definition: scheduler.cpp:715
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:110
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:49
std::shared_ptr< event_impl > EventImplPtr
Definition: handler.hpp:184
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 AccessMode
Definition: access.hpp:18
Dependency between two commands.
Definition: commands.hpp:80
Result of command enqueueing.
Definition: commands.hpp:61
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:208