DPC++ Runtime
Runtime libraries for oneAPI Data Parallel C++
_pi_device Struct Reference

PI device mapping to a CUdevice. More...

#include <cuda/pi_cuda.hpp>

Collaboration diagram for _pi_device:

Public Member Functions

 _pi_device (native_type cuDevice, pi_platform platform)
 
native_type get () const noexcept
 
pi_uint32 get_reference_count () const noexcept
 
pi_platform get_platform () const noexcept
 
void save_max_work_item_sizes (size_t size, size_t *save_max_work_item_sizes) noexcept
 
void save_max_work_group_size (int value) noexcept
 
void get_max_work_item_sizes (size_t ret_size, size_t *ret_max_work_item_sizes) const noexcept
 
int get_max_work_group_size () const noexcept
 
 _pi_device (pi_platform ArgPlt, cm_support::CmDevice *ArgCmDev)
 
 _pi_device (native_type cuDevice, pi_platform platform)
 
native_type get () const noexcept
 
pi_uint32 get_reference_count () const noexcept
 
pi_platform get_platform () const noexcept
 
 _pi_device (ze_device_handle_t Device, pi_platform Plt, pi_device ParentDevice=nullptr)
 
bool hasMainCopyEngine () const
 
bool hasLinkCopyEngine () const
 
bool hasCopyEngine () const
 
pi_result initialize (int SubSubDeviceOrdinal=-1, int SubSubDeviceIndex=-1)
 
bool isSubDevice ()
 

Public Attributes

pi_platform Platform
 
cm_support::CmDevice * CmDevicePtr = nullptr
 
int32_t ZeComputeQueueGroupIndex
 
int32_t ZeMainCopyQueueGroupIndex
 
int32_t ZeLinkCopyQueueGroupIndex
 
int32_t ZeComputeEngineIndex = 0
 
ZeStruct< ze_command_queue_group_properties_t > ZeComputeQueueGroupProperties
 
ZeStruct< ze_command_queue_group_properties_t > ZeMainCopyQueueGroupProperties
 
ZeStruct< ze_command_queue_group_properties_t > ZeLinkCopyQueueGroupProperties
 
ze_device_handle_t ZeDevice
 
std::vector< pi_deviceSubDevices
 
pi_device RootDevice
 
ZeCache< ZeStruct< ze_device_properties_t > > ZeDeviceProperties
 
ZeCache< ZeStruct< ze_device_compute_properties_t > > ZeDeviceComputeProperties
 
ZeCache< ZeStruct< ze_device_image_properties_t > > ZeDeviceImageProperties
 
ZeCache< ZeStruct< ze_device_module_properties_t > > ZeDeviceModuleProperties
 
ZeCache< std::vector< ZeStruct< ze_device_memory_properties_t > > > ZeDeviceMemoryProperties
 
ZeCache< ZeStruct< ze_device_cache_properties_t > > ZeDeviceCacheProperties
 

Detailed Description

PI device mapping to a CUdevice.

PI device mapping to a hipDevice_t.

Includes an observer pointer to the platform, and implements the reference counting semantics since CUDA objects are not refcounted.

Includes an observer pointer to the platform, and implements the reference counting semantics since HIP objects are not refcounted.

Definition at line 71 of file pi_cuda.hpp.

Constructor & Destructor Documentation

◆ _pi_device() [1/4]

_pi_device::_pi_device ( native_type  cuDevice,
pi_platform  platform 
)
inline

Definition at line 84 of file pi_cuda.hpp.

◆ _pi_device() [2/4]

_pi_device::_pi_device ( pi_platform  ArgPlt,
cm_support::CmDevice *  ArgCmDev 
)
inline

Definition at line 64 of file pi_esimd_emulator.hpp.

◆ _pi_device() [3/4]

_pi_device::_pi_device ( native_type  cuDevice,
pi_platform  platform 
)
inline

Definition at line 76 of file pi_hip.hpp.

◆ _pi_device() [4/4]

_pi_device::_pi_device ( ze_device_handle_t  Device,
pi_platform  Plt,
pi_device  ParentDevice = nullptr 
)
inline

Definition at line 315 of file pi_level_zero.hpp.

References USMMemoryAllocBase::Device.

Member Function Documentation

◆ get() [1/2]

native_type _pi_device::get ( ) const
inlinenoexcept

Definition at line 79 of file pi_hip.hpp.

◆ get() [2/2]

native_type _pi_device::get ( ) const
inlinenoexcept

◆ get_max_work_group_size()

int _pi_device::get_max_work_group_size ( ) const
inlinenoexcept

Definition at line 107 of file pi_cuda.hpp.

Referenced by cuda_piEnqueueKernelLaunch().

◆ get_max_work_item_sizes()

void _pi_device::get_max_work_item_sizes ( size_t  ret_size,
size_t *  ret_max_work_item_sizes 
) const
inlinenoexcept

Definition at line 102 of file pi_cuda.hpp.

References cl::sycl::detail::memcpy().

Referenced by cuda_piEnqueueKernelLaunch().

◆ get_platform() [1/2]

pi_platform _pi_device::get_platform ( ) const
inlinenoexcept

Definition at line 83 of file pi_hip.hpp.

◆ get_platform() [2/2]

pi_platform _pi_device::get_platform ( ) const
inlinenoexcept

Definition at line 91 of file pi_cuda.hpp.

◆ get_reference_count() [1/2]

pi_uint32 _pi_device::get_reference_count ( ) const
inlinenoexcept

Definition at line 81 of file pi_hip.hpp.

◆ get_reference_count() [2/2]

pi_uint32 _pi_device::get_reference_count ( ) const
inlinenoexcept

Definition at line 89 of file pi_cuda.hpp.

◆ hasCopyEngine()

bool _pi_device::hasCopyEngine ( ) const
inline

◆ hasLinkCopyEngine()

bool _pi_device::hasLinkCopyEngine ( ) const
inline

Definition at line 345 of file pi_level_zero.hpp.

Referenced by piQueueCreate().

◆ hasMainCopyEngine()

bool _pi_device::hasMainCopyEngine ( ) const
inline

Definition at line 342 of file pi_level_zero.hpp.

Referenced by _pi_queue::getZeCopyCommandQueue(), and piQueueCreate().

◆ initialize()

◆ isSubDevice()

bool _pi_device::isSubDevice ( )
inline

Definition at line 373 of file pi_level_zero.hpp.

Referenced by piDeviceGetInfo(), piDeviceRelease(), and piDeviceRetain().

◆ save_max_work_group_size()

void _pi_device::save_max_work_group_size ( int  value)
inlinenoexcept

Definition at line 98 of file pi_cuda.hpp.

◆ save_max_work_item_sizes()

void _pi_device::save_max_work_item_sizes ( size_t  size,
size_t *  save_max_work_item_sizes 
)
inlinenoexcept

Definition at line 93 of file pi_cuda.hpp.

References cl::sycl::detail::memcpy().

Member Data Documentation

◆ CmDevicePtr

cm_support::CmDevice* _pi_device::CmDevicePtr = nullptr

◆ Platform

◆ RootDevice

pi_device _pi_device::RootDevice

Definition at line 372 of file pi_level_zero.hpp.

◆ SubDevices

std::vector<pi_device> _pi_device::SubDevices

Definition at line 366 of file pi_level_zero.hpp.

Referenced by piDeviceGetInfo(), and piDevicePartition().

◆ ZeComputeEngineIndex

int32_t _pi_device::ZeComputeEngineIndex = 0

Definition at line 334 of file pi_level_zero.hpp.

Referenced by initialize(), _pi_context::initialize(), and piQueueCreate().

◆ ZeComputeQueueGroupIndex

int32_t _pi_device::ZeComputeQueueGroupIndex

Definition at line 329 of file pi_level_zero.hpp.

Referenced by initialize(), _pi_context::initialize(), and piQueueCreate().

◆ ZeComputeQueueGroupProperties

ZeStruct<ze_command_queue_group_properties_t> _pi_device::ZeComputeQueueGroupProperties

Definition at line 337 of file pi_level_zero.hpp.

Referenced by enqueueMemFillHelper(), and initialize().

◆ ZeDevice

◆ ZeDeviceCacheProperties

ZeCache<ZeStruct<ze_device_cache_properties_t> > _pi_device::ZeDeviceCacheProperties

Definition at line 382 of file pi_level_zero.hpp.

Referenced by initialize(), and piDeviceGetInfo().

◆ ZeDeviceComputeProperties

ZeCache<ZeStruct<ze_device_compute_properties_t> > _pi_device::ZeDeviceComputeProperties

Definition at line 377 of file pi_level_zero.hpp.

Referenced by initialize(), piDeviceGetInfo(), and piKernelGetGroupInfo().

◆ ZeDeviceImageProperties

ZeCache<ZeStruct<ze_device_image_properties_t> > _pi_device::ZeDeviceImageProperties

Definition at line 378 of file pi_level_zero.hpp.

Referenced by initialize(), and piDeviceGetInfo().

◆ ZeDeviceMemoryProperties

ZeCache<std::vector<ZeStruct<ze_device_memory_properties_t> > > _pi_device::ZeDeviceMemoryProperties

Definition at line 381 of file pi_level_zero.hpp.

Referenced by initialize(), and piDeviceGetInfo().

◆ ZeDeviceModuleProperties

ZeCache<ZeStruct<ze_device_module_properties_t> > _pi_device::ZeDeviceModuleProperties

Definition at line 379 of file pi_level_zero.hpp.

Referenced by initialize(), and piDeviceGetInfo().

◆ ZeDeviceProperties

ZeCache<ZeStruct<ze_device_properties_t> > _pi_device::ZeDeviceProperties

◆ ZeLinkCopyQueueGroupIndex

int32_t _pi_device::ZeLinkCopyQueueGroupIndex

Definition at line 331 of file pi_level_zero.hpp.

Referenced by _pi_queue::getZeCopyCommandQueue(), initialize(), and piQueueCreate().

◆ ZeLinkCopyQueueGroupProperties

ZeStruct<ze_command_queue_group_properties_t> _pi_device::ZeLinkCopyQueueGroupProperties

Definition at line 339 of file pi_level_zero.hpp.

Referenced by initialize(), and piQueueCreate().

◆ ZeMainCopyQueueGroupIndex

int32_t _pi_device::ZeMainCopyQueueGroupIndex

Definition at line 330 of file pi_level_zero.hpp.

Referenced by _pi_queue::getZeCopyCommandQueue(), initialize(), and piQueueCreate().

◆ ZeMainCopyQueueGroupProperties

ZeStruct<ze_command_queue_group_properties_t> _pi_device::ZeMainCopyQueueGroupProperties

Definition at line 338 of file pi_level_zero.hpp.

Referenced by enqueueMemFillHelper(), and initialize().


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