The Command class represents some action that needs to be performed on one or more memory objects. More...
#include <detail/scheduler/commands.hpp>
Classes | |
struct | Marks |
Public Types | |
enum | CommandType { RUN_CG, COPY_MEMORY, ALLOCA, ALLOCA_SUB_BUF, RELEASE, MAP_MEM_OBJ, UNMAP_MEM_OBJ, UPDATE_REQUIREMENT, EMPTY_TASK, HOST_TASK } |
enum | BlockReason : int { BlockReason::HostAccessor = 0, BlockReason::HostTask } |
Public Member Functions | |
Command (CommandType Type, QueueImplPtr Queue) | |
It is safe to bind MPreparedDepsEvents and MPreparedHostDepsEvents references to event_impl class members because Command should not outlive the event connected to it. More... | |
Command * | addDep (DepDesc NewDep, std::vector< Command * > &ToCleanUp) |
Command * | addDep (EventImplPtr Event, std::vector< Command * > &ToCleanUp) |
void | addUser (Command *NewUser) |
CommandType | getType () const |
virtual bool | enqueue (EnqueueResultT &EnqueueResult, BlockingT Blocking, std::vector< Command * > &ToCleanUp) |
Checks if the command is enqueued, and calls enqueueImp. More... | |
bool | isFinished () |
bool | isSuccessfullyEnqueued () const |
bool | isEnqueueBlocked () const |
const QueueImplPtr & | getQueue () const |
const QueueImplPtr & | getSubmittedQueue () const |
const EventImplPtr & | getEvent () const |
void | emitInstrumentationDataProxy () |
Proxy method which calls emitInstrumentationData. More... | |
virtual void | emitInstrumentationData ()=0 |
Instrumentation method which emits telemetry data. More... | |
void | resolveReleaseDependencies (std::set< Command * > &list) |
Looks at all the dependencies for the release command and enables instrumentation to report these dependencies as edges. More... | |
void | emitEdgeEventForCommandDependence (Command *Cmd, void *ObjAddr, bool IsCommand, std::optional< access::mode > AccMode=std::nullopt) |
Creates an edge event when the dependency is a command. More... | |
void | emitEdgeEventForEventDependence (Command *Cmd, RT::PiEvent &EventAddr) |
Creates an edge event when the dependency is an event. More... | |
void | emitEnqueuedEventSignal (RT::PiEvent &PiEventAddr) |
Creates a signal event with the enqueued kernel event handle. More... | |
uint64_t | makeTraceEventProlog (void *MAddress) |
Create a trace event of node_create type; this must be guarded by a check for xptiTraceEnabled(). More... | |
void | makeTraceEventEpilog () |
If prolog has been run, run epilog; this must be guarded by a check for xptiTraceEnabled(). More... | |
void | emitInstrumentation (uint16_t Type, const char *Txt=nullptr) |
Emits an event of Type. More... | |
virtual void | printDot (std::ostream &Stream) const =0 |
virtual const Requirement * | getRequirement () const |
virtual | ~Command () |
const char * | getBlockReason () const |
virtual const ContextImplPtr & | getWorkerContext () const |
Get the context of the queue this command will be submitted to. More... | |
virtual const QueueImplPtr & | getWorkerQueue () const |
Get the queue this command will be submitted to. More... | |
virtual bool | producesPiEvent () const |
Returns true iff the command produces a PI event on non-host devices. More... | |
virtual bool | supportsPostEnqueueCleanup () const |
Returns true iff this command can be freed by post enqueue cleanup. More... | |
const std::vector< EventImplPtr > & | getPreparedHostDepsEvents () const |
Public Attributes | |
std::vector< DepDesc > | MDeps |
Contains list of dependencies(edges) More... | |
std::unordered_set< Command * > | MUsers |
Contains list of commands that depend on the command. More... | |
bool | MIsBlockable = false |
Indicates whether the command can be blocked from enqueueing. More... | |
unsigned | MLeafCounter = 0 |
Counts the number of memory objects this command is a leaf for. More... | |
Marks | MMarks |
Used for marking the node during graph traversal. More... | |
BlockReason | MBlockReason |
std::atomic< EnqueueResultT::ResultT > | MEnqueueStatus |
Describes the status of the command. More... | |
void * | MTraceEvent = nullptr |
The event for node_create and task_begin. More... | |
int32_t | MStreamID = -1 |
The stream under which the traces are emitted. More... | |
void * | MAddress = nullptr |
Reserved for storing the object address such as SPIR-V or memory object address. More... | |
std::string | MAddressString |
Buffer to build the address string. More... | |
std::string | MCommandNodeType |
Buffer to build the command node type. More... | |
std::string | MCommandName |
Buffer to build the command end-user understandable name. More... | |
bool | MTraceEventPrologComplete = false |
Flag to indicate if makeTraceEventProlog() has been run. More... | |
bool | MFirstInstance = false |
Flag to indicate if this is the first time we are seeing this payload. More... | |
uint64_t | MInstanceID = 0 |
Instance ID tracked for the command. More... | |
bool | MShouldCompleteEventIfPossible = true |
bool | MPostEnqueueCleanup = false |
Indicates that the node will be freed by cleanup after enqueue. More... | |
Protected Member Functions | |
void | waitForEvents (QueueImplPtr Queue, std::vector< EventImplPtr > &RawEvents, RT::PiEvent &Event) |
void | waitForPreparedHostEvents () const |
Command * | processDepEvent (EventImplPtr DepEvent, const DepDesc &Dep, std::vector< Command * > &ToCleanUp) |
Perform glueing of events from different contexts. More... | |
virtual pi_int32 | enqueueImp ()=0 |
Private interface. Derived classes should implement this method. More... | |
Protected Attributes | |
QueueImplPtr | MQueue |
QueueImplPtr | MSubmittedQueue |
EventImplPtr | MEvent |
std::vector< EventImplPtr > & | MPreparedDepsEvents |
Dependency events prepared for waiting by backend. More... | |
std::vector< EventImplPtr > & | MPreparedHostDepsEvents |
CommandType | MType |
The type of the command. More... | |
std::mutex | MEnqueueMtx |
Mutex used to protect enqueueing from race conditions. More... | |
Friends | |
class | DispatchHostTask |
The Command class represents some action that needs to be performed on one or more memory objects.
The Command has a vector of DepDesc objects that represent dependencies of the command. It has a vector of pointers to commands that depend on the command. It has a pointer to a queue object and an event that is associated with the command.
Definition at line 95 of file commands.hpp.
|
strong |
Enumerator | |
---|---|
HostAccessor | |
HostTask |
Definition at line 273 of file commands.hpp.
Enumerator | |
---|---|
RUN_CG | |
COPY_MEMORY | |
ALLOCA | |
ALLOCA_SUB_BUF | |
RELEASE | |
MAP_MEM_OBJ | |
UNMAP_MEM_OBJ | |
UPDATE_REQUIREMENT | |
EMPTY_TASK | |
HOST_TASK |
Definition at line 97 of file commands.hpp.
cl::sycl::detail::Command::Command | ( | CommandType | Type, |
QueueImplPtr | Queue | ||
) |
It is safe to bind MPreparedDepsEvents and MPreparedHostDepsEvents references to event_impl class members because Command should not outlive the event connected to it.
Definition at line 393 of file commands.cpp.
References MEnqueueStatus, MEvent, MQueue, MStreamID, MSubmittedQueue, cl::sycl::detail::SYCL_STREAM_NAME, and cl::sycl::detail::EnqueueResultT::SyclEnqueueReady.
|
inlinevirtual |
Definition at line 192 of file commands.hpp.
Command * cl::sycl::detail::Command::addDep | ( | DepDesc | NewDep, |
std::vector< Command * > & | ToCleanUp | ||
) |
NewDep | dependency to be added |
ToCleanUp | container for commands that can be cleaned up. |
Definition at line 632 of file commands.cpp.
References addUser(), emitEdgeEventForCommandDependence(), getEvent(), cl::sycl::detail::AccessorImplHost::MAccessMode, cl::sycl::detail::DepDesc::MDepCommand, cl::sycl::detail::DepDesc::MDepRequirement, MDeps, cl::sycl::detail::AccessorImplHost::MSYCLMemObj, and processDepEvent().
Referenced by cl::sycl::detail::Scheduler::GraphBuilder::addCG(), cl::sycl::detail::Scheduler::GraphBuilder::addCopyBack(), cl::sycl::detail::EmptyCommand::addRequirement(), cl::sycl::detail::AllocaCommand::AllocaCommand(), cl::sycl::detail::AllocaSubBufCommand::AllocaSubBufCommand(), cl::sycl::detail::Scheduler::GraphBuilder::connectDepEvent(), and cl::sycl::detail::Scheduler::GraphBuilder::getOrInsertMemObjRecord().
Command * cl::sycl::detail::Command::addDep | ( | EventImplPtr | Event, |
std::vector< Command * > & | ToCleanUp | ||
) |
NewDep | dependency to be added |
ToCleanUp | container for commands that can be cleaned up. |
Definition at line 657 of file commands.cpp.
References emitEdgeEventForEventDependence(), and processDepEvent().
|
inline |
Definition at line 124 of file commands.hpp.
Referenced by addDep(), and cl::sycl::detail::Scheduler::GraphBuilder::connectDepEvent().
void cl::sycl::detail::Command::emitEdgeEventForCommandDependence | ( | Command * | Cmd, |
void * | ObjAddr, | ||
bool | IsCommand, | ||
std::optional< access::mode > | AccMode = std::nullopt |
||
) |
Creates an edge event when the dependency is a command.
Method takes in void * for the address as adding a template function to the command group object maybe undesirable.
Cmd | The command object of the source of the edge |
ObjAddr | The address that defines the edge dependency; it is the event address when the edge is for an event and a memory object address if it is due to an accessor |
Prefix | Contains "event" if the dependency is an edge and contains the access mode to the buffer if it is due to an accessor |
IsCommand | True if the dependency has a command object as the source, false otherwise |
Definition at line 429 of file commands.cpp.
References cl::sycl::detail::accessModeToString(), MAddress, MStreamID, and MTraceEvent.
Referenced by addDep(), and emitEdgeEventForEventDependence().
void cl::sycl::detail::Command::emitEdgeEventForEventDependence | ( | Command * | Cmd, |
RT::PiEvent & | PiEventAddr | ||
) |
Creates an edge event when the dependency is an event.
Creates an edge when the dependency is due to an event.
Cmd | The command object of the source of the edge |
PiEventAddr | The address that defines the edge dependency, which in this case is an event |
Definition at line 478 of file commands.cpp.
References emitEdgeEventForCommandDependence(), MAddress, MStreamID, and MTraceEvent.
Referenced by addDep().
void cl::sycl::detail::Command::emitEnqueuedEventSignal | ( | RT::PiEvent & | PiEventAddr | ) |
Creates a signal event with the enqueued kernel event handle.
Definition at line 672 of file commands.cpp.
References MInstanceID, MStreamID, and MTraceEvent.
Referenced by enqueue().
void cl::sycl::detail::Command::emitInstrumentation | ( | uint16_t | Type, |
const char * | Txt = nullptr |
||
) |
Emits an event of Type.
Definition at line 684 of file commands.cpp.
References MInstanceID, MStreamID, and MTraceEvent.
Referenced by enqueue().
|
pure virtual |
Instrumentation method which emits telemetry data.
Implemented in cl::sycl::detail::UnMapMemObject, cl::sycl::detail::MapMemObject, cl::sycl::detail::AllocaSubBufCommand, cl::sycl::detail::AllocaCommand, cl::sycl::detail::AllocaCommandBase, cl::sycl::detail::ReleaseCommand, cl::sycl::detail::EmptyCommand, cl::sycl::detail::UpdateHostRequirementCommand, cl::sycl::detail::ExecCGCommand, cl::sycl::detail::MemCpyCommandHost, and cl::sycl::detail::MemCpyCommand.
Referenced by emitInstrumentationDataProxy().
void cl::sycl::detail::Command::emitInstrumentationDataProxy | ( | ) |
Proxy method which calls emitInstrumentationData.
Definition at line 413 of file commands.cpp.
References emitInstrumentationData().
Referenced by cl::sycl::detail::AllocaCommand::AllocaCommand(), cl::sycl::detail::AllocaCommandBase::AllocaCommandBase(), cl::sycl::detail::AllocaSubBufCommand::AllocaSubBufCommand(), cl::sycl::detail::EmptyCommand::EmptyCommand(), cl::sycl::detail::ExecCGCommand::ExecCGCommand(), cl::sycl::detail::MapMemObject::MapMemObject(), cl::sycl::detail::MemCpyCommand::MemCpyCommand(), cl::sycl::detail::MemCpyCommandHost::MemCpyCommandHost(), cl::sycl::detail::ReleaseCommand::ReleaseCommand(), cl::sycl::detail::UnMapMemObject::UnMapMemObject(), and cl::sycl::detail::UpdateHostRequirementCommand::UpdateHostRequirementCommand().
|
virtual |
Checks if the command is enqueued, and calls enqueueImp.
EnqueueResult | is set to the specific status if enqueue failed. |
Blocking | if this argument is true, function will wait for the command to be unblocked before calling enqueueImp. |
ToCleanUp | container for commands that can be cleaned up. |
Definition at line 695 of file commands.cpp.
References emitEnqueuedEventSignal(), emitInstrumentation(), enqueueImp(), getBlockReason(), MEnqueueMtx, MEnqueueStatus, MEvent, MIsBlockable, MLeafCounter, MPostEnqueueCleanup, MShouldCompleteEventIfPossible, supportsPostEnqueueCleanup(), cl::sycl::detail::EnqueueResultT::SyclEnqueueBlocked, cl::sycl::detail::EnqueueResultT::SyclEnqueueFailed, and cl::sycl::detail::EnqueueResultT::SyclEnqueueSuccess.
Referenced by cl::sycl::detail::Scheduler::GraphProcessor::enqueueCommand().
|
protectedpure virtual |
Private interface. Derived classes should implement this method.
Referenced by enqueue().
const char * cl::sycl::detail::Command::getBlockReason | ( | ) | const |
Definition at line 823 of file commands.cpp.
References HostAccessor, HostTask, and MBlockReason.
Referenced by enqueue().
|
inline |
Definition at line 153 of file commands.hpp.
Referenced by cl::sycl::detail::Scheduler::addCG(), cl::sycl::detail::Scheduler::addCopyBack(), addDep(), cl::sycl::detail::Scheduler::addHostAccessor(), cl::sycl::detail::Scheduler::GraphBuilder::cleanupCommand(), cl::sycl::detail::Scheduler::GraphBuilder::connectDepEvent(), cl::sycl::detail::Scheduler::GraphProcessor::waitForEvent(), and cl::sycl::detail::Scheduler::waitForRecordToFinish().
|
inline |
Definition at line 251 of file commands.hpp.
Referenced by cl::sycl::detail::Scheduler::GraphProcessor::enqueueCommand().
|
inline |
Definition at line 149 of file commands.hpp.
Referenced by cl::sycl::detail::Scheduler::addCopyBack(), cl::sycl::detail::Scheduler::GraphBuilder::addCopyBack(), cl::sycl::detail::Scheduler::GraphBuilder::addHostAccessor(), cl::sycl::detail::Scheduler::GraphBuilder::findAllocaForReq(), and cl::sycl::detail::insertMapUnmapForLinkedCmds().
|
inlinevirtual |
Reimplemented in cl::sycl::detail::UpdateHostRequirementCommand, cl::sycl::detail::MemCpyCommandHost, cl::sycl::detail::MemCpyCommand, cl::sycl::detail::UnMapMemObject, cl::sycl::detail::MapMemObject, cl::sycl::detail::AllocaCommandBase, and cl::sycl::detail::EmptyCommand.
Definition at line 187 of file commands.hpp.
|
inline |
Definition at line 151 of file commands.hpp.
Referenced by cl::sycl::detail::event_impl::wait_and_throw().
|
inline |
Definition at line 127 of file commands.hpp.
Referenced by cl::sycl::detail::Scheduler::GraphBuilder::addCG(), cl::sycl::detail::Scheduler::GraphBuilder::cleanupCommand(), cl::sycl::detail::Scheduler::GraphBuilder::cleanupCommandsForRecord(), cl::sycl::detail::Scheduler::GraphBuilder::cleanupFinishedCommands(), cl::sycl::detail::ReleaseCommand::emitInstrumentationData(), cl::sycl::detail::Scheduler::GraphBuilder::findAllocaForReq(), cl::sycl::detail::isHostAccessorCmd(), and processDepEvent().
|
virtual |
Get the context of the queue this command will be submitted to.
Could differ from the context of MQueue for memory copy commands.
Reimplemented in cl::sycl::detail::MemCpyCommandHost, and cl::sycl::detail::MemCpyCommand.
Definition at line 619 of file commands.cpp.
References MQueue.
Referenced by cl::sycl::detail::Scheduler::GraphBuilder::connectDepEvent().
|
virtual |
Get the queue this command will be submitted to.
Could differ from MQueue for memory copy commands.
Reimplemented in cl::sycl::detail::MemCpyCommandHost, and cl::sycl::detail::MemCpyCommand.
Definition at line 623 of file commands.cpp.
References MQueue.
Referenced by processDepEvent().
|
inline |
Definition at line 145 of file commands.hpp.
Referenced by cl::sycl::detail::Scheduler::GraphProcessor::enqueueCommand().
bool cl::sycl::detail::Command::isFinished | ( | ) |
|
inline |
Definition at line 141 of file commands.hpp.
Referenced by cl::sycl::detail::Scheduler::GraphBuilder::cleanupCommand(), cl::sycl::detail::Scheduler::GraphBuilder::decrementLeafCountersForRecord(), and cl::sycl::detail::Scheduler::GraphProcessor::enqueueCommand().
void cl::sycl::detail::Command::makeTraceEventEpilog | ( | ) |
If prolog has been run, run epilog; this must be guarded by a check for xptiTraceEnabled().
Definition at line 567 of file commands.cpp.
References MCommandNodeType, MInstanceID, MStreamID, MTraceEvent, and MTraceEventPrologComplete.
Referenced by cl::sycl::detail::EmptyCommand::emitInstrumentationData(), cl::sycl::detail::ReleaseCommand::emitInstrumentationData(), cl::sycl::detail::AllocaCommand::emitInstrumentationData(), cl::sycl::detail::AllocaSubBufCommand::emitInstrumentationData(), cl::sycl::detail::MapMemObject::emitInstrumentationData(), cl::sycl::detail::UnMapMemObject::emitInstrumentationData(), cl::sycl::detail::MemCpyCommand::emitInstrumentationData(), cl::sycl::detail::MemCpyCommandHost::emitInstrumentationData(), and cl::sycl::detail::UpdateHostRequirementCommand::emitInstrumentationData().
uint64_t cl::sycl::detail::Command::makeTraceEventProlog | ( | void * | MAddress | ) |
Create a trace event of node_create type; this must be guarded by a check for xptiTraceEnabled().
Post Condition: MTraceEvent will be set to the event created.
MAddress | The address to use to create the payload. |
Definition at line 535 of file commands.cpp.
References MAddress, MAddressString, MCommandName, MCommandNodeType, MFirstInstance, MInstanceID, MTraceEvent, MTraceEventPrologComplete, and MType.
Referenced by cl::sycl::detail::EmptyCommand::emitInstrumentationData(), cl::sycl::detail::ReleaseCommand::emitInstrumentationData(), cl::sycl::detail::AllocaCommandBase::emitInstrumentationData(), cl::sycl::detail::MapMemObject::emitInstrumentationData(), cl::sycl::detail::UnMapMemObject::emitInstrumentationData(), cl::sycl::detail::MemCpyCommand::emitInstrumentationData(), cl::sycl::detail::MemCpyCommandHost::emitInstrumentationData(), and cl::sycl::detail::UpdateHostRequirementCommand::emitInstrumentationData().
|
pure virtual |
Implemented in cl::sycl::detail::UpdateHostRequirementCommand, cl::sycl::detail::ExecCGCommand, cl::sycl::detail::MemCpyCommandHost, cl::sycl::detail::MemCpyCommand, cl::sycl::detail::UnMapMemObject, cl::sycl::detail::MapMemObject, cl::sycl::detail::AllocaSubBufCommand, cl::sycl::detail::AllocaCommand, cl::sycl::detail::ReleaseCommand, and cl::sycl::detail::EmptyCommand.
Referenced by cl::sycl::detail::printDotRecursive().
|
protected |
Perform glueing of events from different contexts.
DepEvent | event this commands should depend on |
Dep | optional DepDesc to perform connection of events properly |
ToCleanUp | container for commands that can be cleaned up. |
Glueing (i.e. connecting) will be performed if and only if DepEvent is not from host context and its context doesn't match to context of this command. Context of this command is fetched via getWorkerContext().
Optionality of Dep is set by Dep.MDepCommand not equal to nullptr.
Definition at line 579 of file commands.cpp.
References cl::sycl::detail::Scheduler::GraphBuilder::connectDepEvent(), cl::sycl::detail::Scheduler::getInstance(), getType(), getWorkerQueue(), cl::sycl::detail::DepDesc::MDepCommand, cl::sycl::detail::Scheduler::MGraphBuilder, MPreparedDepsEvents, and MPreparedHostDepsEvents.
Referenced by addDep().
|
virtual |
Returns true iff the command produces a PI event on non-host devices.
Reimplemented in cl::sycl::detail::ExecCGCommand, cl::sycl::detail::MemCpyCommand, cl::sycl::detail::UnMapMemObject, cl::sycl::detail::AllocaCommandBase, cl::sycl::detail::ReleaseCommand, and cl::sycl::detail::EmptyCommand.
Definition at line 625 of file commands.cpp.
void cl::sycl::detail::Command::resolveReleaseDependencies | ( | std::set< Command * > & | list | ) |
Looks at all the dependencies for the release command and enables instrumentation to report these dependencies as edges.
Definition at line 781 of file commands.cpp.
References MAddress, MStreamID, MTraceEvent, and MType.
Referenced by cl::sycl::detail::Scheduler::waitForRecordToFinish().
|
virtual |
Returns true iff this command can be freed by post enqueue cleanup.
Reimplemented in cl::sycl::detail::ExecCGCommand, cl::sycl::detail::AllocaCommandBase, and cl::sycl::detail::ReleaseCommand.
Definition at line 627 of file commands.cpp.
Referenced by cl::sycl::detail::Scheduler::GraphBuilder::decrementLeafCountersForRecord(), enqueue(), and cl::sycl::detail::ExecCGCommand::supportsPostEnqueueCleanup().
|
protected |
Definition at line 339 of file commands.cpp.
References cl::sycl::detail::plugin::call(), cl::sycl::detail::flushCrossQueueDeps(), _pi_event::get(), cl::sycl::detail::getPiEvents(), piEnqueueEventsWait(), and piEventsWait().
|
protected |
Definition at line 334 of file commands.cpp.
|
friend |
Definition at line 248 of file commands.hpp.
void* cl::sycl::detail::Command::MAddress = nullptr |
Reserved for storing the object address such as SPIR-V or memory object address.
Definition at line 294 of file commands.hpp.
Referenced by emitEdgeEventForCommandDependence(), emitEdgeEventForEventDependence(), cl::sycl::detail::EmptyCommand::emitInstrumentationData(), cl::sycl::detail::ReleaseCommand::emitInstrumentationData(), cl::sycl::detail::AllocaCommandBase::emitInstrumentationData(), cl::sycl::detail::MapMemObject::emitInstrumentationData(), cl::sycl::detail::UnMapMemObject::emitInstrumentationData(), cl::sycl::detail::MemCpyCommand::emitInstrumentationData(), cl::sycl::detail::MemCpyCommandHost::emitInstrumentationData(), cl::sycl::detail::ExecCGCommand::emitInstrumentationData(), cl::sycl::detail::UpdateHostRequirementCommand::emitInstrumentationData(), makeTraceEventProlog(), and resolveReleaseDependencies().
std::string cl::sycl::detail::Command::MAddressString |
Buffer to build the address string.
Definition at line 296 of file commands.hpp.
Referenced by makeTraceEventProlog().
BlockReason cl::sycl::detail::Command::MBlockReason |
Definition at line 276 of file commands.hpp.
Referenced by getBlockReason(), and cl::sycl::detail::isHostAccessorCmd().
std::string cl::sycl::detail::Command::MCommandName |
Buffer to build the command end-user understandable name.
Definition at line 300 of file commands.hpp.
Referenced by makeTraceEventProlog().
std::string cl::sycl::detail::Command::MCommandNodeType |
Buffer to build the command node type.
Definition at line 298 of file commands.hpp.
Referenced by makeTraceEventEpilog(), and makeTraceEventProlog().
std::vector<DepDesc> cl::sycl::detail::Command::MDeps |
Contains list of dependencies(edges)
Definition at line 256 of file commands.hpp.
Referenced by cl::sycl::detail::Scheduler::addCG(), cl::sycl::detail::Scheduler::GraphBuilder::addCG(), addDep(), cl::sycl::detail::Scheduler::GraphBuilder::cleanupCommand(), cl::sycl::detail::Scheduler::GraphBuilder::cleanupCommandsForRecord(), cl::sycl::detail::Scheduler::GraphBuilder::cleanupFinishedCommands(), cl::sycl::detail::Scheduler::GraphProcessor::enqueueCommand(), cl::sycl::detail::Scheduler::GraphBuilder::findDepForRecord(), cl::sycl::detail::DispatchHostTask::operator()(), cl::sycl::detail::EmptyCommand::printDot(), cl::sycl::detail::ReleaseCommand::printDot(), cl::sycl::detail::AllocaCommand::printDot(), cl::sycl::detail::AllocaSubBufCommand::printDot(), cl::sycl::detail::MapMemObject::printDot(), cl::sycl::detail::UnMapMemObject::printDot(), cl::sycl::detail::MemCpyCommand::printDot(), cl::sycl::detail::MemCpyCommandHost::printDot(), cl::sycl::detail::ExecCGCommand::printDot(), cl::sycl::detail::UpdateHostRequirementCommand::printDot(), and supportsPostEnqueueCleanup().
|
protected |
Mutex used to protect enqueueing from race conditions.
Definition at line 246 of file commands.hpp.
Referenced by enqueue().
std::atomic<EnqueueResultT::ResultT> cl::sycl::detail::Command::MEnqueueStatus |
Describes the status of the command.
Definition at line 279 of file commands.hpp.
Referenced by Command(), enqueue(), cl::sycl::detail::DispatchHostTask::operator()(), and cl::sycl::detail::Scheduler::releaseHostAccessor().
|
protected |
Definition at line 213 of file commands.hpp.
Referenced by Command(), enqueue(), cl::sycl::detail::ExecCGCommand::ExecCGCommand(), cl::sycl::detail::MemCpyCommand::MemCpyCommand(), cl::sycl::detail::MemCpyCommandHost::MemCpyCommandHost(), cl::sycl::detail::DispatchHostTask::operator()(), cl::sycl::detail::UnMapMemObject::producesPiEvent(), and cl::sycl::detail::MemCpyCommand::producesPiEvent().
bool cl::sycl::detail::Command::MFirstInstance = false |
Flag to indicate if this is the first time we are seeing this payload.
Definition at line 304 of file commands.hpp.
Referenced by cl::sycl::detail::EmptyCommand::emitInstrumentationData(), cl::sycl::detail::ReleaseCommand::emitInstrumentationData(), cl::sycl::detail::AllocaCommandBase::emitInstrumentationData(), cl::sycl::detail::AllocaCommand::emitInstrumentationData(), cl::sycl::detail::AllocaSubBufCommand::emitInstrumentationData(), cl::sycl::detail::MapMemObject::emitInstrumentationData(), cl::sycl::detail::UnMapMemObject::emitInstrumentationData(), cl::sycl::detail::MemCpyCommand::emitInstrumentationData(), cl::sycl::detail::MemCpyCommandHost::emitInstrumentationData(), cl::sycl::detail::UpdateHostRequirementCommand::emitInstrumentationData(), and makeTraceEventProlog().
uint64_t cl::sycl::detail::Command::MInstanceID = 0 |
Instance ID tracked for the command.
Definition at line 306 of file commands.hpp.
Referenced by emitEnqueuedEventSignal(), emitInstrumentation(), cl::sycl::detail::ExecCGCommand::emitInstrumentationData(), makeTraceEventEpilog(), and makeTraceEventProlog().
bool cl::sycl::detail::Command::MIsBlockable = false |
Indicates whether the command can be blocked from enqueueing.
Definition at line 260 of file commands.hpp.
Referenced by enqueue().
unsigned cl::sycl::detail::Command::MLeafCounter = 0 |
Counts the number of memory objects this command is a leaf for.
Definition at line 262 of file commands.hpp.
Referenced by cl::sycl::detail::Scheduler::GraphBuilder::addNodeToLeaves(), cl::sycl::detail::Scheduler::GraphBuilder::cleanupCommand(), cl::sycl::detail::Scheduler::GraphBuilder::cleanupFinishedCommands(), cl::sycl::detail::Scheduler::GraphBuilder::decrementLeafCountersForRecord(), and enqueue().
Marks cl::sycl::detail::Command::MMarks |
Used for marking the node during graph traversal.
Definition at line 271 of file commands.hpp.
Referenced by cl::sycl::detail::Scheduler::GraphBuilder::cleanupCommandsForRecord(), cl::sycl::detail::Scheduler::GraphBuilder::cleanupFinishedCommands(), and cl::sycl::detail::markNodeAsVisited().
bool cl::sycl::detail::Command::MPostEnqueueCleanup = false |
Indicates that the node will be freed by cleanup after enqueue.
Such nodes should be ignored by other cleanup mechanisms.
Definition at line 318 of file commands.hpp.
Referenced by cl::sycl::detail::Scheduler::GraphBuilder::cleanupFinishedCommands(), and enqueue().
|
protected |
Dependency events prepared for waiting by backend.
See processDepEvent for details.
Definition at line 217 of file commands.hpp.
Referenced by processDepEvent().
|
protected |
Definition at line 218 of file commands.hpp.
Referenced by processDepEvent().
|
protected |
Definition at line 211 of file commands.hpp.
Referenced by Command(), cl::sycl::detail::EmptyCommand::emitInstrumentationData(), cl::sycl::detail::ReleaseCommand::emitInstrumentationData(), cl::sycl::detail::AllocaCommandBase::emitInstrumentationData(), cl::sycl::detail::MapMemObject::emitInstrumentationData(), cl::sycl::detail::UnMapMemObject::emitInstrumentationData(), cl::sycl::detail::MemCpyCommand::emitInstrumentationData(), cl::sycl::detail::MemCpyCommandHost::emitInstrumentationData(), cl::sycl::detail::ExecCGCommand::emitInstrumentationData(), cl::sycl::detail::UpdateHostRequirementCommand::emitInstrumentationData(), cl::sycl::detail::ExecCGCommand::ExecCGCommand(), cl::sycl::detail::AllocaSubBufCommand::getMemAllocation(), getWorkerContext(), getWorkerQueue(), cl::sycl::detail::MemCpyCommand::getWorkerQueue(), cl::sycl::detail::MemCpyCommandHost::getWorkerQueue(), cl::sycl::detail::ReleaseCommand::printDot(), cl::sycl::detail::AllocaCommand::printDot(), cl::sycl::detail::AllocaSubBufCommand::printDot(), cl::sycl::detail::MapMemObject::printDot(), cl::sycl::detail::UnMapMemObject::printDot(), cl::sycl::detail::MemCpyCommand::printDot(), cl::sycl::detail::MemCpyCommandHost::printDot(), cl::sycl::detail::ExecCGCommand::printDot(), cl::sycl::detail::UpdateHostRequirementCommand::printDot(), cl::sycl::detail::UnMapMemObject::producesPiEvent(), and cl::sycl::detail::MemCpyCommand::producesPiEvent().
bool cl::sycl::detail::Command::MShouldCompleteEventIfPossible = true |
Definition at line 314 of file commands.hpp.
Referenced by enqueue().
int32_t cl::sycl::detail::Command::MStreamID = -1 |
The stream under which the traces are emitted.
Stream ids are positive integers and we set it to an invalid value.
Definition at line 291 of file commands.hpp.
Referenced by Command(), emitEdgeEventForCommandDependence(), emitEdgeEventForEventDependence(), emitEnqueuedEventSignal(), emitInstrumentation(), cl::sycl::detail::ExecCGCommand::emitInstrumentationData(), makeTraceEventEpilog(), and resolveReleaseDependencies().
|
protected |
Definition at line 212 of file commands.hpp.
Referenced by Command(), and cl::sycl::detail::ExecCGCommand::ExecCGCommand().
void* cl::sycl::detail::Command::MTraceEvent = nullptr |
The event for node_create and task_begin.
Definition at line 287 of file commands.hpp.
Referenced by emitEdgeEventForCommandDependence(), emitEdgeEventForEventDependence(), emitEnqueuedEventSignal(), emitInstrumentation(), cl::sycl::detail::EmptyCommand::emitInstrumentationData(), cl::sycl::detail::ReleaseCommand::emitInstrumentationData(), cl::sycl::detail::AllocaCommandBase::emitInstrumentationData(), cl::sycl::detail::AllocaSubBufCommand::emitInstrumentationData(), cl::sycl::detail::MapMemObject::emitInstrumentationData(), cl::sycl::detail::UnMapMemObject::emitInstrumentationData(), cl::sycl::detail::MemCpyCommand::emitInstrumentationData(), cl::sycl::detail::MemCpyCommandHost::emitInstrumentationData(), cl::sycl::detail::ExecCGCommand::emitInstrumentationData(), cl::sycl::detail::UpdateHostRequirementCommand::emitInstrumentationData(), makeTraceEventEpilog(), makeTraceEventProlog(), and resolveReleaseDependencies().
bool cl::sycl::detail::Command::MTraceEventPrologComplete = false |
Flag to indicate if makeTraceEventProlog() has been run.
Definition at line 302 of file commands.hpp.
Referenced by makeTraceEventEpilog(), and makeTraceEventProlog().
|
protected |
The type of the command.
Definition at line 244 of file commands.hpp.
Referenced by cl::sycl::detail::ExecCGCommand::emitInstrumentationData(), makeTraceEventProlog(), and resolveReleaseDependencies().
std::unordered_set<Command *> cl::sycl::detail::Command::MUsers |
Contains list of commands that depend on the command.
Definition at line 258 of file commands.hpp.
Referenced by cl::sycl::detail::Scheduler::addCG(), cl::sycl::detail::Scheduler::GraphBuilder::cleanupCommand(), cl::sycl::detail::Scheduler::GraphBuilder::cleanupCommandsForRecord(), cl::sycl::detail::Scheduler::GraphBuilder::cleanupFinishedCommands(), cl::sycl::detail::printDotRecursive(), and supportsPostEnqueueCleanup().