#include <detail/queue_impl.hpp>
Classes | |
struct | DependencyTrackingItems |
Public Types | |
using | SubmitPostProcessF = std::function< void(bool, bool, event &)> |
Public Member Functions | |
queue_impl (const DeviceImplPtr &Device, const async_handler &AsyncHandler, const property_list &PropList) | |
Constructs a SYCL queue from a device using an async_handler and property_list provided. More... | |
queue_impl (const DeviceImplPtr &Device, const ContextImplPtr &Context, const async_handler &AsyncHandler, const property_list &PropList) | |
Constructs a SYCL queue with an async_handler and property_list provided form a device and a context. More... | |
event | getLastEvent () |
queue_impl (ur_queue_handle_t UrQueue, const ContextImplPtr &Context, const async_handler &AsyncHandler) | |
Constructs a SYCL queue from plugin interoperability handle. More... | |
queue_impl (ur_queue_handle_t UrQueue, const ContextImplPtr &Context, const async_handler &AsyncHandler, const property_list &PropList) | |
Constructs a SYCL queue from plugin interoperability handle. More... | |
~queue_impl () | |
cl_command_queue | get () |
context | get_context () const |
const PluginPtr & | getPlugin () const |
const ContextImplPtr & | getContextImplPtr () const |
const DeviceImplPtr & | getDeviceImplPtr () const |
device | get_device () const |
bool | hasDiscardEventsProperty () const |
bool | supportsDiscardingPiEvents () const |
bool | isInOrder () const |
template<typename Param > | |
Param::return_type | get_info () const |
Queries SYCL queue for information. More... | |
template<typename Param > | |
Param::return_type | get_backend_info () const |
Queries SYCL queue for SYCL backend-specific information. More... | |
void | flush () |
Provides a hint to the backend to execute previously issued commands on this queue. More... | |
event | submit (const std::function< void(handler &)> &CGF, const std::shared_ptr< queue_impl > &Self, const std::shared_ptr< queue_impl > &SecondQueue, const detail::code_location &Loc, const SubmitPostProcessF *PostProcess=nullptr) |
Submits a command group function object to the queue, in order to be scheduled for execution on the device. More... | |
event | submit (const std::function< void(handler &)> &CGF, const std::shared_ptr< queue_impl > &Self, const detail::code_location &Loc, const SubmitPostProcessF *PostProcess=nullptr) |
Submits a command group function object to the queue, in order to be scheduled for execution on the device. More... | |
void | submit_without_event (const std::function< void(handler &)> &CGF, const std::shared_ptr< queue_impl > &Self, const detail::code_location &Loc, const SubmitPostProcessF *PostProcess=nullptr) |
void | wait (const detail::code_location &Loc={}) |
Performs a blocking wait for the completion of all enqueued tasks in the queue. More... | |
exception_list | getExceptionList () const |
void | wait_and_throw (const detail::code_location &Loc={}) |
void | throw_asynchronous () |
Performs a blocking wait for the completion of all enqueued tasks in the queue. More... | |
ur_queue_handle_t | createQueue (QueueOrder Order) |
Creates UR queue. More... | |
ur_queue_handle_t & | getExclusiveUrQueueHandleRef () |
ur_queue_handle_t & | getHandleRef () |
template<typename propertyT > | |
bool | has_property () const noexcept |
template<typename propertyT > | |
propertyT | get_property () const |
event | memset (const std::shared_ptr< queue_impl > &Self, void *Ptr, int Value, size_t Count, const std::vector< event > &DepEvents, bool CallerNeedsEvent) |
Fills the memory pointed by a USM pointer with the value specified. More... | |
event | memcpy (const std::shared_ptr< queue_impl > &Self, void *Dest, const void *Src, size_t Count, const std::vector< event > &DepEvents, bool CallerNeedsEvent, const code_location &CodeLoc) |
Copies data from one memory region to another, both pointed by USM pointers. More... | |
event | mem_advise (const std::shared_ptr< queue_impl > &Self, const void *Ptr, size_t Length, ur_usm_advice_flags_t Advice, const std::vector< event > &DepEvents, bool CallerNeedsEvent) |
Provides additional information to the underlying runtime about how different allocations are used. More... | |
void | reportAsyncException (const std::exception_ptr &ExceptionPtr) |
Puts exception to the list of asynchronous ecxeptions. More... | |
ur_native_handle_t | getNative (int32_t &NativeHandleDesc) const |
Gets the native handle of the SYCL queue. More... | |
void | registerStreamServiceEvent (const EventImplPtr &Event) |
bool | ext_oneapi_empty () const |
bool | is_in_fusion_mode () |
Check whether the queue is in fusion mode. More... | |
event | memcpyToDeviceGlobal (const std::shared_ptr< queue_impl > &Self, void *DeviceGlobalPtr, const void *Src, bool IsDeviceImageScope, size_t NumBytes, size_t Offset, const std::vector< event > &DepEvents, bool CallerNeedsEvent) |
event | memcpyFromDeviceGlobal (const std::shared_ptr< queue_impl > &Self, void *Dest, const void *DeviceGlobalPtr, bool IsDeviceImageScope, size_t NumBytes, size_t Offset, const std::vector< event > &DepEvents, bool CallerNeedsEvent) |
bool | isProfilingFallback () |
void | setCommandGraph (std::shared_ptr< ext::oneapi::experimental::detail::graph_impl > Graph) |
std::shared_ptr< ext::oneapi::experimental::detail::graph_impl > | getCommandGraph () const |
unsigned long long | getQueueID () |
void | setExternalEvent (const event &Event) |
std::optional< event > | popExternalEvent () |
const std::vector< event > & | getExtendDependencyList (const std::vector< event > &DepEvents, std::vector< event > &MutableVec, std::unique_lock< std::mutex > &QueueLock) |
void | tryToResetEnqueuedBarrierDep (const EventImplPtr &EnqueuedBarrierEvent) |
void | revisitUnenqueuedCommandsState (const EventImplPtr &CompletedHostTask) |
void | doUnenqueuedCommandCleanup (const std::shared_ptr< ext::oneapi::experimental::detail::graph_impl > &Graph) |
const property_list & | getPropList () const |
template<typename HandlerFuncT , typename MemOpFuncT , typename... MemOpArgTs> | |
event | submitMemOpHelper (const std::shared_ptr< queue_impl > &Self, const std::vector< event > &DepEvents, bool CallerNeedsEvent, HandlerFuncT HandlerFunc, MemOpFuncT MemOpFunc, MemOpArgTs... MemOpArgs) |
Static Public Member Functions | |
static ContextImplPtr | getDefaultOrNew (const DeviceImplPtr &Device) |
static ur_queue_flags_t | createUrQueueFlags (const property_list &PropList, QueueOrder Order) |
Creates UR properties array. More... | |
static ThreadPool & | getThreadPool () |
static ContextImplPtr | getContext (const QueueImplPtr &Queue) |
Public Attributes | |
const bool | MDiscardEvents |
const bool | MIsProfilingEnabled |
Protected Member Functions | |
event | discard_or_return (const event &Event) |
void | cleanup_fusion_cmd () |
template<typename HandlerType = handler> | |
EventImplPtr | insertHelperBarrier (const HandlerType &Handler) |
template<typename HandlerType = handler> | |
void | finalizeHandler (HandlerType &Handler, event &EventRet) |
event | submit_impl (const std::function< void(handler &)> &CGF, const std::shared_ptr< queue_impl > &Self, const std::shared_ptr< queue_impl > &PrimaryQueue, const std::shared_ptr< queue_impl > &SecondaryQueue, bool CallerNeedsEvent, const detail::code_location &Loc, const SubmitPostProcessF *PostProcess) |
Performs command group submission to the queue. More... | |
template<typename HandlerFuncT > | |
event | submitWithHandler (const std::shared_ptr< queue_impl > &Self, const std::vector< event > &DepEvents, HandlerFuncT HandlerFunc) |
Helper function for submitting a memory operation with a handler. More... | |
template<typename HandlerFuncT , typename MemMngrFuncT , typename... MemMngrArgTs> | |
event | submitMemOpHelper (const std::shared_ptr< queue_impl > &Self, const std::vector< event > &DepEvents, bool CallerNeedsEvent, HandlerFuncT HandlerFunc, MemMngrFuncT MemMngrFunc, MemMngrArgTs... MemOpArgs) |
Performs submission of a memory operation directly if scheduler can be bypassed, or with a handler otherwise. More... | |
void * | instrumentationProlog (const detail::code_location &CodeLoc, std::string &Name, int32_t StreamID, uint64_t &iid) |
void | instrumentationEpilog (void *TelementryEvent, std::string &Name, int32_t StreamID, uint64_t IId) |
void | addSharedEvent (const event &Event) |
queue_impl.addEvent tracks events with weak pointers but some events have no other owners. More... | |
void | addEvent (const event &Event) |
Stores an event that should be associated with the queue. More... | |
Protected Attributes | |
std::mutex | MMutex |
Protects all the fields that can be changed by class' methods. More... | |
DeviceImplPtr | MDevice |
const ContextImplPtr | MContext |
std::vector< std::weak_ptr< event_impl > > | MEventsWeak |
These events are tracked, but not owned, by the queue. More... | |
std::vector< event > | MEventsShared |
Events without data dependencies (such as USM) need an owner, additionally, USM operations are not added to the scheduler command graph, queue is the only owner on the runtime side. More... | |
exception_list | MExceptions |
const async_handler | MAsyncHandler |
const property_list | MPropList |
std::vector< ur_queue_handle_t > | MQueues |
List of queues created for FPGA device from a single SYCL queue. More... | |
size_t | MNextQueueIdx = 0 |
Iterator through MQueues. More... | |
bool | MEmulateOOO = false |
Indicates that a native out-of-order queue could not be created and we need to emulate it with multiple native in-order queues. More... | |
struct sycl::_V1::detail::queue_impl::DependencyTrackingItems | MDefaultGraphDeps |
struct sycl::_V1::detail::queue_impl::DependencyTrackingItems | MExtGraphDeps |
const bool | MIsInorder |
std::vector< EventImplPtr > | MStreamsServiceEvents |
std::mutex | MStreamsServiceEventsMutex |
void * | MTraceEvent = nullptr |
uint8_t | MStreamID = 0 |
The stream under which the traces are emitted from the queue object. More... | |
uint64_t | MInstanceID = 0 |
The instance ID of the trace event for queue object. More... | |
bool | MFallbackProfiling = false |
std::optional< event > | MInOrderExternalEvent |
std::mutex | MInOrderExternalEventMtx |
std::weak_ptr< ext::oneapi::experimental::detail::graph_impl > | MGraph {} |
unsigned long long | MQueueID |
std::deque< std::shared_ptr< ext::oneapi::experimental::detail::graph_impl > > | MMissedCleanupRequests |
std::mutex | MMissedCleanupRequestsMtx |
Static Protected Attributes | |
static std::atomic< unsigned long long > | MNextAvailableQueueID = 1 |
Friends | |
class | sycl::ext::oneapi::experimental::detail::node_impl |
Definition at line 71 of file queue_impl.hpp.
using sycl::_V1::detail::queue_impl::SubmitPostProcessF = std::function<void(bool, bool, event &)> |
Definition at line 389 of file queue_impl.hpp.
|
inline |
Constructs a SYCL queue from a device using an async_handler and property_list provided.
Device | is a SYCL device that is used to dispatch tasks submitted to the queue. |
AsyncHandler | is a SYCL asynchronous exception handler. |
PropList | is a list of properties to use for queue construction. |
Definition at line 94 of file queue_impl.hpp.
|
inline |
Constructs a SYCL queue with an async_handler and property_list provided form a device and a context.
Device | is a SYCL device that is used to dispatch tasks submitted to the queue. |
Context | is a SYCL context to associate with the queue being constructed. |
AsyncHandler | is a SYCL asynchronous exception handler. |
PropList | is a list of properties to use for queue construction. |
Definition at line 107 of file queue_impl.hpp.
References createQueue(), sycl::_V1::feature_not_supported, getDeviceImplPtr(), getHandleRef(), has_property(), sycl::_V1::invalid, sycl::_V1::make_error_code(), MContext, MDevice, MFallbackProfiling, MInstanceID, MIsInorder, MQueueID, MQueues, MStreamID, MTraceEvent, sycl::_V1::detail::OOO, sycl::_V1::opencl, sycl::_V1::detail::Ordered, and sycl::_V1::detail::SYCL_STREAM_NAME.
|
inline |
Constructs a SYCL queue from plugin interoperability handle.
UrQueue | is a raw UR queue handle. |
Context | is a SYCL context to associate with the queue being constructed. |
AsyncHandler | is a SYCL asynchronous exception handler. |
Definition at line 278 of file queue_impl.hpp.
|
inline |
Constructs a SYCL queue from plugin interoperability handle.
UrQueue | is a raw UR queue handle. |
Context | is a SYCL context to associate with the queue being constructed. |
AsyncHandler | is a SYCL asynchronous exception handler. |
PropList | is the queue properties. |
Definition at line 297 of file queue_impl.hpp.
|
inline |
Definition at line 307 of file queue_impl.hpp.
References __SYCL_REPORT_EXCEPTION_TO_STREAM, cleanup_fusion_cmd(), getPlugin(), MInstanceID, MQueues, MStreamID, MTraceEvent, and throw_asynchronous().
|
protected |
Stores an event that should be associated with the queue.
Event | is the event to be stored |
Definition at line 297 of file queue_impl.cpp.
References addSharedEvent(), sycl::_V1::detail::getSyclObjImpl(), MEmulateOOO, MEventsWeak, and MMutex.
Referenced by submit_impl().
|
protected |
queue_impl.addEvent tracks events with weak pointers but some events have no other owners.
addSharedEvent - queue_impl tracks events with weak pointers but some events have no other owner.
addSharedEvent() follows events with a shared pointer.
Event | is the event to be stored |
In this case, addSharedEvent will have the queue track the events via a shared pointer.
Definition at line 320 of file queue_impl.cpp.
References MEmulateOOO, MEventsShared, and MMutex.
Referenced by addEvent(), and submitMemOpHelper().
|
protected |
Definition at line 647 of file queue_impl.cpp.
References sycl::_V1::detail::Scheduler::cleanUpCmdFusion(), sycl::_V1::detail::Scheduler::getInstance(), and sycl::_V1::detail::Scheduler::isInstanceAlive().
Referenced by ~queue_impl().
|
inline |
Creates UR queue.
Order | specifies whether the queue being constructed as in-order or out-of-order. |
Definition at line 557 of file queue_impl.hpp.
References createUrQueueFlags(), getPlugin(), MContext, MDevice, MEmulateOOO, MPropList, and sycl::_V1::detail::Ordered.
Referenced by getExclusiveUrQueueHandleRef(), and queue_impl().
|
inlinestatic |
Creates UR properties array.
PropList | SYCL properties. |
Order | specifies whether queue is in-order or out-of-order. |
Properties | UR properties array created from SYCL properties. |
Definition at line 490 of file queue_impl.hpp.
References sycl::_V1::property_list::has_property(), sycl::_V1::invalid, sycl::_V1::make_error_code(), and sycl::_V1::detail::OOO.
Referenced by createQueue(), and sycl::_V1::detail::make_queue().
Definition at line 701 of file queue_impl.cpp.
References sycl::_V1::detail::createDiscardedEvent(), and MDiscardEvents.
Referenced by submit(), and submitMemOpHelper().
void sycl::_V1::detail::queue_impl::doUnenqueuedCommandCleanup | ( | const std::shared_ptr< ext::oneapi::experimental::detail::graph_impl > & | Graph | ) |
Definition at line 720 of file queue_impl.cpp.
References getCommandGraph(), MDefaultGraphDeps, and MExtGraphDeps.
Referenced by finalizeHandler(), revisitUnenqueuedCommandsState(), and wait().
bool sycl::_V1::detail::queue_impl::ext_oneapi_empty | ( | ) | const |
Definition at line 653 of file queue_impl.cpp.
References sycl::_V1::info::complete, getPlugin(), isInOrder(), sycl::_V1::detail::queue_impl::DependencyTrackingItems::LastEventPtr, MDefaultGraphDeps, MDiscardEvents, MEventsShared, MEventsWeak, MMutex, and MQueues.
|
inlineprotected |
Definition at line 807 of file queue_impl.hpp.
References sycl::_V1::detail::Barrier, sycl::_V1::detail::BarrierWaitlist, sycl::_V1::detail::CodeplayHostTask, doUnenqueuedCommandCleanup(), sycl::_V1::detail::getSyclObjImpl(), insertHelperBarrier(), sycl::_V1::detail::queue_impl::DependencyTrackingItems::LastEventPtr, MDefaultGraphDeps, MExtGraphDeps, MGraph, MIsInorder, MMissedCleanupRequests, MMissedCleanupRequestsMtx, MMutex, and popExternalEvent().
Referenced by submit_impl().
|
inline |
Provides a hint to the backend to execute previously issued commands on this queue.
Overrides normal batching behaviour. Note that this is merely a hint and not a guarantee.
Definition at line 378 of file queue_impl.hpp.
References getPlugin(), sycl::_V1::invalid, sycl::_V1::make_error_code(), MGraph, and MQueues.
|
inline |
Definition at line 334 of file queue_impl.hpp.
References getPlugin(), and MQueues.
Param::return_type sycl::_V1::detail::queue_impl::get_backend_info | ( | ) | const |
Queries SYCL queue for SYCL backend-specific information.
The return type depends on information being queried.
|
inline |
Definition at line 343 of file queue_impl.hpp.
References MContext.
|
inline |
Definition at line 354 of file queue_impl.hpp.
References MDevice.
Referenced by sycl::_V1::detail::queueDeviceToString().
Param::return_type sycl::_V1::detail::queue_impl::get_info | ( | ) | const |
Queries SYCL queue for information.
The return type depends on information being queried.
|
inline |
Definition at line 643 of file queue_impl.hpp.
References sycl::_V1::property_list::get_property(), and MPropList.
|
inline |
Definition at line 745 of file queue_impl.hpp.
References MGraph.
Referenced by doUnenqueuedCommandCleanup().
|
inlinestatic |
Definition at line 780 of file queue_impl.hpp.
Referenced by sycl::_V1::detail::Scheduler::GraphBuilder::getOrInsertMemObjRecord(), and sycl::_V1::detail::isOnSameContext().
|
inline |
|
inlinestatic |
Definition at line 75 of file queue_impl.hpp.
References sycl::_V1::detail::getSyclObjImpl().
Referenced by sycl::_V1::detail::event_impl::initContextIfNeeded().
|
inline |
|
inline |
Definition at line 454 of file queue_impl.hpp.
References MExceptions.
|
inline |
Definition at line 596 of file queue_impl.hpp.
References createQueue(), getPlugin(), sycl::_V1::detail::MaxNumQueues, MMutex, MNextQueueIdx, MQueues, and sycl::_V1::detail::Ordered.
Referenced by getHandleRef().
const std::vector< event > & sycl::_V1::detail::queue_impl::getExtendDependencyList | ( | const std::vector< event > & | DepEvents, |
std::vector< event > & | MutableVec, | ||
std::unique_lock< std::mutex > & | QueueLock | ||
) |
Definition at line 125 of file queue_impl.cpp.
References isInOrder(), sycl::_V1::detail::queue_impl::DependencyTrackingItems::LastEventPtr, MDefaultGraphDeps, MExtGraphDeps, MGraph, and popExternalEvent().
Referenced by submitMemOpHelper().
|
inline |
Definition at line 627 of file queue_impl.hpp.
References getExclusiveUrQueueHandleRef(), MEmulateOOO, and MQueues.
Referenced by queue_impl(), and wait().
event sycl::_V1::detail::queue_impl::getLastEvent | ( | ) |
Definition at line 278 of file queue_impl.cpp.
References sycl::_V1::detail::createDiscardedEvent(), sycl::_V1::detail::queue_impl::DependencyTrackingItems::LastEventPtr, MDefaultGraphDeps, MDiscardEvents, MExtGraphDeps, MGraph, MInOrderExternalEvent, MInOrderExternalEventMtx, and MMutex.
ur_native_handle_t sycl::_V1::detail::queue_impl::getNative | ( | int32_t & | NativeHandleDesc | ) | const |
Gets the native handle of the SYCL queue.
Definition at line 634 of file queue_impl.cpp.
References getContextImplPtr(), getPlugin(), MQueues, and sycl::_V1::opencl.
|
inline |
Definition at line 347 of file queue_impl.hpp.
References MContext.
Referenced by createQueue(), ext_oneapi_empty(), flush(), get(), getExclusiveUrQueueHandleRef(), getNative(), insertHelperBarrier(), wait(), and ~queue_impl().
|
inline |
Definition at line 789 of file queue_impl.hpp.
References MPropList.
|
inline |
Definition at line 749 of file queue_impl.hpp.
References MQueueID.
|
inlinestatic |
Definition at line 698 of file queue_impl.hpp.
References sycl::_V1::detail::GlobalHandler::getHostTaskThreadPool(), and sycl::_V1::detail::GlobalHandler::instance().
|
inlinenoexcept |
Definition at line 636 of file queue_impl.hpp.
References sycl::_V1::property_list::has_property(), and MPropList.
Referenced by queue_impl().
|
inline |
Definition at line 357 of file queue_impl.hpp.
References MDiscardEvents.
|
inlineprotected |
Definition at line 797 of file queue_impl.hpp.
References getPlugin().
Referenced by finalizeHandler().
|
protected |
Definition at line 525 of file queue_impl.cpp.
Referenced by wait().
|
protected |
Definition at line 468 of file queue_impl.cpp.
References sycl::_V1::detail::code_location::columnNumber(), sycl::_V1::detail::code_location::fileName(), sycl::_V1::detail::code_location::functionName(), sycl::_V1::detail::code_location::lineNumber(), and sycl::_V1::detail::queueDeviceToString().
Referenced by wait().
|
inline |
Check whether the queue is in fusion mode.
Definition at line 717 of file queue_impl.hpp.
References sycl::_V1::detail::Scheduler::getInstance(), and sycl::_V1::detail::Scheduler::isInFusionMode().
|
inline |
Definition at line 362 of file queue_impl.hpp.
References MIsInorder.
Referenced by ext_oneapi_empty(), getExtendDependencyList(), and submitMemOpHelper().
|
inline |
Definition at line 735 of file queue_impl.hpp.
References MFallbackProfiling.
event sycl::_V1::detail::queue_impl::mem_advise | ( | const std::shared_ptr< queue_impl > & | Self, |
const void * | Ptr, | ||
size_t | Length, | ||
ur_usm_advice_flags_t | Advice, | ||
const std::vector< event > & | DepEvents, | ||
bool | CallerNeedsEvent | ||
) |
Provides additional information to the underlying runtime about how different allocations are used.
Self | is a shared_ptr to this queue. |
Ptr | is a USM pointer to the allocation. |
Length | is a number of bytes in the allocation. |
Advice | is a device-defined advice for the specified allocation. |
DepEvents | is a vector of events that specifies the kernel dependencies. |
CallerNeedsEvent | specifies if the caller expects a usable event. |
Definition at line 234 of file queue_impl.cpp.
References sycl::_V1::detail::MemoryManager::advise_usm(), sycl::_V1::handler::mem_advise(), and submitMemOpHelper().
event sycl::_V1::detail::queue_impl::memcpy | ( | const std::shared_ptr< queue_impl > & | Self, |
void * | Dest, | ||
const void * | Src, | ||
size_t | Count, | ||
const std::vector< event > & | DepEvents, | ||
bool | CallerNeedsEvent, | ||
const code_location & | CodeLoc | ||
) |
Copies data from one memory region to another, both pointed by USM pointers.
Self | is a shared_ptr to this queue. |
Dest | is a USM pointer to the destination memory. |
Src | is a USM pointer to the source memory. |
Count | is a number of bytes to copy. |
DepEvents | is a vector of events that specifies the kernel dependencies. |
CallerNeedsEvent | specifies if the caller expects a usable event. |
Definition at line 195 of file queue_impl.cpp.
References sycl::_V1::detail::MemoryManager::copy_usm(), sycl::_V1::invalid, sycl::_V1::make_error_code(), MDevice, sycl::_V1::handler::memcpy(), MQueueID, sycl::_V1::detail::report(), submitMemOpHelper(), and sycl::_V1::detail::SYCL_STREAM_NAME.
event sycl::_V1::detail::queue_impl::memcpyFromDeviceGlobal | ( | const std::shared_ptr< queue_impl > & | Self, |
void * | Dest, | ||
const void * | DeviceGlobalPtr, | ||
bool | IsDeviceImageScope, | ||
size_t | NumBytes, | ||
size_t | Offset, | ||
const std::vector< event > & | DepEvents, | ||
bool | CallerNeedsEvent | ||
) |
Definition at line 262 of file queue_impl.cpp.
References sycl::_V1::detail::MemoryManager::copy_from_device_global(), and submitMemOpHelper().
event sycl::_V1::detail::queue_impl::memcpyToDeviceGlobal | ( | const std::shared_ptr< queue_impl > & | Self, |
void * | DeviceGlobalPtr, | ||
const void * | Src, | ||
bool | IsDeviceImageScope, | ||
size_t | NumBytes, | ||
size_t | Offset, | ||
const std::vector< event > & | DepEvents, | ||
bool | CallerNeedsEvent | ||
) |
Definition at line 246 of file queue_impl.cpp.
References sycl::_V1::detail::MemoryManager::copy_to_device_global(), and submitMemOpHelper().
event sycl::_V1::detail::queue_impl::memset | ( | const std::shared_ptr< queue_impl > & | Self, |
void * | Ptr, | ||
int | Value, | ||
size_t | Count, | ||
const std::vector< event > & | DepEvents, | ||
bool | CallerNeedsEvent | ||
) |
Fills the memory pointed by a USM pointer with the value specified.
Self | is a shared_ptr to this queue. |
Ptr | is a USM pointer to the memory to fill. |
Value | is a value to be set. Value is cast as an unsigned char. |
Count | is a number of bytes to fill. |
DepEvents | is a vector of events that specifies the kernel dependencies. |
CallerNeedsEvent | specifies if the caller expects a usable event. |
Definition at line 147 of file queue_impl.cpp.
References sycl::_V1::detail::MemoryManager::fill_usm(), MDevice, sycl::_V1::handler::memset(), MQueueID, submitMemOpHelper(), and sycl::_V1::detail::SYCL_STREAM_NAME.
|
inline |
Definition at line 756 of file queue_impl.hpp.
References MInOrderExternalEvent, and MInOrderExternalEventMtx.
Referenced by finalizeHandler(), getExtendDependencyList(), and wait().
|
inline |
Definition at line 707 of file queue_impl.hpp.
References MStreamsServiceEvents, and MStreamsServiceEventsMutex.
Referenced by submit_impl().
|
inline |
Puts exception to the list of asynchronous ecxeptions.
ExceptionPtr | is a pointer to exception to be put. |
Definition at line 693 of file queue_impl.hpp.
References MExceptions, and MMutex.
void sycl::_V1::detail::queue_impl::revisitUnenqueuedCommandsState | ( | const EventImplPtr & | CompletedHostTask | ) |
Definition at line 707 of file queue_impl.cpp.
References doUnenqueuedCommandCleanup(), MIsInorder, MMissedCleanupRequests, MMissedCleanupRequestsMtx, and MMutex.
|
inline |
Definition at line 737 of file queue_impl.hpp.
References MExtGraphDeps, MGraph, MMutex, and sycl::_V1::detail::queue_impl::DependencyTrackingItems::reset().
|
inline |
Definition at line 751 of file queue_impl.hpp.
References MInOrderExternalEvent, and MInOrderExternalEventMtx.
|
inline |
Submits a command group function object to the queue, in order to be scheduled for execution on the device.
CGF | is a function object containing command group. |
Self | is a shared_ptr to this queue. |
Loc | is the code location of the submit call (default argument) |
StoreAdditionalInfo | makes additional info be stored in event_impl |
Definition at line 429 of file queue_impl.hpp.
References discard_or_return(), and submit_impl().
|
inline |
Submits a command group function object to the queue, in order to be scheduled for execution on the device.
On a kernel error, this command group function object is then scheduled for execution on a secondary queue.
CGF | is a function object containing command group. |
Self | is a shared_ptr to this queue. |
SecondQueue | is a shared_ptr to the secondary queue. |
Loc | is the code location of the submit call (default argument) |
StoreAdditionalInfo | makes additional info be stored in event_impl |
Definition at line 404 of file queue_impl.hpp.
References discard_or_return(), and submit_impl().
Referenced by submitWithHandler().
|
protected |
Performs command group submission to the queue.
CGF | is a function object containing command group. |
Self | is a pointer to this queue. |
PrimaryQueue | is a pointer to the primary queue. This may be the same as Self. |
SecondaryQueue | is a pointer to the secondary queue. This may be the same as Self. |
CallerNeedsEvent | is a boolean indicating whether the event is required by the user after the call. |
Loc | is the code location of the submit call (default argument) |
Definition at line 349 of file queue_impl.cpp.
References addEvent(), sycl::_V1::detail::string::c_str(), finalizeHandler(), sycl::_V1::detail::ProgramManager::getInstance(), sycl::_V1::detail::getSyclObjImpl(), sycl::_V1::detail::Kernel, sycl::_V1::detail::ProgramManager::kernelUsesAssert(), and registerStreamServiceEvent().
Referenced by submit(), and submit_without_event().
|
inline |
Definition at line 438 of file queue_impl.hpp.
References submit_impl().
|
protected |
Performs submission of a memory operation directly if scheduler can be bypassed, or with a handler otherwise.
Self | is a shared_ptr to this queue. |
DepEvents | is a vector of dependencies of the operation. |
CallerNeedsEvent | specifies if the caller needs an event from this memory operation. |
HandlerFunc | is a function that submits the operation with a handler. |
MemMngrFunc | is a function that forwards its arguments to the appropriate memory manager function. |
MemMngrArgs | are all the arguments that need to be passed to memory manager except the last three: dependencies, UR event and EventImplPtr are filled out by this helper. |
Referenced by mem_advise(), memcpy(), memcpyFromDeviceGlobal(), memcpyToDeviceGlobal(), and memset().
event sycl::_V1::detail::queue_impl::submitMemOpHelper | ( | const std::shared_ptr< queue_impl > & | Self, |
const std::vector< event > & | DepEvents, | ||
bool | CallerNeedsEvent, | ||
HandlerFuncT | HandlerFunc, | ||
MemOpFuncT | MemOpFunc, | ||
MemOpArgTs... | MemOpArgs | ||
) |
Definition at line 419 of file queue_impl.cpp.
References addSharedEvent(), sycl::_V1::detail::Scheduler::areEventsSafeForSchedulerBypass(), sycl::_V1::detail::createDiscardedEvent(), discard_or_return(), getExtendDependencyList(), sycl::_V1::detail::getSyclObjImpl(), sycl::_V1::detail::getUrEvents(), isInOrder(), sycl::_V1::detail::queue_impl::DependencyTrackingItems::LastEventPtr, MContext, MDefaultGraphDeps, MDiscardEvents, MEmulateOOO, MExtGraphDeps, MGraph, MMutex, sycl::_V1::detail::prepareSYCLEventAssociatedWithQueue(), submitWithHandler(), and supportsDiscardingPiEvents().
|
protected |
Helper function for submitting a memory operation with a handler.
Self | is a shared_ptr to this queue. |
DepEvents | is a vector of dependencies of the operation. |
HandlerFunc | is a function that submits the operation with a handler. |
Definition at line 407 of file queue_impl.cpp.
References sycl::_V1::handler::depends_on(), and submit().
Referenced by submitMemOpHelper().
|
inline |
Definition at line 360 of file queue_impl.hpp.
References MIsInorder.
Referenced by submitMemOpHelper().
|
inline |
Performs a blocking wait for the completion of all enqueued tasks in the queue.
Synchronous errors will be reported through SYCL exceptions. Asynchronous errors will be passed to the async_handler passed to the queue on construction. If no async_handler was provided then asynchronous exceptions will be lost.
Definition at line 469 of file queue_impl.hpp.
References MAsyncHandler, MExceptions, MMutex, and sycl::_V1::exception_list::size().
Referenced by ~queue_impl().
void sycl::_V1::detail::queue_impl::tryToResetEnqueuedBarrierDep | ( | const EventImplPtr & | EnqueuedBarrierEvent | ) |
void sycl::_V1::detail::queue_impl::wait | ( | const detail::code_location & | Loc = {} | ) |
Performs a blocking wait for the completion of all enqueued tasks in the queue.
Synchronous errors will be reported through SYCL exceptions.
Loc | is the code location of the submit call (default argument) |
Definition at line 544 of file queue_impl.cpp.
References doUnenqueuedCommandCleanup(), getHandleRef(), getPlugin(), instrumentationEpilog(), instrumentationProlog(), sycl::_V1::invalid, sycl::_V1::make_error_code(), MEmulateOOO, MEventsShared, MEventsWeak, MGraph, MMissedCleanupRequests, MMissedCleanupRequestsMtx, MMutex, MStreamsServiceEvents, MStreamsServiceEventsMutex, popExternalEvent(), and sycl::_V1::detail::SYCL_STREAM_NAME.
|
inline |
Loc | is the code location of the submit call (default argument) |
Definition at line 457 of file queue_impl.hpp.
|
friend |
Definition at line 1037 of file queue_impl.hpp.
|
protected |
Definition at line 966 of file queue_impl.hpp.
Referenced by throw_asynchronous().
|
protected |
Definition at line 956 of file queue_impl.hpp.
Referenced by createQueue(), get_context(), getContextImplPtr(), getPlugin(), queue_impl(), and submitMemOpHelper().
|
protected |
|
protected |
Definition at line 955 of file queue_impl.hpp.
Referenced by createQueue(), get_device(), getDeviceImplPtr(), memcpy(), memset(), and queue_impl().
const bool sycl::_V1::detail::queue_impl::MDiscardEvents |
Definition at line 1022 of file queue_impl.hpp.
Referenced by discard_or_return(), ext_oneapi_empty(), getLastEvent(), hasDiscardEventsProperty(), and submitMemOpHelper().
|
protected |
Indicates that a native out-of-order queue could not be created and we need to emulate it with multiple native in-order queues.
Definition at line 976 of file queue_impl.hpp.
Referenced by addEvent(), addSharedEvent(), createQueue(), getHandleRef(), submitMemOpHelper(), and wait().
|
protected |
Events without data dependencies (such as USM) need an owner, additionally, USM operations are not added to the scheduler command graph, queue is the only owner on the runtime side.
Definition at line 964 of file queue_impl.hpp.
Referenced by addSharedEvent(), ext_oneapi_empty(), and wait().
|
protected |
These events are tracked, but not owned, by the queue.
Definition at line 959 of file queue_impl.hpp.
Referenced by addEvent(), ext_oneapi_empty(), and wait().
|
protected |
Definition at line 965 of file queue_impl.hpp.
Referenced by getExceptionList(), reportAsyncException(), and throw_asynchronous().
|
protected |
|
protected |
Definition at line 1011 of file queue_impl.hpp.
Referenced by isProfilingFallback(), and queue_impl().
|
protected |
Definition at line 1028 of file queue_impl.hpp.
Referenced by finalizeHandler(), flush(), getCommandGraph(), getExtendDependencyList(), getLastEvent(), setCommandGraph(), submitMemOpHelper(), and wait().
|
protected |
Definition at line 1017 of file queue_impl.hpp.
Referenced by getLastEvent(), popExternalEvent(), and setExternalEvent().
|
mutableprotected |
Definition at line 1018 of file queue_impl.hpp.
Referenced by getLastEvent(), popExternalEvent(), and setExternalEvent().
|
protected |
The instance ID of the trace event for queue object.
Definition at line 1008 of file queue_impl.hpp.
Referenced by queue_impl(), and ~queue_impl().
|
protected |
Definition at line 995 of file queue_impl.hpp.
Referenced by finalizeHandler(), isInOrder(), queue_impl(), revisitUnenqueuedCommandsState(), and supportsDiscardingPiEvents().
const bool sycl::_V1::detail::queue_impl::MIsProfilingEnabled |
Definition at line 1023 of file queue_impl.hpp.
|
protected |
Definition at line 1034 of file queue_impl.hpp.
Referenced by finalizeHandler(), revisitUnenqueuedCommandsState(), and wait().
|
protected |
Definition at line 1035 of file queue_impl.hpp.
Referenced by finalizeHandler(), revisitUnenqueuedCommandsState(), and wait().
|
mutableprotected |
Protects all the fields that can be changed by class' methods.
Definition at line 953 of file queue_impl.hpp.
Referenced by addEvent(), addSharedEvent(), ext_oneapi_empty(), finalizeHandler(), getExclusiveUrQueueHandleRef(), getLastEvent(), reportAsyncException(), revisitUnenqueuedCommandsState(), setCommandGraph(), submitMemOpHelper(), throw_asynchronous(), and wait().
|
staticprotected |
Definition at line 1031 of file queue_impl.hpp.
|
protected |
Iterator through MQueues.
Definition at line 972 of file queue_impl.hpp.
Referenced by getExclusiveUrQueueHandleRef().
|
protected |
Definition at line 967 of file queue_impl.hpp.
Referenced by createQueue(), get_property(), getPropList(), and has_property().
|
protected |
Definition at line 1030 of file queue_impl.hpp.
Referenced by getQueueID(), memcpy(), memset(), and queue_impl().
|
protected |
List of queues created for FPGA device from a single SYCL queue.
Definition at line 970 of file queue_impl.hpp.
Referenced by ext_oneapi_empty(), flush(), get(), getExclusiveUrQueueHandleRef(), getHandleRef(), getNative(), queue_impl(), and ~queue_impl().
|
protected |
The stream under which the traces are emitted from the queue object.
Definition at line 1006 of file queue_impl.hpp.
Referenced by queue_impl(), and ~queue_impl().
|
protected |
Definition at line 997 of file queue_impl.hpp.
Referenced by registerStreamServiceEvent(), and wait().
|
protected |
Definition at line 998 of file queue_impl.hpp.
Referenced by registerStreamServiceEvent(), and wait().
|
protected |
Definition at line 1004 of file queue_impl.hpp.
Referenced by queue_impl(), and ~queue_impl().