DPC++ Runtime
Runtime libraries for oneAPI Data Parallel C++
_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  LinkedReleaser
 
class  ModuleIterator
 

Public Types

enum  state {
  IL, Native, Object, Exe,
  LinkedExe
}
 
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 (pi_context Context, const void *Input, size_t Length, state St)
 
 _pi_program (pi_context Context, ze_module_handle_t ZeModule, bool OwnZeModule, state St, bool HasImports=false)
 
 _pi_program (pi_context Context, std::vector< LinkedReleaser > &&Inputs, ze_module_build_log_handle_t ZeLog)
 
 ~_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
 
state State
 
std::unique_ptr< uint8_t[]> Code
 
size_t CodeLength
 
std::unordered_map< uint32_t, uint64_t > ZeSpecConstants
 
std::mutex MutexZeSpecConstants
 
ze_module_handle_t ZeModule
 
bool OwnZeModule
 
bool HasImports
 
bool HasImportsAndIsLinked
 
std::mutex MutexHasImportsAndIsLinked
 
std::vector< LinkedReleaserLinkedPrograms
 
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 523 of file pi_cuda.hpp.

Member Typedef Documentation

◆ native_type [1/2]

using _pi_program::native_type = hipModule_t

Definition at line 508 of file pi_hip.hpp.

◆ native_type [2/2]

Definition at line 524 of file pi_cuda.hpp.

Member Enumeration Documentation

◆ state

Enumerator
IL 
Native 
Object 
Exe 
LinkedExe 

Definition at line 954 of file pi_level_zero.hpp.

Constructor & Destructor Documentation

◆ _pi_program() [1/6]

_pi_program::_pi_program ( pi_context  ctxt)

Definition at line 479 of file pi_cuda.cpp.

◆ ~_pi_program() [1/3]

_pi_program::~_pi_program ( )

Definition at line 485 of file pi_cuda.cpp.

References context_, and cuda_piContextRelease().

◆ _pi_program() [2/6]

_pi_program::_pi_program ( )
inline

Definition at line 153 of file pi_esimd_emulator.hpp.

◆ _pi_program() [3/6]

_pi_program::_pi_program ( pi_context  ctxt)

◆ ~_pi_program() [2/3]

_pi_program::~_pi_program ( )

◆ _pi_program() [4/6]

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

Definition at line 1074 of file pi_level_zero.hpp.

◆ _pi_program() [5/6]

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

Definition at line 1083 of file pi_level_zero.hpp.

◆ _pi_program() [6/6]

_pi_program::_pi_program ( pi_context  Context,
std::vector< LinkedReleaser > &&  Inputs,
ze_module_build_log_handle_t  ZeLog 
)
inline

Definition at line 1090 of file pi_level_zero.hpp.

◆ ~_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 534 of file pi_hip.hpp.

References refCount_.

◆ decrement_reference_count() [2/2]

pi_uint32 _pi_program::decrement_reference_count ( )
inlinenoexcept

Definition at line 557 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 530 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 528 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 536 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 532 of file pi_hip.hpp.

References refCount_.

◆ increment_reference_count() [2/2]

pi_uint32 _pi_program::increment_reference_count ( )
inlinenoexcept

Definition at line 555 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 527 of file pi_cuda.cpp.

References binary_, binarySizeInBytes_, cl::sycl::length(), and PI_SUCCESS.

◆ set_metadata()

Member Data Documentation

◆ binary_

const char * _pi_program::binary_

◆ binarySizeInBytes_

size_t _pi_program::binarySizeInBytes_

◆ buildOptions_

std::string _pi_program::buildOptions_

◆ buildStatus_

◆ Code

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

Definition at line 1103 of file pi_level_zero.hpp.

Referenced by compileOrBuild(), copyModule(), and piProgramGetInfo().

◆ CodeLength

size_t _pi_program::CodeLength

Definition at line 1104 of file pi_level_zero.hpp.

Referenced by compileOrBuild(), and piProgramGetInfo().

◆ Context

◆ context_

_pi_context * _pi_program::context_

◆ errorLog_

char _pi_program::errorLog_

Definition at line 537 of file pi_cuda.hpp.

Referenced by build_program().

◆ HasImports

bool _pi_program::HasImports

◆ HasImportsAndIsLinked

bool _pi_program::HasImportsAndIsLinked

◆ 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 533 of file pi_cuda.hpp.

Referenced by set_metadata().

◆ LinkedPrograms

std::vector<LinkedReleaser> _pi_program::LinkedPrograms

Definition at line 1133 of file pi_level_zero.hpp.

Referenced by _pi_program::ModuleIterator::ModuleIterator().

◆ MAX_LOG_SIZE

constexpr static size_t _pi_program::MAX_LOG_SIZE = 8192u
staticconstexpr

◆ module_

native_type _pi_program::module_

Definition at line 525 of file pi_cuda.hpp.

Referenced by build_program(), and get().

◆ MutexHasImportsAndIsLinked

std::mutex _pi_program::MutexHasImportsAndIsLinked

◆ MutexZeSpecConstants

std::mutex _pi_program::MutexZeSpecConstants

Definition at line 1108 of file pi_level_zero.hpp.

Referenced by compileOrBuild(), and piextProgramSetSpecializationConstant().

◆ OwnZeModule

bool _pi_program::OwnZeModule

Definition at line 1115 of file pi_level_zero.hpp.

◆ refCount_

std::atomic_uint32_t _pi_program::refCount_

◆ State

◆ ZeBuildLog

ze_module_build_log_handle_t _pi_program::ZeBuildLog

Definition at line 1137 of file pi_level_zero.hpp.

Referenced by compileOrBuild(), and piProgramGetBuildInfo().

◆ ZeModule

◆ ZeSpecConstants

std::unordered_map<uint32_t, uint64_t> _pi_program::ZeSpecConstants

Definition at line 1107 of file pi_level_zero.hpp.

Referenced by compileOrBuild(), and piextProgramSetSpecializationConstant().


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