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

PI device mapping to a CUdevice. More...

#include <cuda/pi_cuda.hpp>

Collaboration diagram for _pi_device:

Classes

struct  queue_group_info_t
 

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, std::string ArgVersionStr)
 
 _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
 
std::string VersionStr
 
std::vector< queue_group_info_tQueueGroup
 
const ze_device_handle_t ZeDevice
 
std::vector< pi_deviceSubDevices
 
const pi_platform Platform
 
const 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_memory_access_properties_t > > ZeDeviceMemoryAccessProperties
 
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 82 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 95 of file pi_cuda.hpp.

◆ _pi_device() [2/4]

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

Definition at line 81 of file pi_esimd_emulator.hpp.

◆ _pi_device() [3/4]

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

Definition at line 83 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 457 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 86 of file pi_hip.hpp.

◆ get() [2/2]

◆ get_max_work_group_size()

int _pi_device::get_max_work_group_size ( ) const
inlinenoexcept

Definition at line 118 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 113 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 90 of file pi_hip.hpp.

◆ get_platform() [2/2]

pi_platform _pi_device::get_platform ( ) const
inlinenoexcept

Definition at line 102 of file pi_cuda.hpp.

◆ get_reference_count() [1/2]

pi_uint32 _pi_device::get_reference_count ( ) const
inlinenoexcept

Definition at line 88 of file pi_hip.hpp.

◆ get_reference_count() [2/2]

pi_uint32 _pi_device::get_reference_count ( ) const
inlinenoexcept

Definition at line 100 of file pi_cuda.hpp.

◆ hasCopyEngine()

bool _pi_device::hasCopyEngine ( ) const
inline

Definition at line 504 of file pi_level_zero.hpp.

Referenced by enqueueMemFillHelper().

◆ hasLinkCopyEngine()

bool _pi_device::hasLinkCopyEngine ( ) const
inline

Definition at line 499 of file pi_level_zero.hpp.

Referenced by enqueueMemFillHelper(), and piQueueCreate().

◆ hasMainCopyEngine()

bool _pi_device::hasMainCopyEngine ( ) const
inline

◆ initialize()

◆ isSubDevice()

bool _pi_device::isSubDevice ( )
inline

Definition at line 536 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 109 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 104 of file pi_cuda.hpp.

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

Member Data Documentation

◆ CmDevicePtr

cm_support::CmDevice* _pi_device::CmDevicePtr = nullptr

◆ Platform [1/2]

◆ Platform [2/2]

const pi_platform _pi_device::Platform

Definition at line 529 of file pi_level_zero.hpp.

◆ QueueGroup

std::vector<queue_group_info_t> _pi_device::QueueGroup

◆ RootDevice

const pi_device _pi_device::RootDevice

Definition at line 534 of file pi_level_zero.hpp.

Referenced by piDeviceGetInfo().

◆ SubDevices

std::vector<pi_device> _pi_device::SubDevices

Definition at line 524 of file pi_level_zero.hpp.

Referenced by piDeviceGetInfo(), and piDevicePartition().

◆ VersionStr

std::string _pi_device::VersionStr

Definition at line 90 of file pi_esimd_emulator.hpp.

◆ ZeDevice

◆ ZeDeviceCacheProperties

ZeCache<ZeStruct<ze_device_cache_properties_t> > _pi_device::ZeDeviceCacheProperties

Definition at line 547 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 540 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 541 of file pi_level_zero.hpp.

Referenced by initialize(), and piDeviceGetInfo().

◆ ZeDeviceMemoryAccessProperties

ZeCache<ZeStruct<ze_device_memory_access_properties_t> > _pi_device::ZeDeviceMemoryAccessProperties

Definition at line 546 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 544 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 542 of file pi_level_zero.hpp.

Referenced by initialize(), and piDeviceGetInfo().

◆ ZeDeviceProperties

ZeCache<ZeStruct<ze_device_properties_t> > _pi_device::ZeDeviceProperties

The documentation for this struct was generated from the following files:
_pi_device::queue_group_info_t::Size
@ Size
Definition: pi_level_zero.hpp:472