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>
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_device > | PiDeviceCache |
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_context > | Contexts |
pi_shared_mutex | ContextsMutex |
Static Public Attributes | |
static CUevent | evBase_ {nullptr} |
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.
|
default |
|
inline |
Definition at line 352 of file pi_level_zero.hpp.
pi_device _pi_platform::getDeviceFromNativeHandle | ( | ze_device_handle_t | ZeDevice | ) |
Definition at line 2203 of file pi_level_zero.cpp.
Referenced by piextMemCreateWithNativeHandle().
pi_result _pi_platform::initialize | ( | ) |
Definition at line 1936 of file pi_level_zero.cpp.
References PiDriverGlobalOffsetExtensionFound, PiDriverModuleProgramExtensionFound, ZeUSMImportExtension::setZeUSMImport(), ZE_CALL, and ZeUSMImport.
Referenced by piPlatformsGet().
pi_result _pi_platform::populateDeviceCacheIfNeeded | ( | ) |
Definition at line 524 of file pi_esimd_emulator.cpp.
References Device, DeviceCachePopulated, PiDeviceCache, PiDeviceCacheMutex, and PiTrace().
Referenced by piDeviceGetInfo(), piDevicePartition(), and piDevicesGet().
pi_result _pi_platform::populateDeviceCacheIfNeeded | ( | ) |
std::string _pi_platform::CmEmuVersion |
Definition at line 77 of file pi_esimd_emulator.hpp.
Referenced by piPlatformGetInfo(), and piPlatformsGet().
std::list<pi_context> _pi_platform::Contexts |
Definition at line 385 of file pi_level_zero.hpp.
Referenced by _pi_queue::CaptureIndirectAccesses(), ContextReleaseHelper(), and piContextCreate().
pi_shared_mutex _pi_platform::ContextsMutex |
Definition at line 386 of file pi_level_zero.hpp.
Referenced by _pi_queue::executeCommandList(), _pi_buffer::free(), piContextCreate(), piContextRelease(), piEnqueueKernelLaunch(), piextMemCreateWithNativeHandle(), piextUSMDeviceAlloc(), piextUSMFree(), piextUSMHostAlloc(), piextUSMSharedAlloc(), piKernelRelease(), ZeDeviceMemAllocHelper(), ZeHostMemAllocHelper(), and ZeMemFreeHelper().
bool _pi_platform::DeviceCachePopulated = false |
Definition at line 71 of file pi_esimd_emulator.hpp.
Referenced by populateDeviceCacheIfNeeded().
std::vector< std::unique_ptr< _pi_device > > _pi_platform::devices_ |
Definition at line 74 of file pi_cuda.hpp.
|
static |
Definition at line 73 of file pi_cuda.hpp.
Referenced by cuda_piContextCreate(), _pi_event::get_end_time(), _pi_event::get_queued_time(), and _pi_event::get_start_time().
std::unique_ptr<_pi_device> _pi_platform::PiDeviceCache |
Definition at line 69 of file pi_esimd_emulator.hpp.
Referenced by piDevicesGet(), and populateDeviceCacheIfNeeded().
std::mutex _pi_platform::PiDeviceCacheMutex |
Definition at line 70 of file pi_esimd_emulator.hpp.
Referenced by populateDeviceCacheIfNeeded().
std::vector<std::unique_ptr<_pi_device> > _pi_platform::PiDevicesCache |
Definition at line 369 of file pi_level_zero.hpp.
Referenced by piDevicesGet().
pi_shared_mutex _pi_platform::PiDevicesCacheMutex |
Definition at line 370 of file pi_level_zero.hpp.
Referenced by piDevicesGet().
ze_api_version_t _pi_platform::ZeApiVersion |
Definition at line 363 of file pi_level_zero.hpp.
Referenced by piSamplerCreate().
ze_driver_handle_t _pi_platform::ZeDriver |
Definition at line 358 of file pi_level_zero.hpp.
Referenced by _pi_buffer::free(), piContextCreate(), piextPlatformGetNativeHandle(), piMemBufferCreate(), and ZeUSMImportExtension::setZeUSMImport().
std::string _pi_platform::ZeDriverApiVersion |
Definition at line 362 of file pi_level_zero.hpp.
Referenced by piDeviceGetInfo(), and piPlatformGetInfo().
std::unordered_map<std::string, uint32_t> _pi_platform::zeDriverExtensionMap |
Definition at line 366 of file pi_level_zero.hpp.
std::string _pi_platform::ZeDriverVersion |
Definition at line 361 of file pi_level_zero.hpp.
Referenced by piDeviceGetInfo(), and piPlatformGetInfo().