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

Implementation of PI Program on CUDA Module object. More...

#include <cuda/pi_cuda.hpp>

Collaboration diagram for _pi_program:

Classes

class  SpecConstantShim
 

Public Types

enum  state {
  IL, Native, Object, Exe,
  Invalid
}
 
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
 
 _pi_program (state St, pi_context Context, const void *Input, size_t Length)
 
 _pi_program (state St, pi_context Context, ze_module_handle_t ZeModule, ze_module_build_log_handle_t ZeBuildLog)
 
 _pi_program (state St, pi_context Context, ze_module_handle_t ZeModule, bool OwnZeModule)
 
 _pi_program (state St, pi_context Context, const std::string &ErrorMessage)
 
 ~_pi_program ()
 

Public Attributes

native_type module_
 
const charbinary_
 
size_t binarySizeInBytes_
 
std::atomic_uint32_t refCount_
 
_pi_contextcontext_
 
std::unordered_map< std::string, std::tuple< uint32_t, uint32_t, uint32_t > > kernelReqdWorkGroupSizeMD_
 
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
 
const pi_context Context
 
const bool OwnZeModule
 
const std::string ErrorMessage
 
state State
 
std::unique_ptr< uint8_t[]> Code
 
size_t CodeLength
 
std::unordered_map< uint32_t, const void * > SpecConstants
 
std::string BuildFlags
 
ze_module_handle_t ZeModule
 
ze_module_build_log_handle_t ZeBuildLog
 

Static Public Attributes

constexpr static size_t MAX_LOG_SIZE = 8192u
 

Detailed Description

Implementation of PI Program on CUDA Module object.

Implementation of PI Program on HIP Module object.

Definition at line 719 of file pi_cuda.hpp.

Member Typedef Documentation

◆ native_type [1/2]

using _pi_program::native_type = hipModule_t

Definition at line 685 of file pi_hip.hpp.

◆ native_type [2/2]

Definition at line 720 of file pi_cuda.hpp.

Member Enumeration Documentation

◆ state

Enumerator
IL 
Native 
Object 
Exe 
Invalid 

Definition at line 1414 of file pi_level_zero.hpp.

Constructor & Destructor Documentation

◆ _pi_program() [1/7]

_pi_program::_pi_program ( pi_context  ctxt)

Definition at line 629 of file pi_cuda.cpp.

◆ ~_pi_program() [1/3]

_pi_program::~_pi_program ( )

Definition at line 635 of file pi_cuda.cpp.

References context_, and cuda_piContextRelease().

◆ _pi_program() [2/7]

_pi_program::_pi_program ( )
inline

Definition at line 211 of file pi_esimd_emulator.hpp.

◆ _pi_program() [3/7]

_pi_program::_pi_program ( pi_context  ctxt)

◆ ~_pi_program() [2/3]

_pi_program::~_pi_program ( )

◆ _pi_program() [4/7]

_pi_program::_pi_program ( state  St,
pi_context  Context,
const void *  Input,
size_t  Length 
)
inline

Definition at line 1465 of file pi_level_zero.hpp.

References USMMemoryAllocBase::Context.

◆ _pi_program() [5/7]

_pi_program::_pi_program ( state  St,
pi_context  Context,
ze_module_handle_t  ZeModule,
ze_module_build_log_handle_t  ZeBuildLog 
)
inline

Definition at line 1473 of file pi_level_zero.hpp.

References USMMemoryAllocBase::Context.

◆ _pi_program() [6/7]

_pi_program::_pi_program ( state  St,
pi_context  Context,
ze_module_handle_t  ZeModule,
bool  OwnZeModule 
)
inline

Definition at line 1479 of file pi_level_zero.hpp.

References USMMemoryAllocBase::Context.

◆ _pi_program() [7/7]

_pi_program::_pi_program ( state  St,
pi_context  Context,
const std::string &  ErrorMessage 
)
inline

Definition at line 1485 of file pi_level_zero.hpp.

References USMMemoryAllocBase::Context.

◆ ~_pi_program() [3/3]

_pi_program::~_pi_program ( )

Member Function Documentation

◆ build_program() [1/2]

pi_result _pi_program::build_program ( const char build_options)

◆ build_program() [2/2]

◆ decrement_reference_count() [1/2]

pi_uint32 _pi_program::decrement_reference_count ( )
inlinenoexcept

Definition at line 711 of file pi_hip.hpp.

References refCount_.

◆ decrement_reference_count() [2/2]

pi_uint32 _pi_program::decrement_reference_count ( )
inlinenoexcept

Definition at line 753 of file pi_cuda.hpp.

References refCount_.

Referenced by cuda_piProgramRelease(), and hip_piProgramRelease().

◆ get() [1/2]

native_type _pi_program::get ( ) const
inlinenoexcept

Definition at line 707 of file pi_hip.hpp.

References module_.

◆ get() [2/2]

◆ get_context() [1/2]

pi_context _pi_program::get_context ( ) const
inline

Definition at line 705 of file pi_hip.hpp.

References context_.

◆ get_context() [2/2]

◆ get_reference_count() [1/2]

pi_uint32 _pi_program::get_reference_count ( ) const
inlinenoexcept

Definition at line 713 of file pi_hip.hpp.

References refCount_.

◆ get_reference_count() [2/2]

pi_uint32 _pi_program::get_reference_count ( ) const
inlinenoexcept

◆ increment_reference_count() [1/2]

pi_uint32 _pi_program::increment_reference_count ( )
inlinenoexcept

Definition at line 709 of file pi_hip.hpp.

References refCount_.

◆ increment_reference_count() [2/2]

pi_uint32 _pi_program::increment_reference_count ( )
inlinenoexcept

Definition at line 751 of file pi_cuda.hpp.

References refCount_.

Referenced by cuda_piProgramRetain(), and hip_piProgramRetain().

◆ set_binary() [1/2]

pi_result _pi_program::set_binary ( const char binary,
size_t  binarySizeInBytes 
)

◆ set_binary() [2/2]

pi_result _pi_program::set_binary ( const char binary,
size_t  binarySizeInBytes 
)

Definition at line 677 of file pi_cuda.cpp.

References binary_, binarySizeInBytes_, and sycl::_V1::length().

◆ set_metadata()

Member Data Documentation

◆ binary_

const char * _pi_program::binary_

◆ binarySizeInBytes_

size_t _pi_program::binarySizeInBytes_

◆ BuildFlags

std::string _pi_program::BuildFlags

Definition at line 1516 of file pi_level_zero.hpp.

Referenced by piProgramCompile(), and piProgramLink().

◆ buildOptions_

std::string _pi_program::buildOptions_

◆ buildStatus_

◆ Code

std::unique_ptr<uint8_t[]> _pi_program::Code

Definition at line 1505 of file pi_level_zero.hpp.

Referenced by piProgramBuild(), piProgramGetInfo(), and piProgramLink().

◆ CodeLength

size_t _pi_program::CodeLength

Definition at line 1506 of file pi_level_zero.hpp.

Referenced by piProgramBuild(), piProgramGetInfo(), and piProgramLink().

◆ Context [1/2]

◆ Context [2/2]

const pi_context _pi_program::Context

Definition at line 1491 of file pi_level_zero.hpp.

◆ context_

_pi_context * _pi_program::context_

◆ errorLog_

char _pi_program::errorLog_

Definition at line 733 of file pi_cuda.hpp.

Referenced by build_program().

◆ ErrorMessage

const std::string _pi_program::ErrorMessage

Definition at line 1499 of file pi_level_zero.hpp.

Referenced by piProgramGetBuildInfo().

◆ infoLog_

char _pi_program::infoLog_

◆ kernelReqdWorkGroupSizeMD_

std::unordered_map<std::string, std::tuple<uint32_t, uint32_t, uint32_t> > _pi_program::kernelReqdWorkGroupSizeMD_

Definition at line 729 of file pi_cuda.hpp.

Referenced by set_metadata().

◆ MAX_LOG_SIZE

constexpr static size_t _pi_program::MAX_LOG_SIZE = 8192u
staticconstexpr

◆ module_

native_type _pi_program::module_

Definition at line 721 of file pi_cuda.hpp.

Referenced by build_program(), and get().

◆ OwnZeModule

const bool _pi_program::OwnZeModule

Definition at line 1495 of file pi_level_zero.hpp.

◆ refCount_

std::atomic_uint32_t _pi_program::refCount_

◆ SpecConstants

std::unordered_map<uint32_t, const void *> _pi_program::SpecConstants

◆ State

◆ ZeBuildLog

ze_module_build_log_handle_t _pi_program::ZeBuildLog

Definition at line 1522 of file pi_level_zero.hpp.

Referenced by piProgramBuild(), and piProgramGetBuildInfo().

◆ ZeModule


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