DPC++ Runtime
Runtime libraries for oneAPI DPC++
_pi_queue Struct Reference

PI queue mapping on to CUstream objects. More...

#include <cuda/pi_cuda.hpp>

Inheritance diagram for _pi_queue:
Collaboration diagram for _pi_queue:

Classes

struct  active_barriers
 
struct  command_batch
 
struct  pi_queue_group_t
 

Public Types

using native_type = CUstream
 
using native_type = hipStream_t
 
using queue_type = _pi_device::queue_group_info_t::type
 

Public Member Functions

 _pi_queue (std::vector< CUstream > &&compute_streams, std::vector< CUstream > &&transfer_streams, _pi_context *context, _pi_device *device, pi_queue_properties properties, unsigned int flags, bool backend_owns=true)
 
 ~_pi_queue ()
 
void compute_stream_wait_for_barrier_if_needed (CUstream stream, pi_uint32 stream_i)
 
void transfer_stream_wait_for_barrier_if_needed (CUstream stream, pi_uint32 stream_i)
 
native_type get_next_compute_stream (pi_uint32 *stream_token=nullptr)
 
native_type get_next_compute_stream (pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, _pi_stream_guard &guard, pi_uint32 *stream_token=nullptr)
 
native_type get_next_transfer_stream ()
 
native_type get ()
 
bool has_been_synchronized (pi_uint32 stream_token)
 
bool can_reuse_stream (pi_uint32 stream_token)
 
template<typename T >
bool all_of (T &&f)
 
template<typename T >
void for_each_stream (T &&f)
 
template<bool ResetUsed = false, typename T >
void sync_streams (T &&f)
 
_pi_contextget_context () const
 
_pi_deviceget_device () const
 
pi_uint32 increment_reference_count () noexcept
 
pi_uint32 decrement_reference_count () noexcept
 
pi_uint32 get_reference_count () const noexcept
 
pi_uint32 get_next_event_id () noexcept
 
bool backend_has_ownership () const noexcept
 
 _pi_queue (pi_context ContextArg, cm_support::CmQueue *CmQueueArg)
 
 _pi_queue (std::vector< native_type > &&compute_streams, std::vector< native_type > &&transfer_streams, _pi_context *context, _pi_device *device, pi_queue_properties properties, unsigned int flags)
 
 ~_pi_queue ()
 
void compute_stream_wait_for_barrier_if_needed (hipStream_t stream, pi_uint32 stream_i)
 
void transfer_stream_wait_for_barrier_if_needed (hipStream_t stream, pi_uint32 stream_i)
 
native_type get_next_compute_stream (pi_uint32 *stream_token=nullptr)
 
native_type get_next_compute_stream (pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, _pi_stream_guard &guard, pi_uint32 *stream_token=nullptr)
 
native_type get_next_transfer_stream ()
 
native_type get ()
 
bool has_been_synchronized (pi_uint32 stream_token)
 
bool can_reuse_stream (pi_uint32 stream_token)
 
template<typename T >
bool all_of (T &&f)
 
template<typename T >
void for_each_stream (T &&f)
 
template<bool ResetUsed = false, typename T >
void sync_streams (T &&f)
 
_pi_contextget_context () const
 
_pi_deviceget_device () const
 
pi_uint32 increment_reference_count () noexcept
 
pi_uint32 decrement_reference_count () noexcept
 
pi_uint32 get_reference_count () const noexcept
 
pi_uint32 get_next_event_id () noexcept
 
 _pi_queue (std::vector< ze_command_queue_handle_t > &ComputeQueues, std::vector< ze_command_queue_handle_t > &CopyQueues, pi_context Context, pi_device Device, bool OwnZeCommandQueue, pi_queue_properties Properties=0, int ForceComputeIndex=-1)
 
pi_result synchronize ()
 
pi_queue_group_tgetQueueGroup (bool UseCopyEngine)
 
bool useCopyEngine (bool PreferCopyEngine=true) const
 
void CaptureIndirectAccesses ()
 
bool isBatchingAllowed (bool IsCopy) const
 
bool isInOrderQueue () const
 
bool isDiscardEvents () const
 
bool isPriorityLow () const
 
bool isPriorityHigh () const
 
void adjustBatchSizeForFullBatch (bool IsCopy)
 
void adjustBatchSizeForPartialBatch (bool IsCopy)
 
pi_result createCommandList (bool UseCopyEngine, pi_command_list_ptr_t &CommandList, ze_command_queue_handle_t *ForcedCmdQueue=nullptr)
 
pi_result resetCommandList (pi_command_list_ptr_t CommandList, bool MakeAvailable, std::vector< pi_event > &EventListToCleanup, bool CheckStatus=true)
 Resets the command list and associated fence in the map and removes events from the command list. More...
 
bool hasOpenCommandList (bool IsCopy) const
 
pi_result executeCommandList (pi_command_list_ptr_t CommandList, bool IsBlocking=false, bool OKToBatchCommand=false)
 
pi_result executeOpenCommandList (bool IsCopy)
 
pi_command_list_ptr_t eventOpenCommandList (pi_event Event)
 
pi_result executeAllOpenCommandLists ()
 
pi_result insertActiveBarriers (pi_command_list_ptr_t &CmdList, bool UseCopyEngine)
 
pi_event getEventFromQueueCache (bool HostVisible)
 
pi_result addEventToQueueCache (pi_event Event)
 
pi_result resetDiscardedEvent (pi_command_list_ptr_t)
 
pi_result signalEventFromCmdListIfLastEventDiscarded (pi_command_list_ptr_t)
 
pi_result insertStartBarrierIfDiscardEventsMode (pi_command_list_ptr_t &CmdList)
 
bool doReuseDiscardedEvents ()
 
- Public Member Functions inherited from _pi_object
 _pi_object ()
 
virtual ~_pi_object ()=default
 
 _pi_object ()
 

Public Attributes

std::vector< native_typecompute_streams_
 
std::vector< native_typetransfer_streams_
 
std::vector< bool > delay_compute_
 
std::vector< bool > compute_applied_barrier_
 
std::vector< bool > transfer_applied_barrier_
 
_pi_contextcontext_
 
_pi_devicedevice_
 
pi_queue_properties properties_
 
CUevent barrier_event_ = nullptr
 
CUevent barrier_tmp_event_ = nullptr
 
std::atomic_uint32_t refCount_
 
std::atomic_uint32_t eventCount_
 
std::atomic_uint32_t compute_stream_idx_
 
std::atomic_uint32_t transfer_stream_idx_
 
unsigned int num_compute_streams_
 
unsigned int num_transfer_streams_
 
unsigned int last_sync_compute_streams_
 
unsigned int last_sync_transfer_streams_
 
unsigned int flags_
 
std::mutex compute_stream_sync_mutex_
 
std::mutex compute_stream_mutex_
 
std::mutex transfer_stream_mutex_
 
std::mutex barrier_mutex_
 
bool has_ownership_
 
pi_context Context = nullptr
 
cm_support::CmQueue * CmQueuePtr = nullptr
 
hipEvent_t barrier_event_ = nullptr
 
hipEvent_t barrier_tmp_event_ = nullptr
 
std::unordered_map< std::thread::id, pi_queue_group_tComputeQueueGroupsByTID
 
std::unordered_map< std::thread::id, pi_queue_group_tCopyQueueGroupsByTID
 
const pi_context Context
 
const pi_device Device
 
pi_event LastCommandEvent = nullptr
 
std::vector< pi_kernelKernelsToBeSubmitted
 
bool OwnZeCommandQueue
 
pi_command_list_map_t CommandListMap
 
command_batch ComputeCommandBatch
 
command_batch CopyCommandBatch
 
pi_queue_properties Properties
 
active_barriers ActiveBarriers
 
pi_uint32 RefCountExternal {1}
 
bool Healthy {true}
 
pi_command_list_ptr_t LastUsedCommandList = CommandListMap.end()
 
std::vector< std::list< pi_event > > EventCaches {2}
 
- Public Attributes inherited from _pi_object
std::atomic< pi_uint32RefCount
 
ReferenceCounter RefCount
 
pi_shared_mutex Mutex
 

Static Public Attributes

static constexpr int default_num_compute_streams = 128
 
static constexpr int default_num_transfer_streams = 64
 

Detailed Description

PI queue mapping on to CUstream objects.

PI queue mapping on to hipStream_t objects.

Definition at line 400 of file pi_cuda.hpp.

Member Typedef Documentation

◆ native_type [1/2]

Definition at line 401 of file pi_cuda.hpp.

◆ native_type [2/2]

using _pi_queue::native_type = hipStream_t

Definition at line 378 of file pi_hip.hpp.

◆ queue_type

Constructor & Destructor Documentation

◆ _pi_queue() [1/4]

_pi_queue::_pi_queue ( std::vector< CUstream > &&  compute_streams,
std::vector< CUstream > &&  transfer_streams,
_pi_context context,
_pi_device device,
pi_queue_properties  properties,
unsigned int  flags,
bool  backend_owns = true 
)
inline

◆ ~_pi_queue() [1/2]

_pi_queue::~_pi_queue ( )
inline

Definition at line 456 of file pi_cuda.hpp.

References context_, cuda_piContextRelease(), cuda_piDeviceRelease(), and device_.

◆ _pi_queue() [2/4]

_pi_queue::_pi_queue ( pi_context  ContextArg,
cm_support::CmQueue *  CmQueueArg 
)
inline

Definition at line 110 of file pi_esimd_emulator.hpp.

◆ _pi_queue() [3/4]

_pi_queue::_pi_queue ( std::vector< native_type > &&  compute_streams,
std::vector< native_type > &&  transfer_streams,
_pi_context context,
_pi_device device,
pi_queue_properties  properties,
unsigned int  flags 
)
inline

Definition at line 414 of file pi_hip.hpp.

References context_, device_, hip_piContextRetain(), and hip_piDeviceRetain().

◆ ~_pi_queue() [2/2]

_pi_queue::~_pi_queue ( )
inline

Definition at line 432 of file pi_hip.hpp.

References context_, device_, hip_piContextRelease(), and hip_piDeviceRelease().

◆ _pi_queue() [4/4]

Member Function Documentation

◆ addEventToQueueCache()

pi_result _pi_queue::addEventToQueueCache ( pi_event  Event)

Definition at line 530 of file pi_level_zero.cpp.

References EventCaches, and _pi_event::isHostVisible().

Referenced by resetDiscardedEvent().

◆ adjustBatchSizeForFullBatch()

◆ adjustBatchSizeForPartialBatch()

void _pi_queue::adjustBatchSizeForPartialBatch ( bool  IsCopy)

◆ all_of() [1/2]

template<typename T >
bool _pi_queue::all_of ( T &&  f)
inline

◆ all_of() [2/2]

template<typename T >
bool _pi_queue::all_of ( T &&  f)
inline

◆ backend_has_ownership()

bool _pi_queue::backend_has_ownership ( ) const
inlinenoexcept

Definition at line 630 of file pi_cuda.hpp.

References has_ownership_.

Referenced by cuda_piQueueRelease().

◆ can_reuse_stream() [1/2]

bool _pi_queue::can_reuse_stream ( pi_uint32  stream_token)
inline

Definition at line 487 of file pi_cuda.hpp.

References compute_stream_idx_, compute_streams_, has_been_synchronized(), and max().

Referenced by get_next_compute_stream().

◆ can_reuse_stream() [2/2]

bool _pi_queue::can_reuse_stream ( pi_uint32  stream_token)
inline

Definition at line 463 of file pi_hip.hpp.

References compute_stream_idx_, compute_streams_, has_been_synchronized(), and max().

◆ CaptureIndirectAccesses()

void _pi_queue::CaptureIndirectAccesses ( )

◆ compute_stream_wait_for_barrier_if_needed() [1/2]

void _pi_queue::compute_stream_wait_for_barrier_if_needed ( CUstream  stream,
pi_uint32  stream_i 
)

Definition at line 398 of file pi_cuda.cpp.

References barrier_event_, and compute_applied_barrier_.

Referenced by get_next_compute_stream().

◆ compute_stream_wait_for_barrier_if_needed() [2/2]

void _pi_queue::compute_stream_wait_for_barrier_if_needed ( hipStream_t  stream,
pi_uint32  stream_i 
)

Definition at line 433 of file pi_hip.cpp.

References barrier_event_, and compute_applied_barrier_.

◆ createCommandList()

◆ decrement_reference_count() [1/2]

pi_uint32 _pi_queue::decrement_reference_count ( )
inlinenoexcept

Definition at line 624 of file pi_cuda.hpp.

References refCount_.

Referenced by cuda_piQueueRelease(), and hip_piQueueRelease().

◆ decrement_reference_count() [2/2]

pi_uint32 _pi_queue::decrement_reference_count ( )
inlinenoexcept

Definition at line 600 of file pi_hip.hpp.

References refCount_.

◆ doReuseDiscardedEvents()

bool _pi_queue::doReuseDiscardedEvents ( )

◆ eventOpenCommandList()

◆ executeAllOpenCommandLists()

pi_result _pi_queue::executeAllOpenCommandLists ( )
inline

◆ executeCommandList()

◆ executeOpenCommandList()

◆ for_each_stream() [1/2]

template<typename T >
void _pi_queue::for_each_stream ( T &&  f)
inline

◆ for_each_stream() [2/2]

template<typename T >
void _pi_queue::for_each_stream ( T &&  f)
inline

◆ get() [1/2]

native_type _pi_queue::get ( )
inline

Definition at line 477 of file pi_cuda.hpp.

References get_next_compute_stream().

◆ get() [2/2]

native_type _pi_queue::get ( )
inline

Definition at line 453 of file pi_hip.hpp.

References get_next_compute_stream().

◆ get_context() [1/2]

◆ get_context() [2/2]

_pi_context* _pi_queue::get_context ( ) const
inline

Definition at line 594 of file pi_hip.hpp.

References context_.

◆ get_device() [1/2]

_pi_device* _pi_queue::get_device ( ) const
inline

Definition at line 620 of file pi_cuda.hpp.

References device_.

Referenced by cuda_piEnqueueKernelLaunch(), and hip_piEnqueueKernelLaunch().

◆ get_device() [2/2]

_pi_device* _pi_queue::get_device ( ) const
inline

Definition at line 596 of file pi_hip.hpp.

References device_.

◆ get_next_compute_stream() [1/4]

◆ get_next_compute_stream() [2/4]

native_type _pi_queue::get_next_compute_stream ( pi_uint32 stream_token = nullptr)

◆ get_next_compute_stream() [3/4]

hipStream_t _pi_queue::get_next_compute_stream ( pi_uint32  num_events_in_wait_list,
const pi_event event_wait_list,
_pi_stream_guard guard,
pi_uint32 stream_token = nullptr 
)

◆ get_next_compute_stream() [4/4]

native_type _pi_queue::get_next_compute_stream ( pi_uint32  num_events_in_wait_list,
const pi_event event_wait_list,
_pi_stream_guard guard,
pi_uint32 stream_token = nullptr 
)

◆ get_next_event_id() [1/2]

pi_uint32 _pi_queue::get_next_event_id ( )
inlinenoexcept

Definition at line 628 of file pi_cuda.hpp.

References eventCount_.

Referenced by _pi_event::record().

◆ get_next_event_id() [2/2]

pi_uint32 _pi_queue::get_next_event_id ( )
inlinenoexcept

Definition at line 604 of file pi_hip.hpp.

References eventCount_.

◆ get_next_transfer_stream() [1/2]

◆ get_next_transfer_stream() [2/2]

native_type _pi_queue::get_next_transfer_stream ( )

◆ get_reference_count() [1/2]

pi_uint32 _pi_queue::get_reference_count ( ) const
inlinenoexcept

Definition at line 626 of file pi_cuda.hpp.

References refCount_.

Referenced by cuda_piQueueGetInfo(), cuda_piQueueRetain(), hip_piQueueGetInfo(), and hip_piQueueRetain().

◆ get_reference_count() [2/2]

pi_uint32 _pi_queue::get_reference_count ( ) const
inlinenoexcept

Definition at line 602 of file pi_hip.hpp.

References refCount_.

◆ getEventFromQueueCache()

pi_event _pi_queue::getEventFromQueueCache ( bool  HostVisible)

Definition at line 513 of file pi_level_zero.cpp.

References EventCaches.

Referenced by createEventAndAssociateQueue().

◆ getQueueGroup()

◆ has_been_synchronized() [1/2]

bool _pi_queue::has_been_synchronized ( pi_uint32  stream_token)
inline

Definition at line 479 of file pi_cuda.hpp.

References last_sync_compute_streams_, and max().

Referenced by can_reuse_stream().

◆ has_been_synchronized() [2/2]

bool _pi_queue::has_been_synchronized ( pi_uint32  stream_token)
inline

Definition at line 455 of file pi_hip.hpp.

References last_sync_compute_streams_, and max().

◆ hasOpenCommandList()

bool _pi_queue::hasOpenCommandList ( bool  IsCopy) const
inline

◆ increment_reference_count() [1/2]

pi_uint32 _pi_queue::increment_reference_count ( )
inlinenoexcept

Definition at line 622 of file pi_cuda.hpp.

References refCount_.

Referenced by cuda_piQueueRetain(), and hip_piQueueRetain().

◆ increment_reference_count() [2/2]

pi_uint32 _pi_queue::increment_reference_count ( )
inlinenoexcept

Definition at line 598 of file pi_hip.hpp.

References refCount_.

◆ insertActiveBarriers()

◆ insertStartBarrierIfDiscardEventsMode()

pi_result _pi_queue::insertStartBarrierIfDiscardEventsMode ( pi_command_list_ptr_t CmdList)

◆ isBatchingAllowed()

bool _pi_queue::isBatchingAllowed ( bool  IsCopy) const

Definition at line 1813 of file pi_level_zero.cpp.

References ComputeCommandBatch, CopyCommandBatch, ZeSerialize, and ZeSerializeBlock.

Referenced by executeCommandList().

◆ isDiscardEvents()

bool _pi_queue::isDiscardEvents ( ) const

◆ isInOrderQueue()

◆ isPriorityHigh()

bool _pi_queue::isPriorityHigh ( ) const

Definition at line 905 of file pi_level_zero.cpp.

References PI_EXT_ONEAPI_QUEUE_FLAG_PRIORITY_HIGH, and Properties.

◆ isPriorityLow()

bool _pi_queue::isPriorityLow ( ) const

Definition at line 901 of file pi_level_zero.cpp.

References PI_EXT_ONEAPI_QUEUE_FLAG_PRIORITY_LOW, and Properties.

◆ resetCommandList()

pi_result _pi_queue::resetCommandList ( pi_command_list_ptr_t  CommandList,
bool  MakeAvailable,
std::vector< pi_event > &  EventListToCleanup,
bool  CheckStatus = true 
)

Resets the command list and associated fence in the map and removes events from the command list.

Parameters
CommandListThe caller must verify that this command list and fence have been signalled.
MakeAvailableIf the reset command list should be made available, then MakeAvailable needs to be set to true.
EventListToCleanupThe EventListToCleanup contains a list of events from the command list which need to be cleaned up.
CheckStatusHint informing whether we need to check status of the events before removing them from the immediate command list. This is needed because immediate command lists are not associated with fences and in general status of the event needs to be checked.
Returns
PI_SUCCESS if successful, PI error code otherwise.

Definition at line 909 of file pi_level_zero.cpp.

References Context, Device, isDiscardEvents(), isInOrderQueue(), LastCommandEvent, ZE_CALL, ZE_CALL_NOCHECK, _pi_context::ZeCommandListCacheMutex, _pi_context::ZeComputeCommandListCache, _pi_context::ZeCopyCommandListCache, and _pi_device::ZeDevice.

Referenced by CleanupEventsInImmCmdLists(), _pi_context::getAvailableCommandList(), piextQueueCreate(), piQueueRelease(), and resetCommandLists().

◆ resetDiscardedEvent()

◆ signalEventFromCmdListIfLastEventDiscarded()

◆ sync_streams() [1/2]

◆ sync_streams() [2/2]

◆ synchronize()

◆ transfer_stream_wait_for_barrier_if_needed() [1/2]

void _pi_queue::transfer_stream_wait_for_barrier_if_needed ( CUstream  stream,
pi_uint32  stream_i 
)

Definition at line 406 of file pi_cuda.cpp.

References barrier_event_, and transfer_applied_barrier_.

Referenced by get_next_transfer_stream().

◆ transfer_stream_wait_for_barrier_if_needed() [2/2]

void _pi_queue::transfer_stream_wait_for_barrier_if_needed ( hipStream_t  stream,
pi_uint32  stream_i 
)

Definition at line 441 of file pi_hip.cpp.

References barrier_event_, and transfer_applied_barrier_.

◆ useCopyEngine()

bool _pi_queue::useCopyEngine ( bool  PreferCopyEngine = true) const

Member Data Documentation

◆ ActiveBarriers

active_barriers _pi_queue::ActiveBarriers

◆ barrier_event_ [1/2]

◆ barrier_event_ [2/2]

hipEvent_t _pi_queue::barrier_event_ = nullptr

Definition at line 395 of file pi_hip.hpp.

◆ barrier_mutex_

std::mutex _pi_queue::barrier_mutex_

◆ barrier_tmp_event_ [1/2]

CUevent _pi_queue::barrier_tmp_event_ = nullptr

◆ barrier_tmp_event_ [2/2]

hipEvent_t _pi_queue::barrier_tmp_event_ = nullptr

Definition at line 396 of file pi_hip.hpp.

◆ CmQueuePtr

cm_support::CmQueue* _pi_queue::CmQueuePtr = nullptr

Definition at line 115 of file pi_esimd_emulator.hpp.

Referenced by piQueueRelease().

◆ CommandListMap

◆ compute_applied_barrier_

std::vector< bool > _pi_queue::compute_applied_barrier_

◆ compute_stream_idx_

std::atomic_uint32_t _pi_queue::compute_stream_idx_

Definition at line 422 of file pi_cuda.hpp.

Referenced by can_reuse_stream(), get_next_compute_stream(), and sync_streams().

◆ compute_stream_mutex_

std::mutex _pi_queue::compute_stream_mutex_

Definition at line 433 of file pi_cuda.hpp.

Referenced by all_of(), for_each_stream(), get_next_compute_stream(), and sync_streams().

◆ compute_stream_sync_mutex_

std::mutex _pi_queue::compute_stream_sync_mutex_

Definition at line 432 of file pi_cuda.hpp.

Referenced by get_next_compute_stream(), and sync_streams().

◆ compute_streams_

std::vector< native_type > _pi_queue::compute_streams_

◆ ComputeCommandBatch

◆ ComputeQueueGroupsByTID

std::unordered_map<std::thread::id, pi_queue_group_t> _pi_queue::ComputeQueueGroupsByTID

◆ Context [1/2]

pi_context _pi_queue::Context = nullptr

Definition at line 114 of file pi_esimd_emulator.hpp.

Referenced by USMSharedMemoryAlloc::allocateImpl(), USMSharedReadOnlyMemoryAlloc::allocateImpl(), USMDeviceMemoryAlloc::allocateImpl(), USMHostMemoryAlloc::allocateImpl(), ContextReleaseHelper(), createCommandList(), createEventAndAssociateQueue(), USMMemoryAllocBase::deallocate(), enqueueMemCopyHelper(), enqueueMemCopyRectHelper(), enqueueMemFillHelper(), enqueueMemImageCommandHelper(), EventCreate(), _pi_buffer::free(), _pi_context::getAvailableCommandList(), _pi_buffer::getZeHandle(), IsDevicePointer(), piclProgramCreateWithSource(), piContextGetInfo(), piContextRelease(), piContextRetain(), piEnqueueEventsWait(), piEnqueueEventsWaitWithBarrier(), piEnqueueKernelLaunch(), piEnqueueMemBufferMap(), piEnqueueMemUnmap(), piEventCreate(), piEventReleaseInternal(), piextContextGetNativeHandle(), piextContextSetExtendedDeleter(), piextEnqueueDeviceGlobalVariableRead(), piextEnqueueDeviceGlobalVariableWrite(), piextEventCreateWithNativeHandle(), piextKernelCreateWithNativeHandle(), piextMemCreateWithNativeHandle(), piextProgramCreateWithNativeHandle(), piextQueueCreate(), piextQueueCreateWithNativeHandle(), piextUSMDeviceAlloc(), piextUSMEnqueueMemAdvise(), piextUSMEnqueueMemcpy(), piextUSMEnqueueMemcpy2D(), piextUSMEnqueuePrefetch(), piextUSMFree(), piextUSMGetMemAllocInfo(), piextUSMHostAlloc(), piextUSMSharedAlloc(), piMemBufferCreate(), piMemImageCreate(), piProgramCreate(), piProgramCreateWithBinary(), piProgramLink(), piQueueCreate(), piQueueGetInfo(), piSamplerCreate(), resetCommandList(), resetDiscardedEvent(), USMDeviceAllocImpl(), USMFreeHelper(), USMFreeImpl(), USMHostAllocImpl(), USMSharedAllocImpl(), ZeDeviceMemAllocHelper(), ZeHostMemAllocHelper(), and ZeMemFreeHelper().

◆ Context [2/2]

const pi_context _pi_queue::Context

Definition at line 640 of file pi_level_zero.hpp.

◆ context_

_pi_context * _pi_queue::context_

◆ CopyCommandBatch

◆ CopyQueueGroupsByTID

std::unordered_map<std::thread::id, pi_queue_group_t> _pi_queue::CopyQueueGroupsByTID

◆ default_num_compute_streams

static constexpr int _pi_queue::default_num_compute_streams = 128
staticconstexpr

Definition at line 402 of file pi_cuda.hpp.

Referenced by cuda_piQueueCreate(), and hip_piQueueCreate().

◆ default_num_transfer_streams

static constexpr int _pi_queue::default_num_transfer_streams = 64
staticconstexpr

Definition at line 403 of file pi_cuda.hpp.

Referenced by cuda_piQueueCreate(), and hip_piQueueCreate().

◆ delay_compute_

std::vector< bool > _pi_queue::delay_compute_

Definition at line 411 of file pi_cuda.hpp.

Referenced by get_next_compute_stream(), and sync_streams().

◆ Device

const pi_device _pi_queue::Device

Definition at line 645 of file pi_level_zero.hpp.

Referenced by _pi_queue(), USMSharedMemoryAlloc::allocateImpl(), USMSharedReadOnlyMemoryAlloc::allocateImpl(), USMDeviceMemoryAlloc::allocateImpl(), CaptureIndirectAccesses(), CleanupEventsInImmCmdLists(), _pi_ze_event_list_t::createAndRetainPiZeEventList(), createCommandList(), enqueueMemFillHelper(), enqueueMemImageCommandHelper(), eventOpenCommandList(), executeCommandList(), _pi_context::getAvailableCommandList(), getQueueGroup(), _pi_queue::pi_queue_group_t::getQueueIndex(), _pi_buffer::getZeHandle(), _pi_buffer::getZeHandlePtr(), pi_command_list_info_t::isCopy(), piDeviceGetInfo(), piDevicePartition(), piDeviceRelease(), piDeviceRetain(), piEnqueueEventsWait(), piEnqueueEventsWaitWithBarrier(), piEnqueueKernelLaunch(), piEnqueueMemBufferCopy(), piEnqueueMemBufferCopyRect(), piEnqueueMemBufferFill(), piEnqueueMemBufferMap(), piEnqueueMemBufferRead(), piEnqueueMemBufferReadRect(), piEnqueueMemBufferWrite(), piEnqueueMemBufferWriteRect(), piEnqueueMemUnmap(), piEventGetProfilingInfo(), piextDeviceCreateWithNativeHandle(), piextDeviceGetNativeHandle(), piextDeviceSelectBinary(), piextGetDeviceFunctionPointer(), piextMemCreateWithNativeHandle(), piextQueueCreate(), piextQueueCreateWithNativeHandle(), piextUSMDeviceAlloc(), piextUSMEnqueueMemAdvise(), piextUSMGetMemAllocInfo(), piextUSMSharedAlloc(), piGetDeviceAndHostTimer(), piKernelGetGroupInfo(), piKernelGetSubGroupInfo(), piMemImageCreate(), piProgramGetBuildInfo(), piQueueCreate(), piQueueFinish(), piQueueGetInfo(), piSamplerCreate(), resetCommandList(), resetCommandLists(), synchronize(), USMDeviceAllocImpl(), USMFreeHelper(), USMSharedAllocImpl(), and ZeDeviceMemAllocHelper().

◆ device_

◆ EventCaches

std::vector<std::list<pi_event> > _pi_queue::EventCaches {2}

◆ eventCount_

std::atomic_uint32_t _pi_queue::eventCount_

Definition at line 421 of file pi_cuda.hpp.

Referenced by get_next_event_id().

◆ flags_

unsigned int _pi_queue::flags_

Definition at line 428 of file pi_cuda.hpp.

Referenced by get_next_compute_stream(), and get_next_transfer_stream().

◆ has_ownership_

bool _pi_queue::has_ownership_

Definition at line 436 of file pi_cuda.hpp.

Referenced by backend_has_ownership().

◆ Healthy

bool _pi_queue::Healthy {true}

Definition at line 830 of file pi_level_zero.hpp.

Referenced by executeCommandList(), piQueueRelease(), and synchronize().

◆ KernelsToBeSubmitted

std::vector<pi_kernel> _pi_queue::KernelsToBeSubmitted

Definition at line 659 of file pi_level_zero.hpp.

Referenced by CaptureIndirectAccesses(), and piEnqueueKernelLaunch().

◆ last_sync_compute_streams_

unsigned int _pi_queue::last_sync_compute_streams_

Definition at line 426 of file pi_cuda.hpp.

Referenced by has_been_synchronized(), and sync_streams().

◆ last_sync_transfer_streams_

unsigned int _pi_queue::last_sync_transfer_streams_

Definition at line 427 of file pi_cuda.hpp.

Referenced by sync_streams().

◆ LastCommandEvent

◆ LastUsedCommandList

pi_command_list_ptr_t _pi_queue::LastUsedCommandList = CommandListMap.end()

◆ num_compute_streams_

unsigned int _pi_queue::num_compute_streams_

Definition at line 424 of file pi_cuda.hpp.

Referenced by all_of(), for_each_stream(), get_next_compute_stream(), and sync_streams().

◆ num_transfer_streams_

unsigned int _pi_queue::num_transfer_streams_

Definition at line 425 of file pi_cuda.hpp.

Referenced by all_of(), for_each_stream(), get_next_transfer_stream(), and sync_streams().

◆ OwnZeCommandQueue

bool _pi_queue::OwnZeCommandQueue

Definition at line 666 of file pi_level_zero.hpp.

Referenced by piQueueReleaseInternal().

◆ Properties

◆ properties_

◆ refCount_

std::atomic_uint32_t _pi_queue::refCount_

◆ RefCountExternal

pi_uint32 _pi_queue::RefCountExternal {1}

Definition at line 827 of file pi_level_zero.hpp.

Referenced by piQueueRelease(), piQueueRetain(), and _pi_event::reset().

◆ transfer_applied_barrier_

std::vector< bool > _pi_queue::transfer_applied_barrier_

◆ transfer_stream_idx_

std::atomic_uint32_t _pi_queue::transfer_stream_idx_

Definition at line 423 of file pi_cuda.hpp.

Referenced by get_next_transfer_stream(), and sync_streams().

◆ transfer_stream_mutex_

std::mutex _pi_queue::transfer_stream_mutex_

Definition at line 434 of file pi_cuda.hpp.

Referenced by all_of(), for_each_stream(), get_next_transfer_stream(), and sync_streams().

◆ transfer_streams_

std::vector< native_type > _pi_queue::transfer_streams_

Definition at line 406 of file pi_cuda.hpp.

Referenced by all_of(), for_each_stream(), get_next_transfer_stream(), and sync_streams().


The documentation for this struct was generated from the following files: