DPC++ Runtime
Runtime libraries for oneAPI DPC++
pi.hpp File Reference
#include <CL/sycl/backend_types.hpp>
#include <CL/sycl/detail/export.hpp>
#include <CL/sycl/detail/os_util.hpp>
#include <CL/sycl/detail/pi.h>
#include <cassert>
#include <cstdint>
#include <memory>
#include <sstream>
#include <string>
#include <vector>
#include <CL/sycl/detail/pi.def>
Include dependency graph for pi.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  cl::sycl::detail::pi::PiFuncInfo< PiApiOffset >
 
class  cl::sycl::detail::pi::ByteArray
 
class  cl::sycl::detail::pi::DeviceBinaryProperty
 
class  cl::sycl::detail::pi::DeviceBinaryImage
 
class  cl::sycl::detail::pi::DeviceBinaryImage::PropertyRange
 
class  cl::sycl::detail::pi::DeviceBinaryImage::PropertyRange::ConstIterator
 
struct  cl::sycl::detail::pi::IsStdVector< T >
 
struct  cl::sycl::detail::pi::IsStdVector< std::vector< T > >
 

Namespaces

 cl
 We provide new interfaces for matrix muliply in this patch:
 
 cl::sycl
 
 cl::sycl::detail
 
 cl::sycl::detail::pi
 

Macros

#define _PI_API(api)   api,
 
#define __SYCL_OPENCL_PLUGIN_NAME   "libpi_opencl.so"
 
#define __SYCL_LEVEL_ZERO_PLUGIN_NAME   "libpi_level_zero.so"
 
#define __SYCL_CUDA_PLUGIN_NAME   "libpi_cuda.so"
 
#define __SYCL_ESIMD_EMULATOR_PLUGIN_NAME   "libpi_esimd_emulator.so"
 
#define __SYCL_HIP_PLUGIN_NAME   "libpi_hip.so"
 
#define __SYCL_PI_HANDLE_UNKNOWN_PARAM_NAME(parameter)   { cl::sycl::detail::pi::handleUnknownParamName(__func__, parameter); }
 
#define _PI_API(api)
 

Typedefs

using cl::sycl::detail::pi::PiPlugin = ::pi_plugin
 
using cl::sycl::detail::pi::PiResult = ::pi_result
 
using cl::sycl::detail::pi::PiPlatform = ::pi_platform
 
using cl::sycl::detail::pi::PiDevice = ::pi_device
 
using cl::sycl::detail::pi::PiDeviceType = ::pi_device_type
 
using cl::sycl::detail::pi::PiDeviceInfo = ::pi_device_info
 
using cl::sycl::detail::pi::PiDeviceBinaryType = ::pi_device_binary_type
 
using cl::sycl::detail::pi::PiContext = ::pi_context
 
using cl::sycl::detail::pi::PiProgram = ::pi_program
 
using cl::sycl::detail::pi::PiKernel = ::pi_kernel
 
using cl::sycl::detail::pi::PiQueue = ::pi_queue
 
using cl::sycl::detail::pi::PiQueueProperties = ::pi_queue_properties
 
using cl::sycl::detail::pi::PiMem = ::pi_mem
 
using cl::sycl::detail::pi::PiMemFlags = ::pi_mem_flags
 
using cl::sycl::detail::pi::PiEvent = ::pi_event
 
using cl::sycl::detail::pi::PiSampler = ::pi_sampler
 
using cl::sycl::detail::pi::PiSamplerInfo = ::pi_sampler_info
 
using cl::sycl::detail::pi::PiSamplerProperties = ::pi_sampler_properties
 
using cl::sycl::detail::pi::PiSamplerAddressingMode = ::pi_sampler_addressing_mode
 
using cl::sycl::detail::pi::PiSamplerFilterMode = ::pi_sampler_filter_mode
 
using cl::sycl::detail::pi::PiMemImageFormat = ::pi_image_format
 
using cl::sycl::detail::pi::PiMemImageDesc = ::pi_image_desc
 
using cl::sycl::detail::pi::PiMemImageInfo = ::pi_image_info
 
using cl::sycl::detail::pi::PiMemObjectType = ::pi_mem_type
 
using cl::sycl::detail::pi::PiMemImageChannelOrder = ::pi_image_channel_order
 
using cl::sycl::detail::pi::PiMemImageChannelType = ::pi_image_channel_type
 

Enumerations

enum  cl::sycl::detail::PiApiKind { cl::sycl::detail::PiApiKind::_PI_API }
 
enum  cl::sycl::detail::pi::TraceLevel { cl::sycl::detail::pi::PI_TRACE_BASIC = 0x1, cl::sycl::detail::pi::PI_TRACE_CALLS = 0x2, cl::sycl::detail::pi::PI_TRACE_ALL = -1 }
 

Functions

template<cl::sycl::backend BE>
void * cl::sycl::detail::getPluginOpaqueData (void *opaquedata_arg)
 
bool cl::sycl::detail::pi::trace (TraceLevel level)
 
void cl::sycl::detail::pi::die (const char *Message)
 
void cl::sycl::detail::pi::assertion (bool Condition, const char *Message=nullptr)
 
template<typename T >
void cl::sycl::detail::pi::handleUnknownParamName (const char *functionName, T parameter)
 
void cl::sycl::detail::pi::contextSetExtendedDeleter (const cl::sycl::context &constext, pi_context_extended_deleter func, void *user_data)
 
void * cl::sycl::detail::pi::loadOsLibrary (const std::string &Library)
 
int cl::sycl::detail::pi::unloadOsLibrary (void *Library)
 
int cl::sycl::detail::pi::unloadPlugin (void *Library)
 
void * cl::sycl::detail::pi::getOsLibraryFuncAddress (void *Library, const std::string &FunctionName)
 
std::string cl::sycl::detail::pi::platformInfoToString (pi_platform_info info)
 
template<class To , class From >
To cl::sycl::detail::pi::cast (From value)
 
std::vector< plugin > & cl::sycl::detail::pi::initialize ()
 
template<backend BE>
const plugin & cl::sycl::detail::pi::getPlugin ()
 
uint64_t cl::sycl::detail::pi::emitFunctionBeginTrace (const char *FName)
 Emits an XPTI trace before a PI API call is made. More...
 
void cl::sycl::detail::pi::emitFunctionEndTrace (uint64_t CorrelationID, const char *FName)
 Emits an XPTI trace after the PI API call has been made. More...
 
uint64_t cl::sycl::detail::pi::emitFunctionWithArgsBeginTrace (uint32_t FuncID, const char *FName, unsigned char *ArgsData, pi_plugin Plugin)
 Notifies XPTI subscribers about PI function calls and packs call arguments. More...
 
void cl::sycl::detail::pi::emitFunctionWithArgsEndTrace (uint64_t CorrelationID, uint32_t FuncID, const char *FName, unsigned char *ArgsData, pi_result Result, pi_plugin Plugin)
 Notifies XPTI subscribers about PI function call result. More...
 
std::ostream & cl::sycl::detail::pi::operator<< (std::ostream &Out, const DeviceBinaryProperty &P)
 
PiDeviceBinaryType cl::sycl::detail::pi::getBinaryImageFormat (const unsigned char *ImgData, size_t ImgSize)
 Tries to determine the device binary image foramat. More...
 
template<class To , class FromE >
To cl::sycl::detail::pi::cast (std::vector< FromE > Values)
 

Variables

std::shared_ptr< plugin > cl::sycl::detail::pi::GlobalPlugin
 

Detailed Description

C++ wrapper of extern "C" PI interfaces

Definition in file pi.hpp.

Macro Definition Documentation

◆ __SYCL_CUDA_PLUGIN_NAME

#define __SYCL_CUDA_PLUGIN_NAME   "libpi_cuda.so"

Definition at line 73 of file pi.hpp.

◆ __SYCL_ESIMD_EMULATOR_PLUGIN_NAME

#define __SYCL_ESIMD_EMULATOR_PLUGIN_NAME   "libpi_esimd_emulator.so"

Definition at line 74 of file pi.hpp.

◆ __SYCL_HIP_PLUGIN_NAME

#define __SYCL_HIP_PLUGIN_NAME   "libpi_hip.so"

Definition at line 75 of file pi.hpp.

◆ __SYCL_LEVEL_ZERO_PLUGIN_NAME

#define __SYCL_LEVEL_ZERO_PLUGIN_NAME   "libpi_level_zero.so"

Definition at line 72 of file pi.hpp.

◆ __SYCL_OPENCL_PLUGIN_NAME

#define __SYCL_OPENCL_PLUGIN_NAME   "libpi_opencl.so"

Definition at line 71 of file pi.hpp.

◆ __SYCL_PI_HANDLE_UNKNOWN_PARAM_NAME

#define __SYCL_PI_HANDLE_UNKNOWN_PARAM_NAME (   parameter)    { cl::sycl::detail::pi::handleUnknownParamName(__func__, parameter); }

Definition at line 96 of file pi.hpp.

◆ _PI_API [1/2]

#define _PI_API (   api)    api,

Definition at line 165 of file pi.hpp.

◆ _PI_API [2/2]

#define _PI_API (   api)
Value:
template <> struct PiFuncInfo<PiApiKind::api> { \
using FuncPtrT = decltype(&::api); \
inline const char *getFuncName() { return #api; } \
inline FuncPtrT getFuncPtr(PiPlugin MPlugin) { \
return MPlugin.PiFunctionTable.api; \
} \
};

Definition at line 165 of file pi.hpp.

cl::sycl::detail::PiApiKind
PiApiKind
Definition: pi.hpp:42
cl::sycl::detail::pi::PiPlugin
::pi_plugin PiPlugin
Definition: pi.hpp:99