DPC++ Runtime
Runtime libraries for oneAPI Data Parallel C++
pi.hpp
Go to the documentation of this file.
1 //==---------- pi.hpp - Plugin Interface for SYCL RT -----------------------==//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
13 
14 #pragma once
15 
19 #include <CL/sycl/detail/pi.h>
20 
21 #include <cassert>
22 #include <cstdint>
23 #include <memory>
24 #include <sstream>
25 #include <string>
26 #include <vector>
27 
28 #ifdef XPTI_ENABLE_INSTRUMENTATION
29 // Forward declarations
30 namespace xpti {
31 struct trace_event_data_t;
32 }
33 #endif
34 
36 namespace sycl {
37 
38 class context;
39 
40 namespace detail {
41 
42 enum class PiApiKind {
43 #define _PI_API(api) api,
44 #include <CL/sycl/detail/pi.def>
45 };
46 class plugin;
47 
48 template <cl::sycl::backend BE>
49 __SYCL_EXPORT void *getPluginOpaqueData(void *opaquedata_arg);
50 
51 namespace pi {
52 
53 // The SYCL_PI_TRACE sets what we will trace.
54 // This is a bit-mask of various things we'd want to trace.
55 enum TraceLevel {
59 };
60 
61 // Return true if we want to trace PI related activities.
62 bool trace(TraceLevel level);
63 
64 #ifdef __SYCL_RT_OS_WINDOWS
65 #define __SYCL_OPENCL_PLUGIN_NAME "pi_opencl.dll"
66 #define __SYCL_LEVEL_ZERO_PLUGIN_NAME "pi_level_zero.dll"
67 #define __SYCL_CUDA_PLUGIN_NAME "pi_cuda.dll"
68 #define __SYCL_ESIMD_EMULATOR_PLUGIN_NAME "pi_esimd_emulator.dll"
69 #define __SYCL_HIP_PLUGIN_NAME "libpi_hip.dll"
70 #else
71 #define __SYCL_OPENCL_PLUGIN_NAME "libpi_opencl.so"
72 #define __SYCL_LEVEL_ZERO_PLUGIN_NAME "libpi_level_zero.so"
73 #define __SYCL_CUDA_PLUGIN_NAME "libpi_cuda.so"
74 #define __SYCL_ESIMD_EMULATOR_PLUGIN_NAME "libpi_esimd_emulator.so"
75 #define __SYCL_HIP_PLUGIN_NAME "libpi_hip.so"
76 #endif
77 
78 // Report error and no return (keeps compiler happy about no return statements).
79 [[noreturn]] __SYCL_EXPORT void die(const char *Message);
80 
81 __SYCL_EXPORT void assertion(bool Condition, const char *Message = nullptr);
82 
83 template <typename T>
84 void handleUnknownParamName(const char *functionName, T parameter) {
85  std::stringstream stream;
86  stream << "Unknown parameter " << parameter << " passed to " << functionName
87  << "\n";
88  auto str = stream.str();
89  auto msg = str.c_str();
90  die(msg);
91 }
92 
93 // This macro is used to report invalid enumerators being passed to PI API
94 // GetInfo functions. It will print the name of the function that invoked it
95 // and the value of the unknown enumerator.
96 #define __SYCL_PI_HANDLE_UNKNOWN_PARAM_NAME(parameter) \
97  { cl::sycl::detail::pi::handleUnknownParamName(__func__, parameter); }
98 
111 using PiMem = ::pi_mem;
125 
126 __SYCL_EXPORT void contextSetExtendedDeleter(const cl::sycl::context &constext,
128  void *user_data);
129 
130 // Function to load the shared library
131 // Implementation is OS dependent.
132 void *loadOsLibrary(const std::string &Library);
133 
134 // Function to unload the shared library
135 // Implementation is OS dependent (see posix-pi.cpp and windows-pi.cpp)
136 int unloadOsLibrary(void *Library);
137 
138 // OS agnostic function to unload the shared library
139 int unloadPlugin(void *Library);
140 
141 // Function to get Address of a symbol defined in the shared
142 // library, implementation is OS dependent.
143 void *getOsLibraryFuncAddress(void *Library, const std::string &FunctionName);
144 
145 // Get a string representing a _pi_platform_info enum
146 std::string platformInfoToString(pi_platform_info info);
147 
148 // Want all the needed casts be explicit, do not define conversion operators.
149 template <class To, class From> To cast(From value);
150 
151 // Holds the PluginInformation for the plugin that is bound.
152 // Currently a global variable is used to store OpenCL plugin information to be
153 // used with SYCL Interoperability Constructors.
154 extern std::shared_ptr<plugin> GlobalPlugin;
155 
156 // Performs PI one-time initialization.
157 std::vector<plugin> &initialize();
158 
159 // Get the plugin serving given backend.
160 template <backend BE> __SYCL_EXPORT const plugin &getPlugin();
161 
162 // Utility Functions to get Function Name for a PI Api.
163 template <PiApiKind PiApiOffset> struct PiFuncInfo {};
164 
165 #define _PI_API(api) \
166  template <> struct PiFuncInfo<PiApiKind::api> { \
167  using FuncPtrT = decltype(&::api); \
168  inline const char *getFuncName() { return #api; } \
169  inline FuncPtrT getFuncPtr(PiPlugin MPlugin) { \
170  return MPlugin.PiFunctionTable.api; \
171  } \
172  };
173 #include <CL/sycl/detail/pi.def>
174 
179 uint64_t emitFunctionBeginTrace(const char *FName);
180 
185 void emitFunctionEndTrace(uint64_t CorrelationID, const char *FName);
186 
193 uint64_t emitFunctionWithArgsBeginTrace(uint32_t FuncID, const char *FName,
194  unsigned char *ArgsData,
195  pi_plugin Plugin);
196 
206 void emitFunctionWithArgsEndTrace(uint64_t CorrelationID, uint32_t FuncID,
207  const char *FName, unsigned char *ArgsData,
208  pi_result Result, pi_plugin Plugin);
209 
210 // A wrapper for passing around byte array properties
211 class ByteArray {
212 public:
213  using ConstIterator = const std::uint8_t *;
214 
215  ByteArray(const std::uint8_t *Ptr, std::size_t Size) : Ptr{Ptr}, Size{Size} {}
216  const std::uint8_t &operator[](std::size_t Idx) const { return Ptr[Idx]; }
217  std::size_t size() const { return Size; }
218  ConstIterator begin() const { return Ptr; }
219  ConstIterator end() const { return Ptr + Size; }
220 
221 private:
222  const std::uint8_t *Ptr;
223  const std::size_t Size;
224 };
225 
226 // C++ wrapper over the _pi_device_binary_property_struct structure.
228 public:
230  : Prop(Prop) {}
231 
232  pi_uint32 asUint32() const;
233  ByteArray asByteArray() const;
234  const char *asCString() const;
235 
236 protected:
237  friend std::ostream &operator<<(std::ostream &Out,
238  const DeviceBinaryProperty &P);
240 };
241 
242 std::ostream &operator<<(std::ostream &Out, const DeviceBinaryProperty &P);
243 
244 // C++ convenience wrapper over the pi_device_binary_struct structure.
246 public:
247  // Represents a range of properties to enable iteration over them.
248  // Implements the standard C++ STL input iterator interface.
250  public:
251  using ValTy = std::remove_pointer<pi_device_binary_property>::type;
252 
255 
256  public:
257  using iterator_category = std::input_iterator_tag;
258  using value_type = ValTy;
259  using difference_type = ptrdiff_t;
262 
263  ConstIterator(pi_device_binary_property Cur = nullptr) : Cur(Cur) {}
265  Cur++;
266  return *this;
267  }
269  ConstIterator Ret = *this;
270  ++(*this);
271  return Ret;
272  }
273  bool operator==(ConstIterator Other) const { return Cur == Other.Cur; }
274  bool operator!=(ConstIterator Other) const { return !(*this == Other); }
275  reference operator*() const { return Cur; }
276  };
277  ConstIterator begin() const { return ConstIterator(Begin); }
278  ConstIterator end() const { return ConstIterator(End); }
279  friend class DeviceBinaryImage;
280  bool isAvailable() const { return !(Begin == nullptr); }
281 
282  private:
283  PropertyRange() : Begin(nullptr), End(nullptr) {}
284  // Searches for a property set with given name and constructs a
285  // PropertyRange spanning all its elements. If property set is not found,
286  // the range will span zero elements.
287  PropertyRange(pi_device_binary Bin, const char *PropSetName)
288  : PropertyRange() {
289  init(Bin, PropSetName);
290  };
291  void init(pi_device_binary Bin, const char *PropSetName);
294  };
295 
296 public:
298  DeviceBinaryImage() : Bin(nullptr){};
299 
300  virtual void print() const;
301  virtual void dump(std::ostream &Out) const;
302 
303  size_t getSize() const {
304  assert(Bin && "binary image data not set");
305  return static_cast<size_t>(Bin->BinaryEnd - Bin->BinaryStart);
306  }
307 
308  const char *getCompileOptions() const {
309  assert(Bin && "binary image data not set");
310  return Bin->CompileOptions;
311  }
312 
313  const char *getLinkOptions() const {
314  assert(Bin && "binary image data not set");
315  return Bin->LinkOptions;
316  }
317 
320  assert(Bin && "binary image data not set");
321  return Format;
322  }
323 
325  pi_device_binary_property getProperty(const char *PropName) const;
326 
351  const PropertyRange &getSpecConstants() const { return SpecConstIDMap; }
353  // We can't have this variable as a class member, since it would break
354  // the ABI backwards compatibility.
355  DeviceBinaryImage::PropertyRange SpecConstDefaultValuesMap;
356  SpecConstDefaultValuesMap.init(
358  return SpecConstDefaultValuesMap;
359  }
360  const PropertyRange &getDeviceLibReqMask() const { return DeviceLibReqMask; }
362  return KernelParamOptInfo;
363  }
364  const PropertyRange getAssertUsed() const {
365  // We can't have this variable as a class member, since it would break
366  // the ABI backwards compatibility.
367  PropertyRange AssertUsed;
368  AssertUsed.init(Bin, __SYCL_PI_PROPERTY_SET_SYCL_ASSERT_USED);
369  return AssertUsed;
370  }
371  const PropertyRange &getProgramMetadata() const { return ProgramMetadata; }
373  // We can't have this variable as a class member, since it would break
374  // the ABI backwards compatibility.
375  DeviceBinaryImage::PropertyRange ExportedSymbols;
376  ExportedSymbols.init(Bin, __SYCL_PI_PROPERTY_SET_SYCL_EXPORTED_SYMBOLS);
377  return ExportedSymbols;
378  }
379  virtual ~DeviceBinaryImage() {}
380 
381 protected:
382  void init(pi_device_binary Bin);
383  pi_device_binary get() const { return Bin; }
384 
391 };
392 
395 PiDeviceBinaryType getBinaryImageFormat(const unsigned char *ImgData,
396  size_t ImgSize);
397 
398 } // namespace pi
399 
400 namespace RT = cl::sycl::detail::pi;
401 
402 // Workaround for build with GCC 5.x
403 // An explicit specialization shall be declared in the namespace block.
404 // Having namespace as part of template name is not supported by GCC
405 // older than 7.x.
406 // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480
407 namespace pi {
408 // Want all the needed casts be explicit, do not define conversion
409 // operators.
410 template <class To, class From> inline To cast(From value) {
411  // TODO: see if more sanity checks are possible.
412  RT::assertion((sizeof(From) == sizeof(To)), "assert: cast failed size check");
413  return (To)(value);
414 }
415 
416 // These conversions should use PI interop API.
417 template <> inline pi::PiProgram cast(cl_program) {
418  RT::assertion(false, "pi::cast -> use piextCreateProgramWithNativeHandle");
419  return {};
420 }
421 
422 template <> inline pi::PiDevice cast(cl_device_id) {
423  RT::assertion(false, "pi::cast -> use piextCreateDeviceWithNativeHandle");
424  return {};
425 }
426 
427 } // namespace pi
428 } // namespace detail
429 
430 // For shortness of using PI from the top-level sycl files.
431 namespace RT = cl::sycl::detail::pi;
432 
433 } // namespace sycl
434 } // __SYCL_INLINE_NAMESPACE(cl)
435 
436 #undef _PI_API
cl::sycl::detail::pi::DeviceBinaryImage::PropertyRange::ConstIterator::operator++
ConstIterator operator++(int)
Definition: pi.hpp:268
pi_plugin
_pi_plugin pi_plugin
Definition: pi.h:910
cl::sycl::detail::pi::DeviceBinaryImage::getKernelParamOptInfo
const PropertyRange & getKernelParamOptInfo() const
Definition: pi.hpp:361
PI_DEVICE_BINARY_TYPE_NONE
static constexpr pi_device_binary_type PI_DEVICE_BINARY_TYPE_NONE
Definition: pi.h:669
__SYCL_PI_PROPERTY_SET_SPEC_CONST_DEFAULT_VALUES_MAP
#define __SYCL_PI_PROPERTY_SET_SPEC_CONST_DEFAULT_VALUES_MAP
PropertySetRegistry::SYCL_SPEC_CONSTANTS_DEFAULT_VALUES defined in PropertySetIO.h.
Definition: pi.h:718
_pi_mem
PI Mem mapping to CUDA memory allocations, both data and texture/surface.
Definition: pi_cuda.hpp:208
_pi_mem_type
_pi_mem_type
Definition: pi.h:431
cl::sycl::detail::pi::getPlugin
const plugin & getPlugin()
Definition: pi.cpp:511
cl::sycl::detail::pi::TraceLevel
TraceLevel
Definition: pi.hpp:55
cl::sycl::detail::pi::DeviceBinaryImage::getLinkOptions
const char * getLinkOptions() const
Definition: pi.hpp:313
pi_device_info
_pi_device_info pi_device_info
Definition: pi.h:584
pi.h
cl::sycl::detail::pi::print
std::enable_if<!std::is_pointer< T >::value, void >::type print(T val)
Definition: plugin_printers.hpp:24
cl::sycl::detail::pi::ByteArray::begin
ConstIterator begin() const
Definition: pi.hpp:218
pi_image_desc
_pi_image_desc pi_image_desc
Definition: pi.h:895
pi_program
_pi_program * pi_program
Definition: pi.h:871
cl::sycl::detail::pi::ByteArray::operator[]
const std::uint8_t & operator[](std::size_t Idx) const
Definition: pi.hpp:216
cl::sycl::detail::pi::DeviceBinaryImage::KernelParamOptInfo
DeviceBinaryImage::PropertyRange KernelParamOptInfo
Definition: pi.hpp:389
cl::sycl::detail::pi::DeviceBinaryImage::PropertyRange::ConstIterator::value_type
ValTy value_type
Definition: pi.hpp:258
cl::sycl::detail::pi::handleUnknownParamName
void handleUnknownParamName(const char *functionName, T parameter)
Definition: pi.hpp:84
cl::sycl::detail::pi::initialize
std::vector< plugin > & initialize()
Definition: pi.cpp:374
cl::sycl::detail::pi::DeviceBinaryImage::PropertyRange::ConstIterator::ConstIterator
ConstIterator(pi_device_binary_property Cur=nullptr)
Definition: pi.hpp:263
cl::sycl::detail::pi::PiQueueProperties
::pi_queue_properties PiQueueProperties
Definition: pi.hpp:110
cl::sycl::detail::pi::DeviceBinaryImage::getFormat
pi::PiDeviceBinaryType getFormat() const
Returns the format of the binary image.
Definition: pi.hpp:319
cl::sycl::detail::pi::PI_TRACE_ALL
@ PI_TRACE_ALL
Definition: pi.hpp:58
cl::sycl::detail::pi::assertion
void assertion(bool Condition, const char *Message=nullptr)
Definition: pi.cpp:542
cl::sycl::detail::pi::getBinaryImageFormat
PiDeviceBinaryType getBinaryImageFormat(const unsigned char *ImgData, size_t ImgSize)
Tries to determine the device binary image foramat.
Definition: pi.cpp:687
_pi_plugin
Definition: pi.h:1739
pi_image_info
_pi_image_info pi_image_info
Definition: pi.h:588
cl::sycl::detail::pi::DeviceBinaryImage::PropertyRange::end
ConstIterator end() const
Definition: pi.hpp:278
cl::sycl::detail::pi::DeviceBinaryImage::getCompileOptions
const char * getCompileOptions() const
Definition: pi.hpp:308
cl::sycl::detail::pi::DeviceBinaryProperty::Prop
const _pi_device_binary_property_struct * Prop
Definition: pi.hpp:239
cl::sycl::detail::pi::ByteArray::ByteArray
ByteArray(const std::uint8_t *Ptr, std::size_t Size)
Definition: pi.hpp:215
_pi_result
_pi_result
Definition: pi.h:81
cl::sycl::detail::pi::DeviceBinaryImage::DeviceLibReqMask
DeviceBinaryImage::PropertyRange DeviceLibReqMask
Definition: pi.hpp:388
cl::sycl::detail::pi::DeviceBinaryImage::getSpecConstants
const PropertyRange & getSpecConstants() const
Gets the iterator range over specialization constants in this binary image.
Definition: pi.hpp:351
_pi_device_type
_pi_device_type
Definition: pi.h:162
os_util.hpp
cl::sycl::detail::pi::PI_TRACE_BASIC
@ PI_TRACE_BASIC
Definition: pi.hpp:56
cl::sycl::detail::pi::DeviceBinaryImage::PropertyRange::ConstIterator::iterator_category
std::input_iterator_tag iterator_category
Definition: pi.hpp:257
cl::sycl::detail::pi::PiDeviceBinaryType
::pi_device_binary_type PiDeviceBinaryType
Definition: pi.hpp:105
cl::sycl::detail::pi::PiMemFlags
::pi_mem_flags PiMemFlags
Definition: pi.hpp:112
cl::sycl::detail::pi::getOsLibraryFuncAddress
void * getOsLibraryFuncAddress(void *Library, const std::string &FunctionName)
Definition: posix_pi.cpp:27
cl::sycl::detail::pi::DeviceBinaryImage::getSpecConstantsDefaultValues
const PropertyRange getSpecConstantsDefaultValues() const
Definition: pi.hpp:352
cl::sycl::detail::pi::DeviceBinaryImage::PropertyRange::ConstIterator::operator*
reference operator*() const
Definition: pi.hpp:275
cl::sycl::detail::pi::unloadPlugin
int unloadPlugin(void *Library)
Definition: pi.cpp:341
_pi_platform
A PI platform stores all known PI devices, in the CUDA plugin this is just a vector of available devi...
Definition: pi_cuda.hpp:62
cl::sycl::detail::pi::emitFunctionEndTrace
void emitFunctionEndTrace(uint64_t CorrelationID, const char *FName)
Emits an XPTI trace after the PI API call has been made.
Definition: pi.cpp:131
_pi_sampler_addressing_mode
_pi_sampler_addressing_mode
Definition: pi.h:500
cl::sycl::detail::pi::PiFuncInfo
Definition: pi.hpp:163
cl::sycl::detail::pi::DeviceBinaryImage::Bin
pi_device_binary Bin
Definition: pi.hpp:385
cl::sycl::detail::pi::DeviceBinaryImage::PropertyRange::ConstIterator::difference_type
ptrdiff_t difference_type
Definition: pi.hpp:259
cast
To cast(From value)
Definition: pi_opencl.cpp:42
_pi_device_info
_pi_device_info
Definition: pi.h:186
_pi_image_info
_pi_image_info
Definition: pi.h:373
cl::sycl::detail::pi::emitFunctionWithArgsBeginTrace
uint64_t emitFunctionWithArgsBeginTrace(uint32_t FuncID, const char *FName, unsigned char *ArgsData, pi_plugin Plugin)
Notifies XPTI subscribers about PI function calls and packs call arguments.
Definition: pi.cpp:146
cl::sycl::detail::pi::DeviceBinaryImage::~DeviceBinaryImage
virtual ~DeviceBinaryImage()
Definition: pi.hpp:379
_pi_kernel
Implementation of a PI Kernel for CUDA.
Definition: pi_cuda.hpp:578
pi_kernel
_pi_kernel * pi_kernel
Definition: pi.h:872
cl::sycl::detail::pi::emitFunctionBeginTrace
uint64_t emitFunctionBeginTrace(const char *FName)
Emits an XPTI trace before a PI API call is made.
Definition: pi.cpp:87
cl::sycl::detail::PiApiKind
PiApiKind
Definition: pi.hpp:42
pi_sampler
_pi_sampler * pi_sampler
Definition: pi.h:874
cl::sycl::detail::pi::DeviceBinaryImage::getExportedSymbols
const PropertyRange getExportedSymbols() const
Definition: pi.hpp:372
_pi_sampler_filter_mode
_pi_sampler_filter_mode
Definition: pi.h:508
pi_image_channel_order
_pi_image_channel_order pi_image_channel_order
Definition: pi.h:597
cl::sycl::detail::pi::asUint32
static pi_uint32 asUint32(const void *Addr)
Definition: pi.cpp:627
export.hpp
cl::sycl::detail::pi::DeviceBinaryImage::PropertyRange::begin
ConstIterator begin() const
Definition: pi.hpp:277
pi_device_binary_type
uint8_t pi_device_binary_type
Types of device binary.
Definition: pi.h:667
cl::sycl::detail::pi::DeviceBinaryImage::PropertyRange::ConstIterator::operator!=
bool operator!=(ConstIterator Other) const
Definition: pi.hpp:274
cl::sycl::detail::pi::DeviceBinaryImage::getProgramMetadata
const PropertyRange & getProgramMetadata() const
Definition: pi.hpp:371
_pi_queue
PI queue mapping on to CUstream objects.
Definition: pi_cuda.hpp:379
cl::sycl::detail::pi::DeviceBinaryImage::PropertyRange::ValTy
std::remove_pointer< pi_device_binary_property >::type ValTy
Definition: pi.hpp:251
pi_image_format
_pi_image_format pi_image_format
Definition: pi.h:894
cl::sycl::detail::pi::platformInfoToString
std::string platformInfoToString(pi_platform_info info)
Definition: pi.cpp:193
pi_uint32
uint32_t pi_uint32
Definition: pi.h:68
cl::sycl::detail::pi::DeviceBinaryImage::getAssertUsed
const PropertyRange getAssertUsed() const
Definition: pi.hpp:364
pi_device_binary_struct
This struct is a record of the device binary information.
Definition: pi.h:743
cl::sycl::detail::pi::operator<<
std::ostream & operator<<(std::ostream &Out, const DeviceBinaryProperty &P)
Definition: pi.cpp:547
cl::sycl::detail::pi::GlobalPlugin
std::shared_ptr< plugin > GlobalPlugin
Definition: pi.cpp:270
cl::sycl::detail::pi::die
void die(const char *Message)
Definition: pi.cpp:537
pi_platform
_pi_platform * pi_platform
Definition: pi.h:866
pi_mem_flags
pi_bitfield pi_mem_flags
Definition: pi.h:547
_pi_image_channel_order
_pi_image_channel_order
Definition: pi.h:446
pi_queue
_pi_queue * pi_queue
Definition: pi.h:869
cl::sycl::detail::pi::DeviceBinaryImage::ProgramMetadata
DeviceBinaryImage::PropertyRange ProgramMetadata
Definition: pi.hpp:390
cl::sycl::detail::pi::unloadOsLibrary
int unloadOsLibrary(void *Library)
Definition: posix_pi.cpp:25
cl::sycl::detail::pi::DeviceBinaryImage::getDeviceLibReqMask
const PropertyRange & getDeviceLibReqMask() const
Definition: pi.hpp:360
cl::sycl::detail::pi::DeviceBinaryImage::PropertyRange::ConstIterator::operator==
bool operator==(ConstIterator Other) const
Definition: pi.hpp:273
pi_context_extended_deleter
void(* pi_context_extended_deleter)(void *user_data)
Definition: pi.h:1028
cl::sycl::detail::pi::DeviceBinaryProperty
Definition: pi.hpp:227
cl
We provide new interfaces for matrix muliply in this patch:
Definition: access.hpp:13
cl::sycl::detail::pi::DeviceBinaryImage::PropertyRange
Definition: pi.hpp:249
pi_sampler_info
_pi_sampler_info pi_sampler_info
Definition: pi.h:602
pi_mem_type
_pi_mem_type pi_mem_type
Definition: pi.h:595
pi_mem
_pi_mem * pi_mem
Definition: pi.h:870
_pi_sampler_info
_pi_sampler_info
Definition: pi.h:489
_pi_device_binary_property_struct
Definition: pi.h:648
_pi_program
Implementation of PI Program on CUDA Module object.
Definition: pi_cuda.hpp:523
_pi_sampler
Implementation of samplers for CUDA.
Definition: pi_cuda.hpp:744
cl::sycl::detail::pi::DeviceBinaryImage::DeviceBinaryImage
DeviceBinaryImage(pi_device_binary Bin)
Definition: pi.hpp:297
cl::sycl::detail::pi::DeviceBinaryImage
Definition: pi.hpp:245
cl::sycl::detail::plugin
The plugin class provides a unified interface to the underlying low-level runtimes for the device-agn...
Definition: plugin.hpp:89
cl::sycl::detail::pi::PiSamplerProperties
::pi_sampler_properties PiSamplerProperties
Definition: pi.hpp:116
cl::sycl::detail::pi::DeviceBinaryImage::getSize
size_t getSize() const
Definition: pi.hpp:303
cl::sycl::detail::pi::ByteArray::size
std::size_t size() const
Definition: pi.hpp:217
cl::sycl::detail::getPluginOpaqueData
void * getPluginOpaqueData(void *opaquedata_arg)
Definition: pi.cpp:65
pi_sampler_properties
pi_bitfield pi_sampler_properties
Definition: pi.h:521
cl::sycl::detail::pi::PI_TRACE_CALLS
@ PI_TRACE_CALLS
Definition: pi.hpp:57
__SYCL_PI_PROPERTY_SET_SYCL_ASSERT_USED
#define __SYCL_PI_PROPERTY_SET_SYCL_ASSERT_USED
PropertySetRegistry::SYCL_ASSERT_USED defined in PropertySetIO.h.
Definition: pi.h:729
_pi_image_format
Definition: pi.h:876
cl::sycl::detail::pi::emitFunctionWithArgsEndTrace
void 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.
Definition: pi.cpp:166
cl::sycl::detail::pi::ByteArray::ConstIterator
const std::uint8_t * ConstIterator
Definition: pi.hpp:213
_pi_image_channel_type
_pi_image_channel_type
Definition: pi.h:464
cl::sycl::detail::pi::DeviceBinaryImage::PropertyRange::ConstIterator::operator++
ConstIterator & operator++()
Definition: pi.hpp:264
cl::sycl::detail::pi::ByteArray::end
ConstIterator end() const
Definition: pi.hpp:219
backend_types.hpp
pi_event
_pi_event * pi_event
Definition: pi.h:873
pi_queue_properties
pi_bitfield pi_queue_properties
Definition: pi.h:570
_pi_platform_info
_pi_platform_info
Definition: pi.h:129
_pi_image_desc
Definition: pi.h:881
cl::sycl::detail::pi
Definition: pi.hpp:51
_pi_event
PI Event mapping to CUevent.
Definition: pi_cuda.hpp:419
pi_device_binary_property
_pi_device_binary_property_struct * pi_device_binary_property
Definition: pi.h:655
pi_result
_pi_result pi_result
Definition: pi.h:579
cl::sycl::detail::pi::contextSetExtendedDeleter
void contextSetExtendedDeleter(const cl::sycl::context &constext, pi_context_extended_deleter func, void *user_data)
Definition: pi.cpp:183
cl::sycl::context
The context class represents a SYCL context on which kernel functions may be executed.
Definition: context.hpp:35
pi_sampler_addressing_mode
_pi_sampler_addressing_mode pi_sampler_addressing_mode
Definition: pi.h:600
cl::sycl::detail::pi::DeviceBinaryImage::DeviceBinaryImage
DeviceBinaryImage()
Definition: pi.hpp:298
cl::sycl::detail::pi::ByteArray
Definition: pi.hpp:211
__SYCL_PI_PROPERTY_SET_SYCL_EXPORTED_SYMBOLS
#define __SYCL_PI_PROPERTY_SET_SYCL_EXPORTED_SYMBOLS
PropertySetRegistry::SYCL_EXPORTED_SYMBOLS defined in PropertySetIO.h.
Definition: pi.h:731
pi_device_type
_pi_device_type pi_device_type
Definition: pi.h:581
P
#define P(n)
cl::sycl::detail::pi::DeviceBinaryProperty::DeviceBinaryProperty
DeviceBinaryProperty(const _pi_device_binary_property_struct *Prop)
Definition: pi.hpp:229
pi_sampler_filter_mode
_pi_sampler_filter_mode pi_sampler_filter_mode
Definition: pi.h:601
cl::sycl::info::context
context
Definition: info_desc.hpp:41
cl::sycl::detail::pi::DeviceBinaryImage::PropertyRange::ConstIterator
Definition: pi.hpp:253
cl::sycl::detail::pi::DeviceBinaryImage::get
pi_device_binary get() const
Definition: pi.hpp:383
cl::sycl::detail::pi::DeviceBinaryImage::PropertyRange::isAvailable
bool isAvailable() const
Definition: pi.hpp:280
cl::sycl::stream
A buffered output stream that allows outputting the values of built-in, vector and SYCL types to the ...
Definition: stream.hpp:743
cl::sycl::detail::pi::loadOsLibrary
void * loadOsLibrary(const std::string &Library)
Definition: posix_pi.cpp:19
pi_image_channel_type
_pi_image_channel_type pi_image_channel_type
Definition: pi.h:598
cl::sycl::detail::pi::trace
bool trace(TraceLevel level)
Definition: pi.cpp:368
cl::sycl::detail::pi::DeviceBinaryImage::SpecConstIDMap
DeviceBinaryImage::PropertyRange SpecConstIDMap
Definition: pi.hpp:387
pi_device
_pi_device * pi_device
Definition: pi.h:867
_pi_context
PI context mapping to a CUDA context object.
Definition: pi_cuda.hpp:148
pi_context
_pi_context * pi_context
Definition: pi.h:868
_pi_device
PI device mapping to a CUdevice.
Definition: pi_cuda.hpp:71
__SYCL_INLINE_NAMESPACE
#define __SYCL_INLINE_NAMESPACE(X)
Definition: defines_elementary.hpp:12