Implementation of PI Program on CUDA Module object. More...
#include <cuda/pi_cuda.hpp>
Public Types | |
using | native_type = CUmodule |
using | native_type = hipModule_t |
Public Member Functions | |
_pi_program (pi_context ctxt) | |
~_pi_program () | |
pi_result | set_metadata (const pi_device_binary_property *metadata, size_t length) |
pi_result | set_binary (const char *binary, size_t binarySizeInBytes) |
pi_result | build_program (const char *build_options) |
pi_context | get_context () const |
native_type | get () const noexcept |
pi_uint32 | increment_reference_count () noexcept |
pi_uint32 | decrement_reference_count () noexcept |
pi_uint32 | get_reference_count () const noexcept |
_pi_program () | |
_pi_program (pi_context ctxt) | |
~_pi_program () | |
pi_result | set_binary (const char *binary, size_t binarySizeInBytes) |
pi_result | build_program (const char *build_options) |
pi_context | get_context () const |
native_type | get () const noexcept |
pi_uint32 | increment_reference_count () noexcept |
pi_uint32 | decrement_reference_count () noexcept |
pi_uint32 | get_reference_count () const noexcept |
Public Attributes | |
native_type | module_ |
const char * | binary_ |
size_t | binarySizeInBytes_ |
std::atomic_uint32_t | refCount_ |
_pi_context * | context_ |
std::unordered_map< std::string, std::tuple< uint32_t, uint32_t, uint32_t > > | kernelReqdWorkGroupSizeMD_ |
std::unordered_map< std::string, std::string > | globalIDMD_ |
char | errorLog_ [MAX_LOG_SIZE] |
char | infoLog_ [MAX_LOG_SIZE] |
std::string | buildOptions_ |
pi_program_build_status | buildStatus_ = PI_PROGRAM_BUILD_STATUS_NONE |
pi_context | Context |
Static Public Attributes | |
constexpr static size_t | MAX_LOG_SIZE = 8192u |
Implementation of PI Program on CUDA Module object.
Implementation of PI Program on HIP Module object.
Definition at line 761 of file pi_cuda.hpp.
using _pi_program::native_type = hipModule_t |
Definition at line 729 of file pi_hip.hpp.
using _pi_program::native_type = CUmodule |
Definition at line 762 of file pi_cuda.hpp.
_pi_program::_pi_program | ( | pi_context | ctxt | ) |
Definition at line 772 of file pi_cuda.cpp.
_pi_program::~_pi_program | ( | ) |
Definition at line 778 of file pi_cuda.cpp.
References context_, and cuda_piContextRelease().
|
inline |
Definition at line 211 of file pi_esimd_emulator.hpp.
_pi_program::_pi_program | ( | pi_context | ctxt | ) |
_pi_program::~_pi_program | ( | ) |
pi_result _pi_program::build_program | ( | const char * | build_options | ) |
pi_result _pi_program::build_program | ( | const char * | build_options | ) |
Definition at line 837 of file pi_cuda.cpp.
References binary_, buildOptions_, buildStatus_, errorLog_, infoLog_, MAX_LOG_SIZE, module_, PI_PROGRAM_BUILD_STATUS_ERROR, and PI_PROGRAM_BUILD_STATUS_SUCCESS.
Referenced by cuda_piProgramBuild(), cuda_piProgramCompile(), hip_piProgramBuild(), and hip_piProgramCompile().
|
inlinenoexcept |
Definition at line 755 of file pi_hip.hpp.
References refCount_.
|
inlinenoexcept |
Definition at line 796 of file pi_cuda.hpp.
References refCount_.
Referenced by cuda_piProgramRelease(), and hip_piProgramRelease().
|
inlinenoexcept |
Definition at line 751 of file pi_hip.hpp.
References module_.
|
inlinenoexcept |
Definition at line 792 of file pi_cuda.hpp.
References module_.
Referenced by cuda_piextEnqueueDeviceGlobalVariableRead(), cuda_piextEnqueueDeviceGlobalVariableWrite(), cuda_piextGetDeviceFunctionPointer(), cuda_piextProgramGetNativeHandle(), cuda_piKernelCreate(), cuda_piProgramRelease(), hip_piextGetDeviceFunctionPointer(), hip_piextProgramGetNativeHandle(), hip_piKernelCreate(), and hip_piProgramRelease().
|
inline |
Definition at line 749 of file pi_hip.hpp.
References context_.
|
inline |
Definition at line 790 of file pi_cuda.hpp.
References context_.
Referenced by cuda_piextGetDeviceFunctionPointer(), cuda_piKernelCreate(), cuda_piProgramBuild(), cuda_piProgramCompile(), cuda_piProgramRelease(), hip_piextGetDeviceFunctionPointer(), hip_piKernelCreate(), hip_piProgramBuild(), hip_piProgramCompile(), and hip_piProgramRelease().
|
inlinenoexcept |
Definition at line 757 of file pi_hip.hpp.
References refCount_.
|
inlinenoexcept |
Definition at line 798 of file pi_cuda.hpp.
References refCount_.
Referenced by cuda_piProgramGetInfo(), cuda_piProgramRelease(), cuda_piProgramRetain(), hip_piProgramGetInfo(), hip_piProgramRelease(), and hip_piProgramRetain().
|
inlinenoexcept |
Definition at line 753 of file pi_hip.hpp.
References refCount_.
|
inlinenoexcept |
Definition at line 794 of file pi_cuda.hpp.
References refCount_.
Referenced by cuda_piProgramRetain(), and hip_piProgramRetain().
pi_result _pi_program::set_binary | ( | const char * | binary, |
size_t | binarySizeInBytes | ||
) |
pi_result _pi_program::set_binary | ( | const char * | binary, |
size_t | binarySizeInBytes | ||
) |
Definition at line 829 of file pi_cuda.cpp.
References binary_, and binarySizeInBytes_.
pi_result _pi_program::set_metadata | ( | const pi_device_binary_property * | metadata, |
size_t | length | ||
) |
Definition at line 789 of file pi_cuda.cpp.
References __SYCL_PI_PROGRAM_METADATA_GLOBAL_ID_MAPPING, __SYCL_PI_PROGRAM_METADATA_TAG_REQD_WORK_GROUP_SIZE, globalIDMD_, kernelReqdWorkGroupSizeMD_, sycl::_V1::detail::make_tuple(), sycl::_V1::detail::memcpy(), _pi_device_binary_property_struct::Name, splitMetadataName(), _pi_device_binary_property_struct::ValAddr, and _pi_device_binary_property_struct::ValSize.
const char * _pi_program::binary_ |
Definition at line 764 of file pi_cuda.hpp.
Referenced by build_program(), cuda_piProgramGetInfo(), cuda_piProgramLink(), hip_piProgramGetInfo(), and set_binary().
size_t _pi_program::binarySizeInBytes_ |
Definition at line 765 of file pi_cuda.hpp.
Referenced by cuda_piProgramGetInfo(), cuda_piProgramLink(), hip_piProgramGetInfo(), and set_binary().
std::string _pi_program::buildOptions_ |
Definition at line 777 of file pi_cuda.hpp.
Referenced by build_program(), cuda_piProgramGetBuildInfo(), and hip_piProgramGetBuildInfo().
pi_program_build_status _pi_program::buildStatus_ = PI_PROGRAM_BUILD_STATUS_NONE |
Definition at line 778 of file pi_cuda.hpp.
Referenced by build_program(), cuda_piProgramGetBuildInfo(), and hip_piProgramGetBuildInfo().
pi_context _pi_program::Context |
Definition at line 214 of file pi_esimd_emulator.hpp.
_pi_context * _pi_program::context_ |
Definition at line 767 of file pi_cuda.hpp.
Referenced by cuda_piProgramGetInfo(), get_context(), hip_piProgramGetInfo(), and ~_pi_program().
char _pi_program::errorLog_ |
Definition at line 776 of file pi_cuda.hpp.
Referenced by build_program().
std::unordered_map<std::string, std::string> _pi_program::globalIDMD_ |
Definition at line 772 of file pi_cuda.hpp.
Referenced by cuda_piextEnqueueDeviceGlobalVariableRead(), cuda_piextEnqueueDeviceGlobalVariableWrite(), and set_metadata().
char _pi_program::infoLog_ |
Definition at line 776 of file pi_cuda.hpp.
Referenced by build_program(), cuda_piProgramGetBuildInfo(), and hip_piProgramGetBuildInfo().
std::unordered_map<std::string, std::tuple<uint32_t, uint32_t, uint32_t> > _pi_program::kernelReqdWorkGroupSizeMD_ |
Definition at line 771 of file pi_cuda.hpp.
Referenced by set_metadata().
|
staticconstexpr |
Definition at line 774 of file pi_cuda.hpp.
Referenced by build_program(), cuda_piProgramGetBuildInfo(), and hip_piProgramGetBuildInfo().
native_type _pi_program::module_ |
Definition at line 763 of file pi_cuda.hpp.
Referenced by build_program(), and get().
std::atomic_uint32_t _pi_program::refCount_ |
Definition at line 766 of file pi_cuda.hpp.
Referenced by decrement_reference_count(), get_reference_count(), and increment_reference_count().