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

A PI platform stores all known PI devices, in the CUDA plugin this is just a vector of available devices since initialization is done when devices are used. More...

#include <cuda/pi_cuda.hpp>

Collaboration diagram for _pi_platform:

Public Member Functions

 _pi_platform ()=default
 
pi_result populateDeviceCacheIfNeeded ()
 
 _pi_platform (ze_driver_handle_t Driver)
 
pi_result initialize ()
 
pi_result populateDeviceCacheIfNeeded ()
 
pi_device getDeviceFromNativeHandle (ze_device_handle_t)
 

Public Attributes

std::vector< std::unique_ptr< _pi_device > > devices_
 
std::unique_ptr< _pi_devicePiDeviceCache
 
std::mutex PiDeviceCacheMutex
 
bool DeviceCachePopulated = false
 
std::string CmEmuVersion
 
ze_driver_handle_t ZeDriver
 
std::string ZeDriverVersion
 
std::string ZeDriverApiVersion
 
ze_api_version_t ZeApiVersion
 
std::unordered_map< std::string, uint32_t > zeDriverExtensionMap
 
std::vector< std::unique_ptr< _pi_device > > PiDevicesCache
 
pi_shared_mutex PiDevicesCacheMutex
 
std::list< pi_contextContexts
 
pi_shared_mutex ContextsMutex
 

Static Public Attributes

static CUevent evBase_ {nullptr}
 

Detailed Description

A PI platform stores all known PI devices, in the CUDA plugin this is just a vector of available devices since initialization is done when devices are used.

A PI platform stores all known PI devices, in the HIP plugin this is just a vector of available devices since initialization is done when devices are used.

Definition at line 72 of file pi_cuda.hpp.

Constructor & Destructor Documentation

◆ _pi_platform() [1/2]

_pi_platform::_pi_platform ( )
default

◆ _pi_platform() [2/2]

_pi_platform::_pi_platform ( ze_driver_handle_t  Driver)
inline

Definition at line 352 of file pi_level_zero.hpp.

Member Function Documentation

◆ getDeviceFromNativeHandle()

pi_device _pi_platform::getDeviceFromNativeHandle ( ze_device_handle_t  ZeDevice)

Definition at line 2203 of file pi_level_zero.cpp.

Referenced by piextMemCreateWithNativeHandle().

◆ initialize()

◆ populateDeviceCacheIfNeeded() [1/2]

pi_result _pi_platform::populateDeviceCacheIfNeeded ( )

◆ populateDeviceCacheIfNeeded() [2/2]

pi_result _pi_platform::populateDeviceCacheIfNeeded ( )

Member Data Documentation

◆ CmEmuVersion

std::string _pi_platform::CmEmuVersion

Definition at line 77 of file pi_esimd_emulator.hpp.

Referenced by piPlatformGetInfo(), and piPlatformsGet().

◆ Contexts

std::list<pi_context> _pi_platform::Contexts

◆ ContextsMutex

◆ DeviceCachePopulated

bool _pi_platform::DeviceCachePopulated = false

Definition at line 71 of file pi_esimd_emulator.hpp.

Referenced by populateDeviceCacheIfNeeded().

◆ devices_

std::vector< std::unique_ptr< _pi_device > > _pi_platform::devices_

Definition at line 74 of file pi_cuda.hpp.

◆ evBase_

CUevent _pi_platform::evBase_ {nullptr}
static

◆ PiDeviceCache

std::unique_ptr<_pi_device> _pi_platform::PiDeviceCache

Definition at line 69 of file pi_esimd_emulator.hpp.

Referenced by piDevicesGet(), and populateDeviceCacheIfNeeded().

◆ PiDeviceCacheMutex

std::mutex _pi_platform::PiDeviceCacheMutex

Definition at line 70 of file pi_esimd_emulator.hpp.

Referenced by populateDeviceCacheIfNeeded().

◆ PiDevicesCache

std::vector<std::unique_ptr<_pi_device> > _pi_platform::PiDevicesCache

Definition at line 369 of file pi_level_zero.hpp.

Referenced by piDevicesGet().

◆ PiDevicesCacheMutex

pi_shared_mutex _pi_platform::PiDevicesCacheMutex

Definition at line 370 of file pi_level_zero.hpp.

Referenced by piDevicesGet().

◆ ZeApiVersion

ze_api_version_t _pi_platform::ZeApiVersion

Definition at line 363 of file pi_level_zero.hpp.

Referenced by piSamplerCreate().

◆ ZeDriver

◆ ZeDriverApiVersion

std::string _pi_platform::ZeDriverApiVersion

Definition at line 362 of file pi_level_zero.hpp.

Referenced by piDeviceGetInfo(), and piPlatformGetInfo().

◆ zeDriverExtensionMap

std::unordered_map<std::string, uint32_t> _pi_platform::zeDriverExtensionMap

Definition at line 366 of file pi_level_zero.hpp.

◆ ZeDriverVersion

std::string _pi_platform::ZeDriverVersion

Definition at line 361 of file pi_level_zero.hpp.

Referenced by piDeviceGetInfo(), and piPlatformGetInfo().


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