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)
 
enum EventsScope eventsScope ()
 
bool useImmediateCommandLists ()
 
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
 
bool ImmCommandListsPreferred
 
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 83 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 96 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 82 of file pi_esimd_emulator.hpp.

◆ _pi_device() [3/4]

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

Definition at line 85 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 483 of file pi_level_zero.hpp.

References USMMemoryAllocBase::Device.

Member Function Documentation

◆ eventsScope()

◆ get() [1/2]

native_type _pi_device::get ( ) const
inlinenoexcept

Definition at line 88 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 119 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 114 of file pi_cuda.hpp.

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

Referenced by cuda_piEnqueueKernelLaunch().

◆ get_platform() [1/2]

pi_platform _pi_device::get_platform ( ) const
inlinenoexcept

Definition at line 92 of file pi_hip.hpp.

◆ get_platform() [2/2]

pi_platform _pi_device::get_platform ( ) const
inlinenoexcept

Definition at line 103 of file pi_cuda.hpp.

◆ get_reference_count() [1/2]

pi_uint32 _pi_device::get_reference_count ( ) const
inlinenoexcept

Definition at line 90 of file pi_hip.hpp.

◆ get_reference_count() [2/2]

pi_uint32 _pi_device::get_reference_count ( ) const
inlinenoexcept

Definition at line 101 of file pi_cuda.hpp.

◆ hasCopyEngine()

bool _pi_device::hasCopyEngine ( ) const
inline

Definition at line 531 of file pi_level_zero.hpp.

Referenced by enqueueMemFillHelper().

◆ hasLinkCopyEngine()

bool _pi_device::hasLinkCopyEngine ( ) const
inline

Definition at line 526 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 573 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 110 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 105 of file pi_cuda.hpp.

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

◆ useImmediateCommandLists()

Member Data Documentation

◆ CmDevicePtr

cm_support::CmDevice* _pi_device::CmDevicePtr = nullptr

◆ ImmCommandListsPreferred

bool _pi_device::ImmCommandListsPreferred

Definition at line 565 of file pi_level_zero.hpp.

Referenced by initialize(), and useImmediateCommandLists().

◆ Platform [1/2]

◆ Platform [2/2]

const pi_platform _pi_device::Platform

Definition at line 556 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 561 of file pi_level_zero.hpp.

Referenced by _pi_context::isValidDevice(), and piDeviceGetInfo().

◆ SubDevices

std::vector<pi_device> _pi_device::SubDevices

Definition at line 551 of file pi_level_zero.hpp.

Referenced by _pi_context::initialize(), piDeviceGetInfo(), and piDevicePartition().

◆ VersionStr

std::string _pi_device::VersionStr

Definition at line 91 of file pi_esimd_emulator.hpp.

◆ ZeDevice

◆ ZeDeviceCacheProperties

ZeCache<ZeStruct<ze_device_cache_properties_t> > _pi_device::ZeDeviceCacheProperties

Definition at line 584 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 577 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 578 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 583 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 581 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 579 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:499