DPC++ Runtime
Runtime libraries for oneAPI DPC++
pi.h
Go to the documentation of this file.
1 //==---------- pi.h - Plugin Interface -------------------------------------==//
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 
10 // TODO: link to sphinx page
11 
21 
22 #ifndef _PI_H_
23 #define _PI_H_
24 
25 // Every single change in PI API should be accompanied with the minor
26 // version increase (+1). In the cases where backward compatibility is not
27 // maintained there should be a (+1) change to the major version in
28 // addition to the increase of the minor.
29 //
30 // PI version changes log:
31 // -- Version 1.2:
32 // 1. (Binary backward compatibility breaks) Two fields added to the
33 // pi_device_binary_struct structure:
34 // pi_device_binary_property_set PropertySetsBegin;
35 // pi_device_binary_property_set PropertySetsEnd;
36 // 2. A number of types needed to define pi_device_binary_property_set added.
37 // 3. Added new ownership argument to piextContextCreateWithNativeHandle.
38 // 4. Add interoperability interfaces for kernel.
39 // 4.6 Added new ownership argument to piextQueueCreateWithNativeHandle which
40 // changes the API version from 3.5 to 4.6.
41 // 5.7 Added new context and ownership arguments to
42 // piextEventCreateWithNativeHandle
43 // 6.8 Added new ownership argument to piextProgramCreateWithNativeHandle. Added
44 // piQueueFlush function.
45 // 7.9 Added new context and ownership arguments to
46 // piextMemCreateWithNativeHandle.
47 // 8.10 Added new optional device argument to piextQueueCreateWithNativeHandle
48 // 9.11 Use values of OpenCL enums directly, rather than including `<CL/cl.h>`;
49 // NOTE that this results in a changed API for `piProgramGetBuildInfo`.
50 // 10.12 Change enum value PI_MEM_ADVICE_UNKNOWN from 0 to 999, and set enum
51 // PI_MEM_ADVISE_RESET to 0.
52 // 10.13 Added new PI_EXT_ONEAPI_QUEUE_DISCARD_EVENTS queue property.
53 // 10.14 Add PI_EXT_INTEL_DEVICE_INFO_FREE_MEMORY as an extension for
54 // piDeviceGetInfo.
55 // 11.15 piEventCreate creates even in the signalled state now.
56 // 11.16 Add PI_EXT_INTEL_DEVICE_INFO_MEMORY_CLOCK_RATE and
57 // PI_EXT_INTEL_DEVICE_INFO_MEMORY_BUS_WIDTH as an extension for
58 // piDeviceGetInfo.
59 // 11.17 Added new PI_EXT_ONEAPI_QUEUE_PRIORITY_LOW and
60 // PI_EXT_ONEAPI_QUEUE_PRIORITY_HIGH queue properties.
61 // 11.18 Add new parameter name PI_EXT_ONEAPI_QUEUE_INFO_EMPTY to
62 // _pi_queue_info.
63 // 12.19 Add new PI_EXT_INTEL_DEVICE_PARTITION_BY_CSLICE piDevicePartition
64 // scheme. Sub-sub-devices (representing compute slice) creation via
65 // partitioning by affinity domain is disabled by default and can be temporarily
66 // restored via SYCL_PI_LEVEL_ZERO_EXPOSE_CSLICE_IN_AFFINITY_PARTITIONING
67 // environment variable.
68 // 12.20 Added piextQueueCreate API to be used instead of piQueueCreate, also
69 // added PI_EXT_INTEL_DEVICE_INFO_MAX_COMPUTE_QUEUE_INDICES for piDeviceGetInfo.
70 // Both are needed to support sycl_ext_intel_queue_index extension.
71 // 12.21 Added new piextUSMEnqueueFill2D, piextUSMEnqueueMemset2D, and
72 // piextUSMEnqueueMemcpy2D functions. Added new
73 // PI_EXT_ONEAPI_CONTEXT_INFO_USM_FILL2D_SUPPORT,
74 // PI_EXT_ONEAPI_CONTEXT_INFO_USM_MEMSET2D_SUPPORT, and
75 // PI_EXT_ONEAPI_CONTEXT_INFO_USM_MEMCPY2D_SUPPORT context info query
76 // descriptors.
77 // 12.22 Add piGetDeviceAndHostTimer to query device wall-clock timestamp
78 // 12.23 Added new piextEnqueueDeviceGlobalVariableWrite and
79 // piextEnqueueDeviceGlobalVariableRead functions.
80 
81 #define _PI_H_VERSION_MAJOR 12
82 #define _PI_H_VERSION_MINOR 23
83 
84 #define _PI_STRING_HELPER(a) #a
85 #define _PI_CONCAT(a, b) _PI_STRING_HELPER(a.b)
86 #define _PI_TRIPLE_CONCAT(a, b, c) _PI_STRING_HELPER(a.b.c)
87 
88 // This is the macro that plugins should all use to define their version.
89 // _PI_PLUGIN_VERSION_STRING will be printed when environment variable
90 // SYCL_PI_TRACE is set to 1. PluginVersion should be defined for each plugin
91 // in plugins/*/pi_*.hpp. PluginVersion should be incremented with each change
92 // to the plugin.
93 #define _PI_PLUGIN_VERSION_STRING(PluginVersion) \
94  _PI_TRIPLE_CONCAT(_PI_H_VERSION_MAJOR, _PI_H_VERSION_MINOR, PluginVersion)
95 
96 #define _PI_H_VERSION_STRING \
97  _PI_CONCAT(_PI_H_VERSION_MAJOR, _PI_H_VERSION_MINOR)
98 
99 // This will be used to check the major versions of plugins versus the major
100 // versions of PI.
101 #define _PI_STRING_SUBSTITUTE(X) _PI_STRING_HELPER(X)
102 #define _PI_PLUGIN_VERSION_CHECK(PI_API_VERSION, PI_PLUGIN_VERSION) \
103  if (strncmp(PI_API_VERSION, PI_PLUGIN_VERSION, \
104  sizeof(_PI_STRING_SUBSTITUTE(_PI_H_VERSION_MAJOR))) < 0) { \
105  return PI_ERROR_INVALID_OPERATION; \
106  }
107 
108 // NOTE: This file presents a maping of OpenCL to PI enums, constants and
109 // typedefs. The general approach taken was to replace `CL_` prefix with `PI_`.
110 // Please consider this when adding or modifying values, as the strict value
111 // match is required.
112 // TODO: We should consider re-implementing PI enums and constants and only
113 // perform a mapping of PI to OpenCL in the pi_opencl backend.
114 #include <sycl/detail/export.hpp>
115 
116 #include <cstddef>
117 #include <cstdint>
118 
119 #ifdef __cplusplus
120 extern "C" {
121 #endif // __cplusplus
122 
123 using pi_int32 = int32_t;
124 using pi_uint32 = uint32_t;
125 using pi_uint64 = uint64_t;
128 using pi_native_handle = uintptr_t;
129 
130 //
131 // NOTE: prefer to map 1:1 to OpenCL so that no translation is needed
132 // for PI <-> OpenCL ways. The PI <-> to other BE translation is almost
133 // always needed anyway.
134 //
135 typedef enum {
136 #define _PI_ERRC(NAME, VAL) NAME = VAL,
137 #define _PI_ERRC_WITH_MSG(NAME, VAL, MSG) NAME = VAL,
138 #include <sycl/detail/pi_error.def>
139 #undef _PI_ERRC
140 #undef _PI_ERRC_WITH_MSG
141 } _pi_result;
142 
143 typedef enum {
147  PI_EVENT_QUEUED = 0x3
149 
150 typedef enum {
155  PI_PLATFORM_INFO_VERSION = 0x0901
157 
158 typedef enum {
164 
165 typedef enum {
171 
172 typedef enum {
178 
179 // NOTE: this is made 64-bit to match the size of cl_device_type to
180 // make the translation to OpenCL transparent.
181 //
182 typedef enum : pi_uint64 {
184  (1 << 0),
185  PI_DEVICE_TYPE_ALL = 0xFFFFFFFF,
186  PI_DEVICE_TYPE_CPU = (1 << 1),
187  PI_DEVICE_TYPE_GPU = (1 << 2),
188  PI_DEVICE_TYPE_ACC = (1 << 3),
190  PI_DEVICE_TYPE_CUSTOM = (1 << 4)
192 
193 typedef enum {
198 
199 typedef enum {
203 
204 typedef enum {
289  // Intel UUID extension.
291  // These are Intel-specific extensions.
301  // Return true if sub-device should do its own program build
304  // Return 0 if device doesn't have any memory modules. Return the minimum of
305  // the clock rate values if there are several memory modules on the device.
307  // Return 0 if device doesn't have any memory modules. Return the minimum of
308  // the bus width values if there are several memory modules on the device.
310  // Return 1 if the device doesn't have a notion of a "queue index". Otherwise,
311  // return the number of queue indices that are available for this device.
318  // Return whether bfloat16 math functions are supported by device
326 
327 typedef enum {
338 
339 typedef enum {
345  // Atomics capabilities extensions
348  // Native 2D USM memory operation support
353 
354 typedef enum {
361  // Return 'true' if all commands previously submitted to the queue have
362  // completed, otherwise return 'false'.
365 
366 typedef enum {
374 
375 typedef enum {
382  // The number of registers used by the compiled kernel (device specific)
385 
386 typedef enum {
393  PI_IMAGE_INFO_DEPTH = 0x1116
395 
396 typedef enum {
402 
403 typedef enum {
410 
411 typedef enum {
444 
445 typedef enum {
454 
455 typedef enum {
456  // Device-specific value opaque in PI API.
470 
471 typedef enum {
488 
489 typedef enum {
506 
508 
509 const pi_bool PI_TRUE = 1;
510 const pi_bool PI_FALSE = 0;
511 
512 typedef enum {
520  PI_SAMPLER_INFO_LOD_MAX = 0x1157
522 
523 typedef enum {
530 
531 typedef enum {
535 
536 using pi_context_properties = intptr_t;
537 
540  (1 << 0);
543 
546  0x1152;
549 
556 
563 
564 typedef enum {
570 
571 // NOTE: this is made 64-bit to match the size of cl_mem_flags to
572 // make the translation to OpenCL transparent.
573 // TODO: populate
574 //
576 // Access
579 // Host pointer
583 
584 // flags passed to Map operations
586 constexpr pi_map_flags PI_MAP_READ = (1 << 0);
587 constexpr pi_map_flags PI_MAP_WRITE = (1 << 1);
589 // NOTE: this is made 64-bit to match the size of cl_mem_properties_intel to
590 // make the translation to OpenCL transparent.
594 
595 // NOTE: this is made 64-bit to match the size of cl_mem_properties_intel to
596 // make the translation to OpenCL transparent.
601  (1 << 1);
603 // Hints that the device/shared allocation will not be written on device.
605 
607 
608 // NOTE: queue properties are implemented this way to better support bit
609 // manipulations
613 // clang-format off
621 // clang-format on
622 
652 
653 // For compatibility with OpenCL define this not as enum.
656  0x1086;
658  0x1087;
659 static constexpr pi_device_partition_property
661 static constexpr pi_device_partition_property
663 static constexpr pi_device_partition_property
665 
666 // For compatibility with OpenCL define this not as enum.
669  (1 << 0);
671  (1 << 1);
673  (1 << 2);
675  (1 << 3);
677  (1 << 4);
678 static constexpr pi_device_affinity_domain
680 
681 // For compatibility with OpenCL define this not as enum.
683 static constexpr pi_device_fp_config PI_FP_DENORM = (1 << 0);
684 static constexpr pi_device_fp_config PI_FP_INF_NAN = (1 << 1);
685 static constexpr pi_device_fp_config PI_FP_ROUND_TO_NEAREST = (1 << 2);
686 static constexpr pi_device_fp_config PI_FP_ROUND_TO_ZERO = (1 << 3);
687 static constexpr pi_device_fp_config PI_FP_ROUND_TO_INF = (1 << 4);
688 static constexpr pi_device_fp_config PI_FP_FMA = (1 << 5);
689 static constexpr pi_device_fp_config PI_FP_SOFT_FLOAT = (1 << 6);
691  (1 << 7);
692 
693 // For compatibility with OpenCL define this not as enum.
695 static constexpr pi_device_exec_capabilities PI_EXEC_KERNEL = (1 << 0);
697 
698 // Entry type, matches OpenMP for compatibility
700  void *addr;
701  char *name;
702  size_t size;
703  int32_t flags;
704  int32_t reserved;
705 };
706 
708 
709 // A type of a binary image property.
710 typedef enum {
712  PI_PROPERTY_TYPE_UINT32, // 32-bit integer
714  PI_PROPERTY_TYPE_STRING // null-terminated string
716 
717 // Device binary image property.
718 // If the type size of the property value is fixed and is no greater than
719 // 64 bits, then ValAddr is 0 and the value is stored in the ValSize field.
720 // Example - PI_PROPERTY_TYPE_UINT32, which is 32-bit
722  char *Name; // null-terminated property name
723  void *ValAddr; // address of property value
724  uint32_t Type; // _pi_property_type
725  uint64_t ValSize; // size of property value in bytes
726 };
727 
729 
730 // Named array of properties.
732  char *Name; // the name
735 };
736 
738 
740 using pi_device_binary_type = uint8_t;
741 // format is not determined
743 // specific to a device
745 // portable binary types go next
746 // SPIR-V
748 // LLVM bitcode
750 
751 // Device binary descriptor version supported by this library.
752 static const uint16_t PI_DEVICE_BINARY_VERSION = 1;
753 
754 // The kind of offload model the binary employs; must be 4 for SYCL
755 static const uint8_t PI_DEVICE_BINARY_OFFLOAD_KIND_SYCL = 4;
756 
764 #define __SYCL_PI_DEVICE_BINARY_TARGET_UNKNOWN "<unknown>"
766 #define __SYCL_PI_DEVICE_BINARY_TARGET_SPIRV32 "spir"
768 #define __SYCL_PI_DEVICE_BINARY_TARGET_SPIRV64 "spir64"
771 #define __SYCL_PI_DEVICE_BINARY_TARGET_SPIRV64_X86_64 "spir64_x86_64"
772 #define __SYCL_PI_DEVICE_BINARY_TARGET_SPIRV64_GEN "spir64_gen"
773 #define __SYCL_PI_DEVICE_BINARY_TARGET_SPIRV64_FPGA "spir64_fpga"
775 #define __SYCL_PI_DEVICE_BINARY_TARGET_NVPTX64 "nvptx64"
776 #define __SYCL_PI_DEVICE_BINARY_TARGET_AMDGCN "amdgcn"
777 
781 #define PI_DEVICE_INFO_EXTENSION_DEVICELIB_ASSERT \
782  "pi_ext_intel_devicelib_assert"
783 
788 #define __SYCL_PI_PROPERTY_SET_SPEC_CONST_MAP "SYCL/specialization constants"
791 #define __SYCL_PI_PROPERTY_SET_SPEC_CONST_DEFAULT_VALUES_MAP \
792  "SYCL/specialization constants default values"
794 #define __SYCL_PI_PROPERTY_SET_DEVICELIB_REQ_MASK "SYCL/devicelib req mask"
796 #define __SYCL_PI_PROPERTY_SET_KERNEL_PARAM_OPT_INFO "SYCL/kernel param opt"
798 #define __SYCL_PI_PROPERTY_SET_PROGRAM_METADATA "SYCL/program metadata"
800 #define __SYCL_PI_PROPERTY_SET_SYCL_MISC_PROP "SYCL/misc properties"
802 #define __SYCL_PI_PROPERTY_SET_SYCL_ASSERT_USED "SYCL/assert used"
804 #define __SYCL_PI_PROPERTY_SET_SYCL_EXPORTED_SYMBOLS "SYCL/exported symbols"
806 #define __SYCL_PI_PROPERTY_SET_SYCL_DEVICE_GLOBALS "SYCL/device globals"
808 #define __SYCL_PI_PROPERTY_SET_SYCL_DEVICE_REQUIREMENTS \
809  "SYCL/device requirements"
810 
813 #define __SYCL_PI_PROGRAM_METADATA_TAG_REQD_WORK_GROUP_SIZE \
814  "@reqd_work_group_size"
815 #define __SYCL_PI_PROGRAM_METADATA_GLOBAL_ID_MAPPING "@global_id_mapping"
816 
826  uint16_t Version;
828  uint8_t Kind;
830  uint8_t Format;
842  const char *DeviceTargetSpec;
845  const char *CompileOptions;
848  const char *LinkOptions;
850  const char *ManifestStart;
852  const char *ManifestEnd;
854  const unsigned char *BinaryStart;
856  const unsigned char *BinaryEnd;
860  // Array of preperty sets; e.g. specialization constants symbol-int ID map is
861  // propagated to runtime with this mechanism.
864  // TODO Other fields like entries, link options can be propagated using
865  // the property set infrastructure. This will improve binary compatibility and
866  // add flexibility.
867 };
869 
870 // pi_buffer_region structure repeats cl_buffer_region, used for sub buffers.
872  size_t origin;
873  size_t size;
874 };
876 
877 // pi_buff_rect_offset structure is 3D offset argument passed to buffer rect
878 // operations (piEnqueueMemBufferCopyRect, etc).
880  size_t x_bytes;
881  size_t y_scalar;
882  size_t z_scalar;
883 };
885 
886 // pi_buff_rect_region structure represents size of 3D region passed to buffer
887 // rect operations (piEnqueueMemBufferCopyRect, etc).
889  size_t width_bytes;
891  size_t depth_scalar;
892 };
894 
895 // pi_image_offset structure is 3D offset argument passed to image operations
896 // (piEnqueueMemImageRead, etc).
898  size_t x;
899  size_t y;
900  size_t z;
901 };
903 
904 // pi_image_region structure represents size of 3D region passed to image
905 // operations (piEnqueueMemImageRead, etc).
907  size_t width;
908  size_t height;
909  size_t depth;
910 };
912 
913 // Offload binaries descriptor version supported by this library.
914 static const uint16_t PI_DEVICE_BINARIES_VERSION = 1;
915 
923  uint16_t Version;
931 };
933 
934 // Opaque types that make reading build log errors easier.
935 struct _pi_platform;
936 struct _pi_device;
937 struct _pi_context;
938 struct _pi_queue;
939 struct _pi_mem;
940 struct _pi_program;
941 struct _pi_kernel;
942 struct _pi_event;
943 struct _pi_sampler;
944 
948 using pi_queue = _pi_queue *;
949 using pi_mem = _pi_mem *;
952 using pi_event = _pi_event *;
954 
955 typedef struct {
959 
960 typedef struct {
962  size_t image_width;
963  size_t image_height;
964  size_t image_depth;
972 
975 
976 typedef enum { PI_MEM_CONTEXT = 0x1106, PI_MEM_SIZE = 0x1102 } _pi_mem_info;
977 
979 
980 //
981 // Following section contains SYCL RT Plugin Interface (PI) functions.
982 // They are 3 distinct categories:
983 //
984 // 1) Ones having direct analogy in OpenCL and needed for the core SYCL
985 // functionality are started with just "pi" prefix in their names.
986 // 2) Those having direct analogy in OpenCL but only needed for SYCL
987 // interoperability with OpenCL are started with "picl" prefix.
988 // 3) Functions having no direct analogy in OpenCL, started with "piext".
989 //
990 // TODO: describe interfaces in Doxygen format
991 //
992 
993 struct _pi_plugin;
995 
996 // PI Plugin Initialise.
997 // Plugin will check the PI version of Plugin Interface,
998 // populate the PI Version it supports, update targets field and populate
999 // PiFunctionTable with Supported APIs. The pointers are in a predetermined
1000 // order in pi.def file.
1001 __SYCL_EXPORT pi_result piPluginInit(pi_plugin *plugin_info);
1002 
1003 //
1004 // Platform
1005 //
1006 __SYCL_EXPORT pi_result piPlatformsGet(pi_uint32 num_entries,
1007  pi_platform *platforms,
1008  pi_uint32 *num_platforms);
1009 
1010 __SYCL_EXPORT pi_result piPlatformGetInfo(pi_platform platform,
1011  pi_platform_info param_name,
1012  size_t param_value_size,
1013  void *param_value,
1014  size_t *param_value_size_ret);
1015 
1021  pi_platform platform, pi_native_handle *nativeHandle);
1022 
1029  pi_native_handle nativeHandle, pi_platform *platform);
1030 
1031 __SYCL_EXPORT pi_result piDevicesGet(pi_platform platform,
1033  pi_uint32 num_entries, pi_device *devices,
1034  pi_uint32 *num_devices);
1035 
1039 __SYCL_EXPORT pi_result piDeviceGetInfo(pi_device device,
1040  pi_device_info param_name,
1041  size_t param_value_size,
1042  void *param_value,
1043  size_t *param_value_size_ret);
1044 
1045 __SYCL_EXPORT pi_result piDeviceRetain(pi_device device);
1046 
1047 __SYCL_EXPORT pi_result piDeviceRelease(pi_device device);
1048 
1049 __SYCL_EXPORT pi_result piDevicePartition(
1050  pi_device device, const pi_device_partition_property *properties,
1051  pi_uint32 num_devices, pi_device *out_devices, pi_uint32 *out_num_devices);
1052 
1057 __SYCL_EXPORT pi_result
1059 
1067  pi_native_handle nativeHandle, pi_platform platform, pi_device *device);
1068 
1072 __SYCL_EXPORT pi_result piextDeviceSelectBinary(pi_device device,
1073  pi_device_binary *binaries,
1074  pi_uint32 num_binaries,
1075  pi_uint32 *selected_binary_ind);
1076 
1089  pi_device device, pi_program program, const char *function_name,
1090  pi_uint64 *function_pointer_ret);
1091 
1092 //
1093 // Context
1094 //
1096  const pi_context_properties *properties, pi_uint32 num_devices,
1097  const pi_device *devices,
1098  void (*pfn_notify)(const char *errinfo, const void *private_info, size_t cb,
1099  void *user_data),
1100  void *user_data, pi_context *ret_context);
1101 
1102 __SYCL_EXPORT pi_result piContextGetInfo(pi_context context,
1103  pi_context_info param_name,
1104  size_t param_value_size,
1105  void *param_value,
1106  size_t *param_value_size_ret);
1107 
1108 __SYCL_EXPORT pi_result piContextRetain(pi_context context);
1109 
1110 __SYCL_EXPORT pi_result piContextRelease(pi_context context);
1111 
1112 typedef void (*pi_context_extended_deleter)(void *user_data);
1113 
1115  pi_context context, pi_context_extended_deleter func, void *user_data);
1116 
1121 __SYCL_EXPORT pi_result
1123 
1148  pi_native_handle nativeHandle, pi_uint32 numDevices,
1149  const pi_device *devices, bool pluginOwnsNativeHandle, pi_context *context);
1150 
1151 //
1152 // Queue
1153 //
1154 
1155 // TODO: Remove during next ABI break and rename piextQueueCreate to
1156 // piQueueCreate.
1157 __SYCL_EXPORT pi_result piQueueCreate(pi_context context, pi_device device,
1158  pi_queue_properties properties,
1159  pi_queue *queue);
1163 __SYCL_EXPORT pi_result piextQueueCreate(pi_context context, pi_device device,
1164  pi_queue_properties *properties,
1165  pi_queue *queue);
1166 
1167 __SYCL_EXPORT pi_result piQueueGetInfo(pi_queue command_queue,
1168  pi_queue_info param_name,
1169  size_t param_value_size,
1170  void *param_value,
1171  size_t *param_value_size_ret);
1172 
1173 __SYCL_EXPORT pi_result piQueueRetain(pi_queue command_queue);
1174 
1175 __SYCL_EXPORT pi_result piQueueRelease(pi_queue command_queue);
1176 
1177 __SYCL_EXPORT pi_result piQueueFinish(pi_queue command_queue);
1178 
1179 __SYCL_EXPORT pi_result piQueueFlush(pi_queue command_queue);
1180 
1185 __SYCL_EXPORT pi_result
1187 
1200  pi_native_handle nativeHandle, pi_context context, pi_device device,
1201  bool pluginOwnsNativeHandle, pi_queue *queue);
1202 
1203 //
1204 // Memory
1205 //
1206 __SYCL_EXPORT pi_result piMemBufferCreate(
1207  pi_context context, pi_mem_flags flags, size_t size, void *host_ptr,
1208  pi_mem *ret_mem, const pi_mem_properties *properties = nullptr);
1209 
1210 __SYCL_EXPORT pi_result piMemImageCreate(pi_context context, pi_mem_flags flags,
1211  const pi_image_format *image_format,
1212  const pi_image_desc *image_desc,
1213  void *host_ptr, pi_mem *ret_mem);
1214 
1215 __SYCL_EXPORT pi_result piMemGetInfo(pi_mem mem, pi_mem_info param_name,
1216  size_t param_value_size, void *param_value,
1217  size_t *param_value_size_ret);
1218 
1219 __SYCL_EXPORT pi_result piMemImageGetInfo(pi_mem image,
1220  pi_image_info param_name,
1221  size_t param_value_size,
1222  void *param_value,
1223  size_t *param_value_size_ret);
1224 
1225 __SYCL_EXPORT pi_result piMemRetain(pi_mem mem);
1226 
1227 __SYCL_EXPORT pi_result piMemRelease(pi_mem mem);
1228 
1229 __SYCL_EXPORT pi_result piMemBufferPartition(
1230  pi_mem buffer, pi_mem_flags flags, pi_buffer_create_type buffer_create_type,
1231  void *buffer_create_info, pi_mem *ret_mem);
1232 
1237 __SYCL_EXPORT pi_result piextMemGetNativeHandle(pi_mem mem,
1238  pi_native_handle *nativeHandle);
1239 
1249  pi_native_handle nativeHandle, pi_context context, bool ownNativeHandle,
1250  pi_mem *mem);
1251 
1252 //
1253 // Program
1254 //
1255 
1256 __SYCL_EXPORT pi_result piProgramCreate(pi_context context, const void *il,
1257  size_t length, pi_program *res_program);
1258 
1259 __SYCL_EXPORT pi_result piclProgramCreateWithSource(pi_context context,
1260  pi_uint32 count,
1261  const char **strings,
1262  const size_t *lengths,
1263  pi_program *ret_program);
1264 
1281 __SYCL_EXPORT pi_result piProgramCreateWithBinary(
1282  pi_context context, pi_uint32 num_devices, const pi_device *device_list,
1283  const size_t *lengths, const unsigned char **binaries,
1284  size_t num_metadata_entries, const pi_device_binary_property *metadata,
1285  pi_int32 *binary_status, pi_program *ret_program);
1286 
1287 __SYCL_EXPORT pi_result piProgramGetInfo(pi_program program,
1288  pi_program_info param_name,
1289  size_t param_value_size,
1290  void *param_value,
1291  size_t *param_value_size_ret);
1292 
1293 __SYCL_EXPORT pi_result
1294 piProgramLink(pi_context context, pi_uint32 num_devices,
1295  const pi_device *device_list, const char *options,
1296  pi_uint32 num_input_programs, const pi_program *input_programs,
1297  void (*pfn_notify)(pi_program program, void *user_data),
1298  void *user_data, pi_program *ret_program);
1299 
1301  pi_program program, pi_uint32 num_devices, const pi_device *device_list,
1302  const char *options, pi_uint32 num_input_headers,
1303  const pi_program *input_headers, const char **header_include_names,
1304  void (*pfn_notify)(pi_program program, void *user_data), void *user_data);
1305 
1307  pi_program program, pi_uint32 num_devices, const pi_device *device_list,
1308  const char *options,
1309  void (*pfn_notify)(pi_program program, void *user_data), void *user_data);
1310 
1311 __SYCL_EXPORT pi_result piProgramGetBuildInfo(
1312  pi_program program, pi_device device, _pi_program_build_info param_name,
1313  size_t param_value_size, void *param_value, size_t *param_value_size_ret);
1314 
1315 __SYCL_EXPORT pi_result piProgramRetain(pi_program program);
1316 
1317 __SYCL_EXPORT pi_result piProgramRelease(pi_program program);
1318 
1328 __SYCL_EXPORT pi_result
1330  size_t spec_size, const void *spec_value);
1331 
1336 __SYCL_EXPORT pi_result
1338 
1348  pi_native_handle nativeHandle, pi_context context,
1349  bool pluginOwnsNativeHandle, pi_program *program);
1350 
1351 //
1352 // Kernel
1353 //
1354 
1355 typedef enum {
1359  PI_USM_PTRS = 0x4203
1361 
1363 
1364 __SYCL_EXPORT pi_result piKernelCreate(pi_program program,
1365  const char *kernel_name,
1366  pi_kernel *ret_kernel);
1367 
1368 __SYCL_EXPORT pi_result piKernelSetArg(pi_kernel kernel, pi_uint32 arg_index,
1369  size_t arg_size, const void *arg_value);
1370 
1371 __SYCL_EXPORT pi_result piKernelGetInfo(pi_kernel kernel,
1372  pi_kernel_info param_name,
1373  size_t param_value_size,
1374  void *param_value,
1375  size_t *param_value_size_ret);
1376 
1377 __SYCL_EXPORT pi_result piKernelGetGroupInfo(pi_kernel kernel, pi_device device,
1378  pi_kernel_group_info param_name,
1379  size_t param_value_size,
1380  void *param_value,
1381  size_t *param_value_size_ret);
1382 
1401 __SYCL_EXPORT pi_result piKernelGetSubGroupInfo(
1402  pi_kernel kernel, pi_device device, pi_kernel_sub_group_info param_name,
1403  size_t input_value_size, const void *input_value, size_t param_value_size,
1404  void *param_value, size_t *param_value_size_ret);
1405 
1406 __SYCL_EXPORT pi_result piKernelRetain(pi_kernel kernel);
1407 
1408 __SYCL_EXPORT pi_result piKernelRelease(pi_kernel kernel);
1409 
1417 __SYCL_EXPORT pi_result piextKernelSetArgPointer(pi_kernel kernel,
1418  pi_uint32 arg_index,
1419  size_t arg_size,
1420  const void *arg_value);
1421 
1433 __SYCL_EXPORT pi_result piKernelSetExecInfo(pi_kernel kernel,
1434  pi_kernel_exec_info value_name,
1435  size_t param_value_size,
1436  const void *param_value);
1437 
1448  pi_native_handle nativeHandle, pi_context context, pi_program program,
1449  bool pluginOwnsNativeHandle, pi_kernel *kernel);
1450 
1455 __SYCL_EXPORT pi_result
1457 
1458 //
1459 // Events
1460 //
1461 
1466 __SYCL_EXPORT pi_result piEventCreate(pi_context context, pi_event *ret_event);
1467 
1468 __SYCL_EXPORT pi_result piEventGetInfo(pi_event event, pi_event_info param_name,
1469  size_t param_value_size,
1470  void *param_value,
1471  size_t *param_value_size_ret);
1472 
1473 __SYCL_EXPORT pi_result piEventGetProfilingInfo(pi_event event,
1474  pi_profiling_info param_name,
1475  size_t param_value_size,
1476  void *param_value,
1477  size_t *param_value_size_ret);
1478 
1479 __SYCL_EXPORT pi_result piEventsWait(pi_uint32 num_events,
1480  const pi_event *event_list);
1481 
1483  pi_event event, pi_int32 command_exec_callback_type,
1485  void *user_data),
1486  void *user_data);
1487 
1488 __SYCL_EXPORT pi_result piEventSetStatus(pi_event event,
1489  pi_int32 execution_status);
1490 
1491 __SYCL_EXPORT pi_result piEventRetain(pi_event event);
1492 
1493 __SYCL_EXPORT pi_result piEventRelease(pi_event event);
1494 
1499 __SYCL_EXPORT pi_result
1501 
1511  pi_native_handle nativeHandle, pi_context context, bool ownNativeHandle,
1512  pi_event *event);
1513 
1514 //
1515 // Sampler
1516 //
1517 __SYCL_EXPORT pi_result piSamplerCreate(
1518  pi_context context, const pi_sampler_properties *sampler_properties,
1519  pi_sampler *result_sampler);
1520 
1521 __SYCL_EXPORT pi_result piSamplerGetInfo(pi_sampler sampler,
1522  pi_sampler_info param_name,
1523  size_t param_value_size,
1524  void *param_value,
1525  size_t *param_value_size_ret);
1526 
1527 __SYCL_EXPORT pi_result piSamplerRetain(pi_sampler sampler);
1528 
1529 __SYCL_EXPORT pi_result piSamplerRelease(pi_sampler sampler);
1530 
1531 //
1532 // Queue Commands
1533 //
1534 __SYCL_EXPORT pi_result piEnqueueKernelLaunch(
1535  pi_queue queue, pi_kernel kernel, pi_uint32 work_dim,
1536  const size_t *global_work_offset, const size_t *global_work_size,
1537  const size_t *local_work_size, pi_uint32 num_events_in_wait_list,
1538  const pi_event *event_wait_list, pi_event *event);
1539 
1540 __SYCL_EXPORT pi_result piEnqueueNativeKernel(
1541  pi_queue queue, void (*user_func)(void *), void *args, size_t cb_args,
1542  pi_uint32 num_mem_objects, const pi_mem *mem_list,
1543  const void **args_mem_loc, pi_uint32 num_events_in_wait_list,
1544  const pi_event *event_wait_list, pi_event *event);
1545 
1546 __SYCL_EXPORT pi_result piEnqueueEventsWait(pi_queue command_queue,
1547  pi_uint32 num_events_in_wait_list,
1548  const pi_event *event_wait_list,
1549  pi_event *event);
1550 
1552  pi_queue command_queue, pi_uint32 num_events_in_wait_list,
1553  const pi_event *event_wait_list, pi_event *event);
1554 
1555 __SYCL_EXPORT pi_result piEnqueueMemBufferRead(
1556  pi_queue queue, pi_mem buffer, pi_bool blocking_read, size_t offset,
1557  size_t size, void *ptr, pi_uint32 num_events_in_wait_list,
1558  const pi_event *event_wait_list, pi_event *event);
1559 
1561  pi_queue command_queue, pi_mem buffer, pi_bool blocking_read,
1562  pi_buff_rect_offset buffer_offset, pi_buff_rect_offset host_offset,
1563  pi_buff_rect_region region, size_t buffer_row_pitch,
1564  size_t buffer_slice_pitch, size_t host_row_pitch, size_t host_slice_pitch,
1565  void *ptr, pi_uint32 num_events_in_wait_list,
1566  const pi_event *event_wait_list, pi_event *event);
1567 
1568 __SYCL_EXPORT pi_result
1569 piEnqueueMemBufferWrite(pi_queue command_queue, pi_mem buffer,
1570  pi_bool blocking_write, size_t offset, size_t size,
1571  const void *ptr, pi_uint32 num_events_in_wait_list,
1572  const pi_event *event_wait_list, pi_event *event);
1573 
1575  pi_queue command_queue, pi_mem buffer, pi_bool blocking_write,
1576  pi_buff_rect_offset buffer_offset, pi_buff_rect_offset host_offset,
1577  pi_buff_rect_region region, size_t buffer_row_pitch,
1578  size_t buffer_slice_pitch, size_t host_row_pitch, size_t host_slice_pitch,
1579  const void *ptr, pi_uint32 num_events_in_wait_list,
1580  const pi_event *event_wait_list, pi_event *event);
1581 
1582 __SYCL_EXPORT pi_result
1583 piEnqueueMemBufferCopy(pi_queue command_queue, pi_mem src_buffer,
1584  pi_mem dst_buffer, size_t src_offset, size_t dst_offset,
1585  size_t size, pi_uint32 num_events_in_wait_list,
1586  const pi_event *event_wait_list, pi_event *event);
1587 
1589  pi_queue command_queue, pi_mem src_buffer, pi_mem dst_buffer,
1590  pi_buff_rect_offset src_origin, pi_buff_rect_offset dst_origin,
1591  pi_buff_rect_region region, size_t src_row_pitch, size_t src_slice_pitch,
1592  size_t dst_row_pitch, size_t dst_slice_pitch,
1593  pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list,
1594  pi_event *event);
1595 
1596 __SYCL_EXPORT pi_result
1597 piEnqueueMemBufferFill(pi_queue command_queue, pi_mem buffer,
1598  const void *pattern, size_t pattern_size, size_t offset,
1599  size_t size, pi_uint32 num_events_in_wait_list,
1600  const pi_event *event_wait_list, pi_event *event);
1601 
1602 __SYCL_EXPORT pi_result piEnqueueMemImageRead(
1603  pi_queue command_queue, pi_mem image, pi_bool blocking_read,
1604  pi_image_offset origin, pi_image_region region, size_t row_pitch,
1605  size_t slice_pitch, void *ptr, pi_uint32 num_events_in_wait_list,
1606  const pi_event *event_wait_list, pi_event *event);
1607 
1608 __SYCL_EXPORT pi_result piEnqueueMemImageWrite(
1609  pi_queue command_queue, pi_mem image, pi_bool blocking_write,
1610  pi_image_offset origin, pi_image_region region, size_t input_row_pitch,
1611  size_t input_slice_pitch, const void *ptr,
1612  pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list,
1613  pi_event *event);
1614 
1615 __SYCL_EXPORT pi_result piEnqueueMemImageCopy(
1616  pi_queue command_queue, pi_mem src_image, pi_mem dst_image,
1617  pi_image_offset src_origin, pi_image_offset dst_origin,
1618  pi_image_region region, pi_uint32 num_events_in_wait_list,
1619  const pi_event *event_wait_list, pi_event *event);
1620 
1621 __SYCL_EXPORT pi_result
1622 piEnqueueMemImageFill(pi_queue command_queue, pi_mem image,
1623  const void *fill_color, const size_t *origin,
1624  const size_t *region, pi_uint32 num_events_in_wait_list,
1625  const pi_event *event_wait_list, pi_event *event);
1626 
1627 __SYCL_EXPORT pi_result piEnqueueMemBufferMap(
1628  pi_queue command_queue, pi_mem buffer, pi_bool blocking_map,
1629  pi_map_flags map_flags, size_t offset, size_t size,
1630  pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list,
1631  pi_event *event, void **ret_map);
1632 
1633 __SYCL_EXPORT pi_result piEnqueueMemUnmap(pi_queue command_queue, pi_mem memobj,
1634  void *mapped_ptr,
1635  pi_uint32 num_events_in_wait_list,
1636  const pi_event *event_wait_list,
1637  pi_event *event);
1638 
1639 // Extension to allow backends to process a PI memory object before adding it
1640 // as an argument for a kernel.
1641 // Note: This is needed by the CUDA backend to extract the device pointer to
1642 // the memory as the kernels uses it rather than the PI object itself.
1643 __SYCL_EXPORT pi_result piextKernelSetArgMemObj(pi_kernel kernel,
1644  pi_uint32 arg_index,
1645  const pi_mem *arg_value);
1646 
1647 // Extension to allow backends to process a PI sampler object before adding it
1648 // as an argument for a kernel.
1649 // Note: This is needed by the CUDA backend to extract the properties of the
1650 // sampler as the kernels uses it rather than the PI object itself.
1651 __SYCL_EXPORT pi_result piextKernelSetArgSampler(pi_kernel kernel,
1652  pi_uint32 arg_index,
1653  const pi_sampler *arg_value);
1654 
1656 // USM
1658 typedef enum {
1665 
1666 typedef enum : pi_bitfield {
1667  PI_USM_ACCESS = (1 << 0),
1672 
1673 typedef enum {
1679 
1680 typedef enum {
1684  PI_MEM_TYPE_SHARED = 0x4199
1686 
1687 // Flag is used for piProgramUSMEnqueuePrefetch. PI_USM_MIGRATION_TBD0 is a
1688 // placeholder for future developments and should not change the behaviour of
1689 // piProgramUSMEnqueuePrefetch
1690 typedef enum : pi_bitfield {
1691  PI_USM_MIGRATION_TBD0 = (1 << 0)
1693 
1699 
1707 __SYCL_EXPORT pi_result piextUSMHostAlloc(void **result_ptr, pi_context context,
1708  pi_usm_mem_properties *properties,
1709  size_t size, pi_uint32 alignment);
1710 
1719 __SYCL_EXPORT pi_result piextUSMDeviceAlloc(void **result_ptr,
1720  pi_context context,
1721  pi_device device,
1722  pi_usm_mem_properties *properties,
1723  size_t size, pi_uint32 alignment);
1724 
1733 __SYCL_EXPORT pi_result piextUSMSharedAlloc(void **result_ptr,
1734  pi_context context,
1735  pi_device device,
1736  pi_usm_mem_properties *properties,
1737  size_t size, pi_uint32 alignment);
1738 
1745 __SYCL_EXPORT pi_result piextUSMFree(pi_context context, void *ptr);
1746 
1758 __SYCL_EXPORT pi_result piextUSMEnqueueMemset(pi_queue queue, void *ptr,
1759  pi_int32 value, size_t count,
1760  pi_uint32 num_events_in_waitlist,
1761  const pi_event *events_waitlist,
1762  pi_event *event);
1763 
1774 __SYCL_EXPORT pi_result piextUSMEnqueueMemcpy(pi_queue queue, pi_bool blocking,
1775  void *dst_ptr,
1776  const void *src_ptr, size_t size,
1777  pi_uint32 num_events_in_waitlist,
1778  const pi_event *events_waitlist,
1779  pi_event *event);
1780 
1790 __SYCL_EXPORT pi_result piextUSMEnqueuePrefetch(
1791  pi_queue queue, const void *ptr, size_t size, pi_usm_migration_flags flags,
1792  pi_uint32 num_events_in_waitlist, const pi_event *events_waitlist,
1793  pi_event *event);
1794 
1802 // USM memadvise API to govern behavior of automatic migration mechanisms
1803 __SYCL_EXPORT pi_result piextUSMEnqueueMemAdvise(pi_queue queue,
1804  const void *ptr, size_t length,
1805  pi_mem_advice advice,
1806  pi_event *event);
1807 
1824 __SYCL_EXPORT pi_result piextUSMGetMemAllocInfo(
1825  pi_context context, const void *ptr, pi_mem_alloc_info param_name,
1826  size_t param_value_size, void *param_value, size_t *param_value_size_ret);
1827 
1840 __SYCL_EXPORT pi_result piextUSMEnqueueFill2D(pi_queue queue, void *ptr,
1841  size_t pitch, size_t pattern_size,
1842  const void *pattern, size_t width,
1843  size_t height,
1844  pi_uint32 num_events_in_waitlist,
1845  const pi_event *events_waitlist,
1846  pi_event *event);
1847 
1859 __SYCL_EXPORT pi_result piextUSMEnqueueMemset2D(
1860  pi_queue queue, void *ptr, size_t pitch, int value, size_t width,
1861  size_t height, pi_uint32 num_events_in_waitlist,
1862  const pi_event *events_waitlist, pi_event *event);
1863 
1878 __SYCL_EXPORT pi_result piextUSMEnqueueMemcpy2D(
1879  pi_queue queue, pi_bool blocking, void *dst_ptr, size_t dst_pitch,
1880  const void *src_ptr, size_t src_pitch, size_t width, size_t height,
1881  pi_uint32 num_events_in_waitlist, const pi_event *events_waitlist,
1882  pi_event *event);
1883 
1887 
1902  pi_queue queue, pi_program program, const char *name,
1903  pi_bool blocking_write, size_t count, size_t offset, const void *src,
1904  pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list,
1905  pi_event *event);
1906 
1921  pi_queue queue, pi_program program, const char *name, pi_bool blocking_read,
1922  size_t count, size_t offset, void *dst, pi_uint32 num_events_in_wait_list,
1923  const pi_event *event_wait_list, pi_event *event);
1924 
1928 
1935 __SYCL_EXPORT pi_result piextPluginGetOpaqueData(void *opaque_data_param,
1936  void **opaque_data_return);
1937 
1941 __SYCL_EXPORT pi_result piTearDown(void *PluginParameter);
1942 
1954 __SYCL_EXPORT pi_result piPluginGetLastError(char **message);
1955 
1967  uint64_t *DeviceTime,
1968  uint64_t *HostTime);
1969 
1970 struct _pi_plugin {
1971  // PI version supported by host passed to the plugin. The Plugin
1972  // checks and writes the appropriate Function Pointers in
1973  // PiFunctionTable.
1974  // TODO: Work on version fields and their handshaking mechanism.
1975  // Some choices are:
1976  // - Use of integers to keep major and minor version.
1977  // - Keeping char* Versions.
1978  char PiVersion[20];
1979  // Plugin edits this.
1980  char PluginVersion[20];
1981  char *Targets;
1983 #define _PI_API(api) decltype(::api) *api;
1984 #include <sycl/detail/pi.def>
1986 };
1987 
1988 #ifdef __cplusplus
1989 } // extern "C"
1990 #endif // __cplusplus
1991 
1992 #endif // _PI_H_
multi_ptr< ElementType, access::address_space::ext_intel_global_host_space, IsDecorated > host_ptr
constexpr pi_queue_properties PI_QUEUE_COMPUTE_INDEX
Definition: pi.h:612
pi_result piextUSMEnqueueMemset(pi_queue queue, void *ptr, pi_int32 value, size_t count, pi_uint32 num_events_in_waitlist, const pi_event *events_waitlist, pi_event *event)
USM Memset API.
static constexpr pi_device_fp_config PI_FP_SOFT_FLOAT
Definition: pi.h:689
constexpr pi_mem_flags PI_MEM_ACCESS_READ_ONLY
Definition: pi.h:578
pi_result piKernelCreate(pi_program program, const char *kernel_name, pi_kernel *ret_kernel)
constexpr pi_memory_scope_capabilities PI_MEMORY_SCOPE_WORK_GROUP
Definition: pi.h:560
pi_bitfield pi_device_exec_capabilities
Definition: pi.h:538
int32_t pi_int32
Definition: pi.h:123
constexpr pi_sampler_properties PI_SAMPLER_PROPERTIES_NORMALIZED_COORDS
Definition: pi.h:545
constexpr pi_memory_scope_capabilities PI_MEMORY_SCOPE_WORK_ITEM
Definition: pi.h:558
pi_result piQueueFinish(pi_queue command_queue)
constexpr pi_usm_mem_properties PI_MEM_ALLOC_INITIAL_PLACEMENT_DEVICE
Definition: pi.h:600
uintptr_t pi_native_handle
Definition: pi.h:128
pi_result piProgramGetBuildInfo(pi_program program, pi_device device, _pi_program_build_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret)
static constexpr pi_device_binary_type PI_DEVICE_BINARY_TYPE_LLVMIR_BITCODE
Definition: pi.h:749
pi_bitfield pi_map_flags
Definition: pi.h:585
pi_result piextDeviceGetNativeHandle(pi_device device, pi_native_handle *nativeHandle)
Gets the native handle of a PI device object.
pi_result piEnqueueMemBufferCopyRect(pi_queue command_queue, pi_mem src_buffer, pi_mem dst_buffer, pi_buff_rect_offset src_origin, pi_buff_rect_offset dst_origin, pi_buff_rect_region region, size_t src_row_pitch, size_t src_slice_pitch, size_t dst_row_pitch, size_t dst_slice_pitch, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event)
static constexpr pi_device_affinity_domain PI_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE
Definition: pi.h:679
_pi_result
Definition: pi.h:135
pi_result piMemImageGetInfo(pi_mem image, pi_image_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret)
pi_result piKernelRelease(pi_kernel kernel)
constexpr pi_sampler_properties PI_SAMPLER_PROPERTIES_ADDRESSING_MODE
Definition: pi.h:547
pi_uint32 pi_bool
Definition: pi.h:126
static constexpr pi_device_partition_property PI_EXT_INTEL_DEVICE_PARTITION_BY_CSLICE
Definition: pi.h:664
constexpr pi_usm_mem_properties PI_MEM_USM_ALLOC_BUFFER_LOCATION
Definition: pi.h:606
pi_result piextQueueCreateWithNativeHandle(pi_native_handle nativeHandle, pi_context context, pi_device device, bool pluginOwnsNativeHandle, pi_queue *queue)
Creates PI queue object from a native handle.
pi_result piextUSMFree(pi_context context, void *ptr)
Indicates that the allocated USM memory is no longer needed on the runtime side.
pi_bitfield pi_usm_mem_properties
Definition: pi.h:597
_pi_device_info
Definition: pi.h:204
@ PI_DEVICE_INFO_PRINTF_BUFFER_SIZE
Definition: pi.h:274
@ PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_CHAR
Definition: pi.h:215
@ PI_EXT_ONEAPI_DEVICE_INFO_MAX_WORK_GROUPS_1D
Definition: pi.h:321
@ PI_DEVICE_INFO_MAX_MEM_BANDWIDTH
Definition: pi.h:299
@ PI_DEVICE_INFO_GPU_SLICES
Definition: pi.h:296
@ PI_DEVICE_INFO_PREFERRED_INTEROP_USER_SYNC
Definition: pi.h:275
@ PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_FLOAT
Definition: pi.h:226
@ PI_DEVICE_INFO_BUILD_ON_SUBDEVICE
Definition: pi.h:302
@ PI_DEVICE_INFO_MAX_WORK_GROUP_SIZE
Definition: pi.h:210
@ PI_DEVICE_INFO_IMAGE_SRGB
Definition: pi.h:300
@ PI_DEVICE_INFO_IMAGE3D_MAX_WIDTH
Definition: pi.h:237
@ PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_SHORT
Definition: pi.h:216
@ PI_DEVICE_INFO_IMAGE3D_MAX_HEIGHT
Definition: pi.h:238
@ PI_DEVICE_INFO_MAX_CLOCK_FREQUENCY
Definition: pi.h:229
@ PI_DEVICE_INFO_USM_SINGLE_SHARED_SUPPORT
Definition: pi.h:286
@ PI_DEVICE_INFO_MAX_WORK_ITEM_DIMENSIONS
Definition: pi.h:208
@ PI_DEVICE_INFO_EXECUTION_CAPABILITIES
Definition: pi.h:260
@ PI_DEVICE_INFO_QUEUE_PROPERTIES
Definition: pi.h:214
@ PI_DEVICE_INFO_GPU_EU_COUNT
Definition: pi.h:294
@ PI_EXT_ONEAPI_DEVICE_INFO_MAX_WORK_GROUPS_2D
Definition: pi.h:322
@ PI_DEVICE_INFO_COMPILER_AVAILABLE
Definition: pi.h:258
@ PI_DEVICE_INFO_IMAGE_SUPPORT
Definition: pi.h:232
@ PI_DEVICE_INFO_ERROR_CORRECTION_SUPPORT
Definition: pi.h:253
@ PI_EXT_INTEL_DEVICE_INFO_FREE_MEMORY
Definition: pi.h:303
@ PI_DEVICE_INFO_ATOMIC_MEMORY_SCOPE_CAPABILITIES
Definition: pi.h:315
@ PI_DEVICE_INFO_QUEUE_ON_DEVICE_PROPERTIES
Definition: pi.h:261
@ PI_DEVICE_INFO_PARTITION_MAX_SUB_DEVICES
Definition: pi.h:278
@ PI_DEVICE_INFO_BUILT_IN_KERNELS
Definition: pi.h:263
@ PI_DEVICE_INFO_UUID
Definition: pi.h:290
@ PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_FLOAT
Definition: pi.h:219
@ PI_DEVICE_INFO_MAX_NUM_SUB_GROUPS
Definition: pi.h:281
@ PI_DEVICE_INFO_AVAILABLE
Definition: pi.h:257
@ PI_DEVICE_INFO_HALF_FP_CONFIG
Definition: pi.h:212
@ PI_DEVICE_INFO_PARENT_DEVICE
Definition: pi.h:276
@ PI_DEVICE_INFO_SUB_GROUP_SIZES_INTEL
Definition: pi.h:283
@ PI_DEVICE_INFO_ATOMIC_MEMORY_ORDER_CAPABILITIES
Definition: pi.h:314
@ PI_DEVICE_INFO_GPU_EU_SIMD_WIDTH
Definition: pi.h:295
@ PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_SHORT
Definition: pi.h:223
@ PI_DEVICE_INFO_QUEUE_ON_HOST_PROPERTIES
Definition: pi.h:262
@ PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_DOUBLE
Definition: pi.h:227
@ PI_DEVICE_INFO_GLOBAL_MEM_CACHE_TYPE
Definition: pi.h:245
@ PI_DEVICE_INFO_DRIVER_VERSION
Definition: pi.h:269
@ PI_DEVICE_INFO_MAX_PARAMETER_SIZE
Definition: pi.h:243
@ PI_DEVICE_INFO_PARTITION_PROPERTIES
Definition: pi.h:277
@ PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_INT
Definition: pi.h:217
@ PI_DEVICE_INFO_USM_CROSS_SHARED_SUPPORT
Definition: pi.h:287
@ PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_HALF
Definition: pi.h:221
@ PI_DEVICE_INFO_VERSION
Definition: pi.h:271
@ PI_DEVICE_INFO_IMAGE3D_MAX_DEPTH
Definition: pi.h:239
@ PI_DEVICE_INFO_MAX_COMPUTE_UNITS
Definition: pi.h:207
@ PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_CHAR
Definition: pi.h:222
@ PI_DEVICE_INFO_IMAGE2D_MAX_HEIGHT
Definition: pi.h:236
@ PI_DEVICE_INFO_VENDOR_ID
Definition: pi.h:206
@ PI_DEVICE_INFO_GLOBAL_MEM_CACHELINE_SIZE
Definition: pi.h:246
@ PI_DEVICE_INFO_GPU_HW_THREADS_PER_EU
Definition: pi.h:316
@ PI_DEVICE_INFO_BACKEND_VERSION
Definition: pi.h:317
@ PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_LONG
Definition: pi.h:218
@ PI_DEVICE_INFO_PLATFORM
Definition: pi.h:264
@ PI_DEVICE_INFO_LOCAL_MEM_SIZE
Definition: pi.h:252
@ PI_DEVICE_INFO_REFERENCE_COUNT
Definition: pi.h:265
@ PI_DEVICE_INFO_MAX_SAMPLERS
Definition: pi.h:242
@ PI_DEVICE_INFO_DEVICE_ID
Definition: pi.h:292
@ PI_DEVICE_INFO_PROFILE
Definition: pi.h:270
@ PI_DEVICE_INFO_MAX_WORK_ITEM_SIZES
Definition: pi.h:209
@ PI_DEVICE_INFO_EXTENSIONS
Definition: pi.h:273
@ PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_INT
Definition: pi.h:224
@ PI_DEVICE_INFO_HOST_UNIFIED_MEMORY
Definition: pi.h:254
@ PI_DEVICE_INFO_PCI_ADDRESS
Definition: pi.h:293
@ PI_DEVICE_INFO_MAX_MEM_ALLOC_SIZE
Definition: pi.h:231
@ PI_DEVICE_INFO_GLOBAL_MEM_CACHE_SIZE
Definition: pi.h:247
@ PI_DEVICE_INFO_IMAGE_MAX_ARRAY_SIZE
Definition: pi.h:241
@ PI_DEVICE_INFO_LINKER_AVAILABLE
Definition: pi.h:259
@ PI_EXT_ONEAPI_DEVICE_INFO_MAX_WORK_GROUPS_3D
Definition: pi.h:323
@ PI_EXT_ONEAPI_DEVICE_INFO_CUDA_ASYNC_BARRIER
Definition: pi.h:324
@ PI_DEVICE_INFO_ADDRESS_BITS
Definition: pi.h:230
@ PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_DOUBLE
Definition: pi.h:220
@ PI_DEVICE_INFO_ATOMIC_64
Definition: pi.h:313
@ PI_DEVICE_INFO_USM_HOST_SUPPORT
Definition: pi.h:284
@ PI_DEVICE_INFO_USM_DEVICE_SUPPORT
Definition: pi.h:285
@ PI_EXT_INTEL_DEVICE_INFO_MAX_COMPUTE_QUEUE_INDICES
Definition: pi.h:312
@ PI_DEVICE_INFO_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS
Definition: pi.h:282
@ PI_DEVICE_INFO_GPU_EU_COUNT_PER_SUBSLICE
Definition: pi.h:298
@ PI_DEVICE_INFO_MAX_WRITE_IMAGE_ARGS
Definition: pi.h:234
@ PI_DEVICE_INFO_IL_VERSION
Definition: pi.h:266
@ PI_DEVICE_INFO_PROFILING_TIMER_RESOLUTION
Definition: pi.h:255
@ PI_DEVICE_INFO_VENDOR
Definition: pi.h:268
@ PI_DEVICE_INFO_MEM_BASE_ADDR_ALIGN
Definition: pi.h:244
@ PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG
Definition: pi.h:225
@ PI_DEVICE_INFO_MAX_READ_IMAGE_ARGS
Definition: pi.h:233
@ PI_DEVICE_INFO_PARTITION_AFFINITY_DOMAIN
Definition: pi.h:279
@ PI_DEVICE_INFO_USM_SYSTEM_SHARED_SUPPORT
Definition: pi.h:288
@ PI_EXT_ONEAPI_DEVICE_INFO_MAX_GLOBAL_WORK_GROUPS
Definition: pi.h:320
@ PI_DEVICE_INFO_IMAGE_MAX_BUFFER_SIZE
Definition: pi.h:240
@ PI_EXT_INTEL_DEVICE_INFO_MEMORY_CLOCK_RATE
Definition: pi.h:306
@ PI_DEVICE_INFO_DOUBLE_FP_CONFIG
Definition: pi.h:213
@ PI_EXT_INTEL_DEVICE_INFO_MEMORY_BUS_WIDTH
Definition: pi.h:309
@ PI_DEVICE_INFO_MAX_CONSTANT_BUFFER_SIZE
Definition: pi.h:249
@ PI_DEVICE_INFO_PARTITION_TYPE
Definition: pi.h:280
@ PI_DEVICE_INFO_TYPE
Definition: pi.h:205
@ PI_DEVICE_INFO_SINGLE_FP_CONFIG
Definition: pi.h:211
@ PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_HALF
Definition: pi.h:228
@ PI_DEVICE_INFO_GLOBAL_MEM_SIZE
Definition: pi.h:248
@ PI_DEVICE_INFO_NAME
Definition: pi.h:267
@ PI_DEVICE_INFO_LOCAL_MEM_TYPE
Definition: pi.h:251
@ PI_DEVICE_INFO_MAX_CONSTANT_ARGS
Definition: pi.h:250
@ PI_DEVICE_INFO_OPENCL_C_VERSION
Definition: pi.h:272
@ PI_DEVICE_INFO_ENDIAN_LITTLE
Definition: pi.h:256
@ PI_DEVICE_INFO_IMAGE2D_MAX_WIDTH
Definition: pi.h:235
@ PI_DEVICE_INFO_GPU_SUBSLICES_PER_SLICE
Definition: pi.h:297
@ PI_EXT_ONEAPI_DEVICE_INFO_BFLOAT16_MATH_FUNCTIONS
Definition: pi.h:319
pi_uint64 pi_bitfield
Definition: pi.h:127
static constexpr pi_device_binary_type PI_DEVICE_BINARY_TYPE_NATIVE
Definition: pi.h:744
static constexpr pi_device_fp_config PI_FP_DENORM
Definition: pi.h:683
pi_result piextUSMEnqueueMemAdvise(pi_queue queue, const void *ptr, size_t length, pi_mem_advice advice, pi_event *event)
USM Memadvise API.
constexpr pi_mem_flags PI_MEM_FLAGS_HOST_PTR_ALLOC
Definition: pi.h:582
_pi_program_build_status
Definition: pi.h:165
@ PI_PROGRAM_BUILD_STATUS_SUCCESS
Definition: pi.h:168
@ PI_PROGRAM_BUILD_STATUS_ERROR
Definition: pi.h:167
@ PI_PROGRAM_BUILD_STATUS_IN_PROGRESS
Definition: pi.h:169
@ PI_PROGRAM_BUILD_STATUS_NONE
Definition: pi.h:166
static constexpr pi_device_affinity_domain PI_DEVICE_AFFINITY_DOMAIN_L2_CACHE
Definition: pi.h:674
constexpr pi_usm_mem_properties PI_MEM_ALLOC_FLAGS
Definition: pi.h:598
_pi_queue_info
Definition: pi.h:354
@ PI_QUEUE_INFO_DEVICE_DEFAULT
Definition: pi.h:357
@ PI_QUEUE_INFO_PROPERTIES
Definition: pi.h:358
@ PI_QUEUE_INFO_DEVICE
Definition: pi.h:356
@ PI_QUEUE_INFO_CONTEXT
Definition: pi.h:355
@ PI_QUEUE_INFO_REFERENCE_COUNT
Definition: pi.h:359
@ PI_QUEUE_INFO_SIZE
Definition: pi.h:360
@ PI_EXT_ONEAPI_QUEUE_INFO_EMPTY
Definition: pi.h:363
_pi_mem_advice
Definition: pi.h:455
@ PI_MEM_ADVICE_CUDA_UNSET_ACCESSED_BY_HOST
Definition: pi.h:467
@ PI_MEM_ADVICE_CUDA_UNSET_READ_MOSTLY
Definition: pi.h:459
@ PI_MEM_ADVICE_CUDA_UNSET_PREFERRED_LOCATION
Definition: pi.h:461
@ PI_MEM_ADVICE_CUDA_SET_READ_MOSTLY
Definition: pi.h:458
@ PI_MEM_ADVICE_RESET
Definition: pi.h:457
@ PI_MEM_ADVICE_CUDA_SET_PREFERRED_LOCATION_HOST
Definition: pi.h:464
@ PI_MEM_ADVICE_UNKNOWN
Definition: pi.h:468
@ PI_MEM_ADVICE_CUDA_UNSET_ACCESSED_BY
Definition: pi.h:463
@ PI_MEM_ADVICE_CUDA_SET_ACCESSED_BY_HOST
Definition: pi.h:466
@ PI_MEM_ADVICE_CUDA_UNSET_PREFERRED_LOCATION_HOST
Definition: pi.h:465
@ PI_MEM_ADVICE_CUDA_SET_PREFERRED_LOCATION
Definition: pi.h:460
@ PI_MEM_ADVICE_CUDA_SET_ACCESSED_BY
Definition: pi.h:462
pi_result piEnqueueMemImageRead(pi_queue command_queue, pi_mem image, pi_bool blocking_read, pi_image_offset origin, pi_image_region region, size_t row_pitch, size_t slice_pitch, void *ptr, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event)
static constexpr pi_device_affinity_domain PI_DEVICE_AFFINITY_DOMAIN_L3_CACHE
Definition: pi.h:672
pi_result piextPluginGetOpaqueData(void *opaque_data_param, void **opaque_data_return)
Plugin.
_pi_image_channel_type
Definition: pi.h:489
@ PI_IMAGE_CHANNEL_TYPE_FLOAT
Definition: pi.h:504
@ PI_IMAGE_CHANNEL_TYPE_UNORM_SHORT_565
Definition: pi.h:494
@ PI_IMAGE_CHANNEL_TYPE_UNORM_INT8
Definition: pi.h:492
@ PI_IMAGE_CHANNEL_TYPE_SIGNED_INT16
Definition: pi.h:498
@ PI_IMAGE_CHANNEL_TYPE_SNORM_INT16
Definition: pi.h:491
@ PI_IMAGE_CHANNEL_TYPE_UNSIGNED_INT8
Definition: pi.h:500
@ PI_IMAGE_CHANNEL_TYPE_SIGNED_INT8
Definition: pi.h:497
@ PI_IMAGE_CHANNEL_TYPE_UNORM_INT_101010
Definition: pi.h:496
@ PI_IMAGE_CHANNEL_TYPE_UNSIGNED_INT32
Definition: pi.h:502
@ PI_IMAGE_CHANNEL_TYPE_UNSIGNED_INT16
Definition: pi.h:501
@ PI_IMAGE_CHANNEL_TYPE_SNORM_INT8
Definition: pi.h:490
@ PI_IMAGE_CHANNEL_TYPE_UNORM_SHORT_555
Definition: pi.h:495
@ PI_IMAGE_CHANNEL_TYPE_SIGNED_INT32
Definition: pi.h:499
@ PI_IMAGE_CHANNEL_TYPE_HALF_FLOAT
Definition: pi.h:503
@ PI_IMAGE_CHANNEL_TYPE_UNORM_INT16
Definition: pi.h:493
_pi_kernel_sub_group_info
Definition: pi.h:396
@ PI_KERNEL_COMPILE_NUM_SUB_GROUPS
Definition: pi.h:399
@ PI_KERNEL_MAX_NUM_SUB_GROUPS
Definition: pi.h:398
@ PI_KERNEL_COMPILE_SUB_GROUP_SIZE_INTEL
Definition: pi.h:400
@ PI_KERNEL_MAX_SUB_GROUP_SIZE
Definition: pi.h:397
pi_result piextProgramCreateWithNativeHandle(pi_native_handle nativeHandle, pi_context context, bool pluginOwnsNativeHandle, pi_program *program)
Creates PI program object from a native handle.
pi_bitfield pi_mem_properties
Definition: pi.h:591
pi_result piKernelSetArg(pi_kernel kernel, pi_uint32 arg_index, size_t arg_size, const void *arg_value)
pi_result piEnqueueEventsWaitWithBarrier(pi_queue command_queue, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event)
pi_result piEnqueueKernelLaunch(pi_queue queue, pi_kernel kernel, pi_uint32 work_dim, const size_t *global_work_offset, const size_t *global_work_size, const size_t *local_work_size, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event)
_pi_kernel_group_info
Definition: pi.h:375
@ PI_KERNEL_GROUP_INFO_WORK_GROUP_SIZE
Definition: pi.h:377
@ PI_KERNEL_GROUP_INFO_COMPILE_WORK_GROUP_SIZE
Definition: pi.h:378
@ PI_KERNEL_GROUP_INFO_GLOBAL_WORK_SIZE
Definition: pi.h:376
@ PI_KERNEL_GROUP_INFO_PRIVATE_MEM_SIZE
Definition: pi.h:381
@ PI_KERNEL_GROUP_INFO_LOCAL_MEM_SIZE
Definition: pi.h:379
@ PI_KERNEL_GROUP_INFO_PREFERRED_WORK_GROUP_SIZE_MULTIPLE
Definition: pi.h:380
@ PI_KERNEL_GROUP_INFO_NUM_REGS
Definition: pi.h:383
pi_result piEnqueueMemBufferRead(pi_queue queue, pi_mem buffer, pi_bool blocking_read, size_t offset, size_t size, void *ptr, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event)
constexpr pi_memory_order_capabilities PI_MEMORY_ORDER_ACQUIRE
Definition: pi.h:552
pi_result piProgramRetain(pi_program program)
const pi_bool PI_TRUE
Definition: pi.h:509
pi_result piMemImageCreate(pi_context context, pi_mem_flags flags, const pi_image_format *image_format, const pi_image_desc *image_desc, void *host_ptr, pi_mem *ret_mem)
pi_property_type
Definition: pi.h:710
@ PI_PROPERTY_TYPE_UINT32
Definition: pi.h:712
@ PI_PROPERTY_TYPE_UNKNOWN
Definition: pi.h:711
@ PI_PROPERTY_TYPE_BYTE_ARRAY
Definition: pi.h:713
@ PI_PROPERTY_TYPE_STRING
Definition: pi.h:714
pi_result piextUSMEnqueuePrefetch(pi_queue queue, const void *ptr, size_t size, pi_usm_migration_flags flags, pi_uint32 num_events_in_waitlist, const pi_event *events_waitlist, pi_event *event)
Hint to migrate memory to the device.
_pi_kernel_exec_info
Definition: pi.h:1355
@ PI_USM_INDIRECT_ACCESS
indicates that the kernel might access data through USM ptrs
Definition: pi.h:1357
@ PI_USM_PTRS
provides an explicit list of pointers that the kernel will access
Definition: pi.h:1359
pi_result piextPlatformGetNativeHandle(pi_platform platform, pi_native_handle *nativeHandle)
Gets the native handle of a PI platform object.
pi_result piProgramRelease(pi_program program)
_pi_platform_info
Definition: pi.h:150
@ PI_PLATFORM_INFO_VENDOR
Definition: pi.h:154
@ PI_PLATFORM_INFO_EXTENSIONS
Definition: pi.h:151
@ PI_PLATFORM_INFO_PROFILE
Definition: pi.h:153
@ PI_PLATFORM_INFO_NAME
Definition: pi.h:152
@ PI_PLATFORM_INFO_VERSION
Definition: pi.h:155
pi_result piextKernelSetArgSampler(pi_kernel kernel, pi_uint32 arg_index, const pi_sampler *arg_value)
static constexpr pi_device_partition_property PI_DEVICE_PARTITION_BY_COUNTS
Definition: pi.h:657
pi_result piSamplerRetain(pi_sampler sampler)
constexpr pi_queue_properties PI_QUEUE_FLAG_OUT_OF_ORDER_EXEC_MODE_ENABLE
Definition: pi.h:614
pi_result piMemGetInfo(pi_mem mem, pi_mem_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret)
pi_result piextUSMHostAlloc(void **result_ptr, pi_context context, pi_usm_mem_properties *properties, size_t size, pi_uint32 alignment)
Allocates host memory accessible by the device.
pi_result piDeviceGetInfo(pi_device device, pi_device_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret)
Returns requested info for provided native device Return PI_DEVICE_INFO_EXTENSION_DEVICELIB_ASSERT fo...
pi_result piKernelRetain(pi_kernel kernel)
pi_result piPlatformsGet(pi_uint32 num_entries, pi_platform *platforms, pi_uint32 *num_platforms)
pi_result piextEnqueueDeviceGlobalVariableWrite(pi_queue queue, pi_program program, const char *name, pi_bool blocking_write, size_t count, size_t offset, const void *src, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event)
Device global variable.
pi_result piextQueueCreate(pi_context context, pi_device device, pi_queue_properties *properties, pi_queue *queue)
_pi_image_info
Definition: pi.h:386
@ PI_IMAGE_INFO_HEIGHT
Definition: pi.h:392
@ PI_IMAGE_INFO_SLICE_PITCH
Definition: pi.h:390
@ PI_IMAGE_INFO_ROW_PITCH
Definition: pi.h:389
@ PI_IMAGE_INFO_WIDTH
Definition: pi.h:391
@ PI_IMAGE_INFO_FORMAT
Definition: pi.h:387
@ PI_IMAGE_INFO_ELEMENT_SIZE
Definition: pi.h:388
@ PI_IMAGE_INFO_DEPTH
Definition: pi.h:393
pi_result piextEventGetNativeHandle(pi_event event, pi_native_handle *nativeHandle)
Gets the native handle of a PI event object.
pi_result piEnqueueEventsWait(pi_queue command_queue, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event)
_pi_usm_capabilities
Definition: pi.h:1666
@ PI_USM_ATOMIC_ACCESS
Definition: pi.h:1668
@ PI_USM_ACCESS
Definition: pi.h:1667
@ PI_USM_CONCURRENT_ACCESS
Definition: pi.h:1669
@ PI_USM_CONCURRENT_ATOMIC_ACCESS
Definition: pi.h:1670
_pi_image_channel_order
Definition: pi.h:471
@ PI_IMAGE_CHANNEL_ORDER_RGB
Definition: pi.h:476
@ PI_IMAGE_CHANNEL_ORDER_RA
Definition: pi.h:475
@ PI_IMAGE_CHANNEL_ORDER_RGBA
Definition: pi.h:477
@ PI_IMAGE_CHANNEL_ORDER_INTENSITY
Definition: pi.h:481
@ PI_IMAGE_CHANNEL_ORDER_R
Definition: pi.h:473
@ PI_IMAGE_CHANNEL_ORDER_ABGR
Definition: pi.h:480
@ PI_IMAGE_CHANNEL_ORDER_RGBx
Definition: pi.h:485
@ PI_IMAGE_CHANNEL_ORDER_RG
Definition: pi.h:474
@ PI_IMAGE_CHANNEL_ORDER_BGRA
Definition: pi.h:478
@ PI_IMAGE_CHANNEL_ORDER_Rx
Definition: pi.h:483
@ PI_IMAGE_CHANNEL_ORDER_A
Definition: pi.h:472
@ PI_IMAGE_CHANNEL_ORDER_sRGBA
Definition: pi.h:486
@ PI_IMAGE_CHANNEL_ORDER_LUMINANCE
Definition: pi.h:482
@ PI_IMAGE_CHANNEL_ORDER_RGx
Definition: pi.h:484
@ PI_IMAGE_CHANNEL_ORDER_ARGB
Definition: pi.h:479
constexpr pi_memory_order_capabilities PI_MEMORY_ORDER_ACQ_REL
Definition: pi.h:554
_pi_profiling_info
Definition: pi.h:564
@ PI_PROFILING_INFO_COMMAND_END
Definition: pi.h:568
@ PI_PROFILING_INFO_COMMAND_START
Definition: pi.h:567
@ PI_PROFILING_INFO_COMMAND_SUBMIT
Definition: pi.h:566
@ PI_PROFILING_INFO_COMMAND_QUEUED
Definition: pi.h:565
static constexpr pi_device_partition_property PI_DEVICE_PARTITION_BY_COUNTS_LIST_END
Definition: pi.h:660
_pi_usm_type
Definition: pi.h:1680
@ PI_MEM_TYPE_SHARED
Definition: pi.h:1684
@ PI_MEM_TYPE_UNKNOWN
Definition: pi.h:1681
@ PI_MEM_TYPE_DEVICE
Definition: pi.h:1683
@ PI_MEM_TYPE_HOST
Definition: pi.h:1682
_pi_usm_migration_flags
Definition: pi.h:1690
@ PI_USM_MIGRATION_TBD0
Definition: pi.h:1691
pi_result piTearDown(void *PluginParameter)
API to notify that the plugin should clean up its resources.
_pi_device_type
Definition: pi.h:182
@ PI_DEVICE_TYPE_ACC
A PI device that is a dedicated accelerator.
Definition: pi.h:188
@ PI_DEVICE_TYPE_ALL
All devices available in the PI plugin.
Definition: pi.h:185
@ PI_DEVICE_TYPE_DEFAULT
The default device available in the PI plugin.
Definition: pi.h:183
@ PI_DEVICE_TYPE_GPU
A PI device that is a GPU.
Definition: pi.h:187
@ PI_DEVICE_TYPE_CUSTOM
A PI device that is a custom device.
Definition: pi.h:190
@ PI_DEVICE_TYPE_CPU
A PI device that is the host processor.
Definition: pi.h:186
static constexpr pi_device_partition_property PI_DEVICE_PARTITION_EQUALLY
Definition: pi.h:655
pi_result piContextRetain(pi_context context)
_pi_device_mem_cache_type
Definition: pi.h:193
@ PI_DEVICE_MEM_CACHE_TYPE_READ_WRITE_CACHE
Definition: pi.h:196
@ PI_DEVICE_MEM_CACHE_TYPE_READ_ONLY_CACHE
Definition: pi.h:195
@ PI_DEVICE_MEM_CACHE_TYPE_NONE
Definition: pi.h:194
uint64_t pi_uint64
Definition: pi.h:125
pi_bitfield pi_queue_properties
Definition: pi.h:610
pi_result piEventCreate(pi_context context, pi_event *ret_event)
Create PI event object in a signalled/completed state.
pi_result piextPlatformCreateWithNativeHandle(pi_native_handle nativeHandle, pi_platform *platform)
Creates PI platform object from a native handle.
uint8_t pi_device_binary_type
Types of device binary.
Definition: pi.h:740
pi_result piMemRetain(pi_mem mem)
pi_result piKernelGetSubGroupInfo(pi_kernel kernel, pi_device device, pi_kernel_sub_group_info param_name, size_t input_value_size, const void *input_value, size_t param_value_size, void *param_value, size_t *param_value_size_ret)
API to query information from the sub-group from a kernel.
pi_result piextProgramSetSpecializationConstant(pi_program prog, pi_uint32 spec_id, size_t spec_size, const void *spec_value)
Sets a specialization constant to a specific value.
const pi_bool PI_FALSE
Definition: pi.h:510
pi_result piEventGetInfo(pi_event event, pi_event_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret)
pi_result piDevicesGet(pi_platform platform, pi_device_type device_type, pi_uint32 num_entries, pi_device *devices, pi_uint32 *num_devices)
pi_result piQueueRelease(pi_queue command_queue)
constexpr pi_queue_properties PI_EXT_ONEAPI_QUEUE_FLAG_PRIORITY_LOW
Definition: pi.h:619
pi_result piextUSMEnqueueMemset2D(pi_queue queue, void *ptr, size_t pitch, int value, size_t width, size_t height, pi_uint32 num_events_in_waitlist, const pi_event *events_waitlist, pi_event *event)
USM 2D Memset API.
constexpr pi_memory_order_capabilities PI_MEMORY_ORDER_RELEASE
Definition: pi.h:553
pi_bitfield pi_sampler_properties
Definition: pi.h:544
_pi_usm_capability_query
Definition: pi.h:1658
@ PI_USM_SYSTEM_SHARED_SUPPORT
Definition: pi.h:1663
@ PI_USM_SINGLE_SHARED_SUPPORT
Definition: pi.h:1661
@ PI_USM_DEVICE_SUPPORT
Definition: pi.h:1660
@ PI_USM_HOST_SUPPORT
Definition: pi.h:1659
@ PI_USM_CROSS_SHARED_SUPPORT
Definition: pi.h:1662
constexpr pi_queue_properties PI_QUEUE_FLAG_ON_DEVICE_DEFAULT
Definition: pi.h:617
constexpr pi_queue_properties PI_EXT_ONEAPI_QUEUE_FLAG_DISCARD_EVENTS
Definition: pi.h:618
pi_result piextContextCreateWithNativeHandle(pi_native_handle nativeHandle, pi_uint32 numDevices, const pi_device *devices, bool pluginOwnsNativeHandle, pi_context *context)
Creates PI context object from a native handle.
constexpr pi_queue_properties PI_QUEUE_FLAG_ON_DEVICE
Definition: pi.h:616
pi_result piEventGetProfilingInfo(pi_event event, pi_profiling_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret)
pi_result piEnqueueMemBufferWrite(pi_queue command_queue, pi_mem buffer, pi_bool blocking_write, size_t offset, size_t size, const void *ptr, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event)
pi_result piEnqueueMemBufferCopy(pi_queue command_queue, pi_mem src_buffer, pi_mem dst_buffer, size_t src_offset, size_t dst_offset, size_t size, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event)
constexpr pi_mem_flags PI_MEM_FLAGS_HOST_PTR_COPY
Definition: pi.h:581
pi_result piEnqueueMemBufferWriteRect(pi_queue command_queue, pi_mem buffer, pi_bool blocking_write, pi_buff_rect_offset buffer_offset, pi_buff_rect_offset host_offset, pi_buff_rect_region region, size_t buffer_row_pitch, size_t buffer_slice_pitch, size_t host_row_pitch, size_t host_slice_pitch, const void *ptr, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event)
_pi_buffer_create_type
Definition: pi.h:507
@ PI_BUFFER_CREATE_TYPE_REGION
Definition: pi.h:507
static constexpr pi_device_affinity_domain PI_DEVICE_AFFINITY_DOMAIN_L4_CACHE
Definition: pi.h:670
pi_result piEnqueueMemUnmap(pi_queue command_queue, pi_mem memobj, void *mapped_ptr, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event)
pi_result piKernelSetExecInfo(pi_kernel kernel, pi_kernel_exec_info value_name, size_t param_value_size, const void *param_value)
API to set attributes controlling kernel execution.
static constexpr pi_device_fp_config PI_FP_ROUND_TO_NEAREST
Definition: pi.h:685
pi_result piProgramGetInfo(pi_program program, pi_program_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret)
pi_result piProgramBuild(pi_program program, pi_uint32 num_devices, const pi_device *device_list, const char *options, void(*pfn_notify)(pi_program program, void *user_data), void *user_data)
uint32_t pi_uint32
Definition: pi.h:124
_pi_device_binary_property_set_struct * pi_device_binary_property_set
Definition: pi.h:737
static const uint16_t PI_DEVICE_BINARY_VERSION
Definition: pi.h:752
static constexpr pi_device_partition_property PI_DEVICE_PARTITION_BY_AFFINITY_DOMAIN
Definition: pi.h:662
constexpr pi_memory_order_capabilities PI_MEMORY_ORDER_RELAXED
Definition: pi.h:551
_pi_event_info
Definition: pi.h:403
@ PI_EVENT_INFO_COMMAND_EXECUTION_STATUS
Definition: pi.h:407
@ PI_EVENT_INFO_REFERENCE_COUNT
Definition: pi.h:408
@ PI_EVENT_INFO_COMMAND_TYPE
Definition: pi.h:406
@ PI_EVENT_INFO_CONTEXT
Definition: pi.h:405
@ PI_EVENT_INFO_COMMAND_QUEUE
Definition: pi.h:404
constexpr pi_queue_properties PI_EXT_ONEAPI_QUEUE_FLAG_PRIORITY_HIGH
Definition: pi.h:620
pi_result piextEventCreateWithNativeHandle(pi_native_handle nativeHandle, pi_context context, bool ownNativeHandle, pi_event *event)
Creates PI event object from a native handle.
constexpr pi_usm_mem_properties PI_MEM_ALLOC_INITIAL_PLACEMENT_HOST
Definition: pi.h:602
static constexpr pi_device_fp_config PI_FP_ROUND_TO_INF
Definition: pi.h:687
intptr_t pi_context_properties
Definition: pi.h:536
pi_result piEventsWait(pi_uint32 num_events, const pi_event *event_list)
pi_bitfield pi_mem_flags
Definition: pi.h:575
constexpr pi_usm_mem_properties PI_MEM_ALLOC_WRTITE_COMBINED
Definition: pi.h:599
pi_result piEnqueueNativeKernel(pi_queue queue, void(*user_func)(void *), void *args, size_t cb_args, pi_uint32 num_mem_objects, const pi_mem *mem_list, const void **args_mem_loc, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event)
constexpr pi_queue_properties PI_QUEUE_FLAGS
Definition: pi.h:611
pi_result piContextCreate(const pi_context_properties *properties, pi_uint32 num_devices, const pi_device *devices, void(*pfn_notify)(const char *errinfo, const void *private_info, size_t cb, void *user_data), void *user_data, pi_context *ret_context)
pi_result piEnqueueMemBufferMap(pi_queue command_queue, pi_mem buffer, pi_bool blocking_map, pi_map_flags map_flags, size_t offset, size_t size, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event, void **ret_map)
pi_result piEventSetCallback(pi_event event, pi_int32 command_exec_callback_type, void(*pfn_notify)(pi_event event, pi_int32 event_command_status, void *user_data), void *user_data)
static constexpr pi_device_binary_type PI_DEVICE_BINARY_TYPE_SPIRV
Definition: pi.h:747
pi_result piextUSMEnqueueFill2D(pi_queue queue, void *ptr, size_t pitch, size_t pattern_size, const void *pattern, size_t width, size_t height, pi_uint32 num_events_in_waitlist, const pi_event *events_waitlist, pi_event *event)
USM 2D fill API.
constexpr pi_queue_properties PI_QUEUE_FLAG_PROFILING_ENABLE
Definition: pi.h:615
pi_result piQueueFlush(pi_queue command_queue)
pi_result piMemRelease(pi_mem mem)
constexpr pi_mem_flags PI_MEM_FLAGS_HOST_PTR_USE
Definition: pi.h:580
void(* pi_context_extended_deleter)(void *user_data)
Definition: pi.h:1112
constexpr pi_map_flags PI_MAP_WRITE
Definition: pi.h:587
constexpr pi_map_flags PI_MAP_WRITE_INVALIDATE_REGION
Definition: pi.h:588
_pi_mem_type
Definition: pi.h:445
@ PI_MEM_TYPE_BUFFER
Definition: pi.h:446
@ PI_MEM_TYPE_IMAGE1D_BUFFER
Definition: pi.h:452
@ PI_MEM_TYPE_IMAGE1D
Definition: pi.h:450
@ PI_MEM_TYPE_IMAGE1D_ARRAY
Definition: pi.h:451
@ PI_MEM_TYPE_IMAGE2D
Definition: pi.h:447
@ PI_MEM_TYPE_IMAGE2D_ARRAY
Definition: pi.h:449
@ PI_MEM_TYPE_IMAGE3D
Definition: pi.h:448
pi_result piSamplerCreate(pi_context context, const pi_sampler_properties *sampler_properties, pi_sampler *result_sampler)
constexpr pi_usm_mem_properties PI_MEM_ALLOC_DEVICE_READ_ONLY
Definition: pi.h:604
pi_result piEnqueueMemImageCopy(pi_queue command_queue, pi_mem src_image, pi_mem dst_image, pi_image_offset src_origin, pi_image_offset dst_origin, pi_image_region region, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event)
_pi_device_binary_property_struct * pi_device_binary_property
Definition: pi.h:728
pi_result piextQueueGetNativeHandle(pi_queue queue, pi_native_handle *nativeHandle)
Gets the native handle of a PI queue object.
_pi_sampler_info
Definition: pi.h:512
@ PI_SAMPLER_INFO_CONTEXT
Definition: pi.h:514
@ PI_SAMPLER_INFO_MIP_FILTER_MODE
Definition: pi.h:518
@ PI_SAMPLER_INFO_NORMALIZED_COORDS
Definition: pi.h:515
@ PI_SAMPLER_INFO_FILTER_MODE
Definition: pi.h:517
@ PI_SAMPLER_INFO_LOD_MIN
Definition: pi.h:519
@ PI_SAMPLER_INFO_LOD_MAX
Definition: pi.h:520
@ PI_SAMPLER_INFO_REFERENCE_COUNT
Definition: pi.h:513
@ PI_SAMPLER_INFO_ADDRESSING_MODE
Definition: pi.h:516
pi_result piProgramLink(pi_context context, pi_uint32 num_devices, const pi_device *device_list, const char *options, pi_uint32 num_input_programs, const pi_program *input_programs, void(*pfn_notify)(pi_program program, void *user_data), void *user_data, pi_program *ret_program)
Definition: pi_opencl.cpp:950
pi_result piQueueCreate(pi_context context, pi_device device, pi_queue_properties properties, pi_queue *queue)
pi_result piextMemGetNativeHandle(pi_mem mem, pi_native_handle *nativeHandle)
Gets the native handle of a PI mem object.
pi_result piEventSetStatus(pi_event event, pi_int32 execution_status)
static constexpr pi_device_fp_config PI_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT
Definition: pi.h:690
constexpr pi_map_flags PI_MAP_READ
Definition: pi.h:586
pi_result piextContextGetNativeHandle(pi_context context, pi_native_handle *nativeHandle)
Gets the native handle of a PI context object.
static constexpr pi_device_affinity_domain PI_DEVICE_AFFINITY_DOMAIN_L1_CACHE
Definition: pi.h:676
static constexpr pi_device_affinity_domain PI_DEVICE_AFFINITY_DOMAIN_NUMA
Definition: pi.h:668
pi_bitfield pi_memory_scope_capabilities
Definition: pi.h:557
pi_result piPluginGetLastError(char **message)
API to get Plugin specific warning and error messages.
pi_result piProgramCreate(pi_context context, const void *il, size_t length, pi_program *res_program)
pi_result piEnqueueMemBufferFill(pi_queue command_queue, pi_mem buffer, const void *pattern, size_t pattern_size, size_t offset, size_t size, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event)
pi_result piPluginInit(pi_plugin *plugin_info)
Definition: pi_cuda.cpp:5707
pi_result piextDeviceCreateWithNativeHandle(pi_native_handle nativeHandle, pi_platform platform, pi_device *device)
Creates PI device object from a native handle.
pi_result piDeviceRetain(pi_device device)
pi_result piDeviceRelease(pi_device device)
pi_result piProgramCompile(pi_program program, pi_uint32 num_devices, const pi_device *device_list, const char *options, pi_uint32 num_input_headers, const pi_program *input_headers, const char **header_include_names, void(*pfn_notify)(pi_program program, void *user_data), void *user_data)
pi_result piMemBufferPartition(pi_mem buffer, pi_mem_flags flags, pi_buffer_create_type buffer_create_type, void *buffer_create_info, pi_mem *ret_mem)
pi_bitfield pi_device_fp_config
Definition: pi.h:682
pi_result piextUSMDeviceAlloc(void **result_ptr, pi_context context, pi_device device, pi_usm_mem_properties *properties, size_t size, pi_uint32 alignment)
Allocates device memory.
constexpr pi_sampler_properties PI_SAMPLER_PROPERTIES_FILTER_MODE
Definition: pi.h:548
constexpr pi_mem_flags PI_MEM_FLAGS_ACCESS_RW
Definition: pi.h:577
_pi_kernel_info
Definition: pi.h:366
@ PI_KERNEL_INFO_PROGRAM
Definition: pi.h:371
@ PI_KERNEL_INFO_FUNCTION_NAME
Definition: pi.h:367
@ PI_KERNEL_INFO_REFERENCE_COUNT
Definition: pi.h:369
@ PI_KERNEL_INFO_CONTEXT
Definition: pi.h:370
@ PI_KERNEL_INFO_ATTRIBUTES
Definition: pi.h:372
@ PI_KERNEL_INFO_NUM_ARGS
Definition: pi.h:368
constexpr pi_device_exec_capabilities PI_DEVICE_EXEC_CAPABILITIES_NATIVE_KERNEL
Definition: pi.h:542
constexpr pi_memory_scope_capabilities PI_MEMORY_SCOPE_DEVICE
Definition: pi.h:561
_pi_command_type
Definition: pi.h:411
@ PI_COMMAND_TYPE_SVM_UNMAP
Definition: pi.h:440
@ PI_COMMAND_TYPE_MARKER
Definition: pi.h:430
@ PI_COMMAND_TYPE_COPY_IMAGE_TO_BUFFER
Definition: pi.h:428
@ PI_COMMAND_TYPE_COPY_BUFFER_TO_IMAGE
Definition: pi.h:427
@ PI_COMMAND_TYPE_RELEASE_GL_OBJECTS
Definition: pi.h:432
@ PI_COMMAND_TYPE_MIGRATE_MEM_OBJECTS
Definition: pi.h:434
@ PI_COMMAND_TYPE_IMAGE_WRITE
Definition: pi.h:424
@ PI_COMMAND_TYPE_SVM_FREE
Definition: pi.h:436
@ PI_COMMAND_TYPE_MEM_BUFFER_COPY_RECT
Definition: pi.h:420
@ PI_COMMAND_TYPE_SVM_MAP
Definition: pi.h:439
@ PI_COMMAND_TYPE_DEVICE_GLOBAL_VARIABLE_WRITE
Definition: pi.h:442
@ PI_COMMAND_TYPE_MEM_BUFFER_READ
Definition: pi.h:413
@ PI_COMMAND_TYPE_DEVICE_GLOBAL_VARIABLE_READ
Definition: pi.h:441
@ PI_COMMAND_TYPE_MEM_BUFFER_UNMAP
Definition: pi.h:417
@ PI_COMMAND_TYPE_IMAGE_READ
Definition: pi.h:423
@ PI_COMMAND_TYPE_IMAGE_COPY
Definition: pi.h:425
@ PI_COMMAND_TYPE_MEM_BUFFER_READ_RECT
Definition: pi.h:418
@ PI_COMMAND_TYPE_MEM_BUFFER_COPY
Definition: pi.h:415
@ PI_COMMAND_TYPE_MEM_BUFFER_MAP
Definition: pi.h:416
@ PI_COMMAND_TYPE_MEM_BUFFER_WRITE
Definition: pi.h:414
@ PI_COMMAND_TYPE_ACQUIRE_GL_OBJECTS
Definition: pi.h:431
@ PI_COMMAND_TYPE_BARRIER
Definition: pi.h:433
@ PI_COMMAND_TYPE_NDRANGE_KERNEL
Definition: pi.h:412
@ PI_COMMAND_TYPE_NATIVE_KERNEL
Definition: pi.h:426
@ PI_COMMAND_TYPE_MEM_BUFFER_WRITE_RECT
Definition: pi.h:419
@ PI_COMMAND_TYPE_SVM_MEMFILL
Definition: pi.h:438
@ PI_COMMAND_TYPE_MEM_BUFFER_FILL
Definition: pi.h:422
@ PI_COMMAND_TYPE_USER
Definition: pi.h:421
@ PI_COMMAND_TYPE_FILL_IMAGE
Definition: pi.h:435
@ PI_COMMAND_TYPE_MAP_IMAGE
Definition: pi.h:429
@ PI_COMMAND_TYPE_SVM_MEMCPY
Definition: pi.h:437
pi_result piGetDeviceAndHostTimer(pi_device Device, uint64_t *DeviceTime, uint64_t *HostTime)
Queries device for it's global timestamp in nanoseconds, and updates HostTime with the value of the h...
pi_result piSamplerGetInfo(pi_sampler sampler, pi_sampler_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret)
static const uint8_t PI_DEVICE_BINARY_OFFLOAD_KIND_SYCL
Definition: pi.h:755
_pi_mem_alloc_info
Definition: pi.h:1673
@ PI_MEM_ALLOC_BASE_PTR
Definition: pi.h:1675
@ PI_MEM_ALLOC_TYPE
Definition: pi.h:1674
@ PI_MEM_ALLOC_DEVICE
Definition: pi.h:1677
@ PI_MEM_ALLOC_SIZE
Definition: pi.h:1676
pi_result piclProgramCreateWithSource(pi_context context, pi_uint32 count, const char **strings, const size_t *lengths, pi_program *ret_program)
pi_result piextKernelGetNativeHandle(pi_kernel kernel, pi_native_handle *nativeHandle)
Gets the native handle of a PI kernel object.
_pi_device_local_mem_type
Definition: pi.h:199
@ PI_DEVICE_LOCAL_MEM_TYPE_GLOBAL
Definition: pi.h:201
@ PI_DEVICE_LOCAL_MEM_TYPE_LOCAL
Definition: pi.h:200
constexpr pi_memory_scope_capabilities PI_MEMORY_SCOPE_SYSTEM
Definition: pi.h:562
constexpr pi_memory_scope_capabilities PI_MEMORY_SCOPE_SUB_GROUP
Definition: pi.h:559
pi_result piEnqueueMemImageWrite(pi_queue command_queue, pi_mem image, pi_bool blocking_write, pi_image_offset origin, pi_image_region region, size_t input_row_pitch, size_t input_slice_pitch, const void *ptr, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event)
_pi_context_info
Definition: pi.h:339
@ PI_CONTEXT_INFO_PROPERTIES
Definition: pi.h:343
@ PI_CONTEXT_INFO_PLATFORM
Definition: pi.h:341
@ PI_CONTEXT_INFO_NUM_DEVICES
Definition: pi.h:342
@ PI_EXT_ONEAPI_CONTEXT_INFO_USM_MEMSET2D_SUPPORT
Definition: pi.h:350
@ PI_EXT_ONEAPI_CONTEXT_INFO_USM_MEMCPY2D_SUPPORT
Definition: pi.h:351
@ PI_CONTEXT_INFO_DEVICES
Definition: pi.h:340
@ PI_CONTEXT_INFO_REFERENCE_COUNT
Definition: pi.h:344
@ PI_CONTEXT_INFO_ATOMIC_MEMORY_ORDER_CAPABILITIES
Definition: pi.h:346
@ PI_EXT_ONEAPI_CONTEXT_INFO_USM_FILL2D_SUPPORT
Definition: pi.h:349
@ PI_CONTEXT_INFO_ATOMIC_MEMORY_SCOPE_CAPABILITIES
Definition: pi.h:347
pi_result piextKernelCreateWithNativeHandle(pi_native_handle nativeHandle, pi_context context, pi_program program, bool pluginOwnsNativeHandle, pi_kernel *kernel)
Creates PI kernel object from a native handle.
pi_result piMemBufferCreate(pi_context context, pi_mem_flags flags, size_t size, void *host_ptr, pi_mem *ret_mem, const pi_mem_properties *properties=nullptr)
_pi_sampler_filter_mode
Definition: pi.h:531
@ PI_SAMPLER_FILTER_MODE_NEAREST
Definition: pi.h:532
@ PI_SAMPLER_FILTER_MODE_LINEAR
Definition: pi.h:533
static const uint16_t PI_DEVICE_BINARIES_VERSION
Definition: pi.h:914
pi_result piEventRelease(pi_event event)
static constexpr pi_device_exec_capabilities PI_EXEC_NATIVE_KERNEL
Definition: pi.h:696
pi_result piQueueGetInfo(pi_queue command_queue, pi_queue_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret)
pi_result piextUSMEnqueueMemcpy2D(pi_queue queue, pi_bool blocking, void *dst_ptr, size_t dst_pitch, const void *src_ptr, size_t src_pitch, size_t width, size_t height, pi_uint32 num_events_in_waitlist, const pi_event *events_waitlist, pi_event *event)
USM 2D Memcpy API.
pi_result piContextRelease(pi_context context)
_pi_event_status
Definition: pi.h:143
@ PI_EVENT_SUBMITTED
Definition: pi.h:146
@ PI_EVENT_QUEUED
Definition: pi.h:147
@ PI_EVENT_COMPLETE
Definition: pi.h:144
@ PI_EVENT_RUNNING
Definition: pi.h:145
constexpr pi_mem_properties PI_MEM_PROPERTIES_ALLOC_BUFFER_LOCATION
Definition: pi.h:593
pi_result piEnqueueMemImageFill(pi_queue command_queue, pi_mem image, const void *fill_color, const size_t *origin, const size_t *region, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event)
pi_result piProgramCreateWithBinary(pi_context context, pi_uint32 num_devices, const pi_device *device_list, const size_t *lengths, const unsigned char **binaries, size_t num_metadata_entries, const pi_device_binary_property *metadata, pi_int32 *binary_status, pi_program *ret_program)
Creates a PI program for a context and loads the given binary into it.
pi_result piextProgramGetNativeHandle(pi_program program, pi_native_handle *nativeHandle)
Gets the native handle of a PI program object.
pi_result piextUSMSharedAlloc(void **result_ptr, pi_context context, pi_device device, pi_usm_mem_properties *properties, size_t size, pi_uint32 alignment)
Allocates memory accessible on both host and device.
pi_result piextUSMEnqueueMemcpy(pi_queue queue, pi_bool blocking, void *dst_ptr, const void *src_ptr, size_t size, pi_uint32 num_events_in_waitlist, const pi_event *events_waitlist, pi_event *event)
USM Memcpy API.
static constexpr pi_device_fp_config PI_FP_ROUND_TO_ZERO
Definition: pi.h:686
static constexpr pi_device_fp_config PI_FP_FMA
Definition: pi.h:688
pi_result piEnqueueMemBufferReadRect(pi_queue command_queue, pi_mem buffer, pi_bool blocking_read, pi_buff_rect_offset buffer_offset, pi_buff_rect_offset host_offset, pi_buff_rect_region region, size_t buffer_row_pitch, size_t buffer_slice_pitch, size_t host_row_pitch, size_t host_slice_pitch, void *ptr, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event)
_pi_sampler_addressing_mode
Definition: pi.h:523
@ PI_SAMPLER_ADDRESSING_MODE_MIRRORED_REPEAT
Definition: pi.h:524
@ PI_SAMPLER_ADDRESSING_MODE_CLAMP
Definition: pi.h:527
@ PI_SAMPLER_ADDRESSING_MODE_NONE
Definition: pi.h:528
@ PI_SAMPLER_ADDRESSING_MODE_REPEAT
Definition: pi.h:525
@ PI_SAMPLER_ADDRESSING_MODE_CLAMP_TO_EDGE
Definition: pi.h:526
pi_result piextKernelSetArgPointer(pi_kernel kernel, pi_uint32 arg_index, size_t arg_size, const void *arg_value)
Sets up pointer arguments for CL kernels.
_pi_program_info
Definition: pi.h:327
@ PI_PROGRAM_INFO_NUM_DEVICES
Definition: pi.h:330
@ PI_PROGRAM_INFO_SOURCE
Definition: pi.h:332
@ PI_PROGRAM_INFO_BINARY_SIZES
Definition: pi.h:333
@ PI_PROGRAM_INFO_KERNEL_NAMES
Definition: pi.h:336
@ PI_PROGRAM_INFO_CONTEXT
Definition: pi.h:329
@ PI_PROGRAM_INFO_REFERENCE_COUNT
Definition: pi.h:328
@ PI_PROGRAM_INFO_BINARIES
Definition: pi.h:334
@ PI_PROGRAM_INFO_NUM_KERNELS
Definition: pi.h:335
@ PI_PROGRAM_INFO_DEVICES
Definition: pi.h:331
pi_result piKernelGetInfo(pi_kernel kernel, pi_kernel_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret)
intptr_t pi_device_partition_property
Definition: pi.h:654
static constexpr pi_device_exec_capabilities PI_EXEC_KERNEL
Definition: pi.h:695
pi_result piKernelGetGroupInfo(pi_kernel kernel, pi_device device, pi_kernel_group_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret)
pi_result piextUSMGetMemAllocInfo(pi_context context, const void *ptr, pi_mem_alloc_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret)
API to query information about USM allocated pointers Valid Queries: PI_MEM_ALLOC_TYPE returns host/d...
pi_result piPlatformGetInfo(pi_platform platform, pi_platform_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret)
pi_result piextMemCreateWithNativeHandle(pi_native_handle nativeHandle, pi_context context, bool ownNativeHandle, pi_mem *mem)
Creates PI mem object from a native handle.
pi_result piextGetDeviceFunctionPointer(pi_device device, pi_program program, const char *function_name, pi_uint64 *function_pointer_ret)
Retrieves a device function pointer to a user-defined function.
pi_result piContextGetInfo(pi_context context, pi_context_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret)
pi_result piextDeviceSelectBinary(pi_device device, pi_device_binary *binaries, pi_uint32 num_binaries, pi_uint32 *selected_binary_ind)
Selects the most appropriate device binary based on runtime information and the IR characteristics.
constexpr pi_device_exec_capabilities PI_DEVICE_EXEC_CAPABILITIES_KERNEL
Definition: pi.h:539
constexpr pi_memory_order_capabilities PI_MEMORY_ORDER_SEQ_CST
Definition: pi.h:555
static constexpr pi_device_fp_config PI_FP_INF_NAN
Definition: pi.h:684
_pi_mem_info
Definition: pi.h:976
@ PI_MEM_SIZE
Definition: pi.h:976
@ PI_MEM_CONTEXT
Definition: pi.h:976
pi_result piQueueRetain(pi_queue command_queue)
pi_result piextEnqueueDeviceGlobalVariableRead(pi_queue queue, pi_program program, const char *name, pi_bool blocking_read, size_t count, size_t offset, void *dst, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event)
API reading data from a device global variable to host.
_pi_program_binary_type
Definition: pi.h:172
@ PI_PROGRAM_BINARY_TYPE_LIBRARY
Definition: pi.h:175
@ PI_PROGRAM_BINARY_TYPE_EXECUTABLE
Definition: pi.h:176
@ PI_PROGRAM_BINARY_TYPE_COMPILED_OBJECT
Definition: pi.h:174
@ PI_PROGRAM_BINARY_TYPE_NONE
Definition: pi.h:173
pi_result piextContextSetExtendedDeleter(pi_context context, pi_context_extended_deleter func, void *user_data)
static constexpr pi_device_binary_type PI_DEVICE_BINARY_TYPE_NONE
Definition: pi.h:742
pi_bitfield pi_device_affinity_domain
Definition: pi.h:667
pi_result piSamplerRelease(pi_sampler sampler)
pi_result piextKernelSetArgMemObj(pi_kernel kernel, pi_uint32 arg_index, const pi_mem *arg_value)
pi_result piDevicePartition(pi_device device, const pi_device_partition_property *properties, pi_uint32 num_devices, pi_device *out_devices, pi_uint32 *out_num_devices)
pi_bitfield pi_memory_order_capabilities
Definition: pi.h:550
pi_result piEventRetain(pi_event event)
constexpr pi_mem_properties PI_MEM_PROPERTIES_CHANNEL
Definition: pi.h:592
_pi_program_build_info
Definition: pi.h:158
@ PI_PROGRAM_BUILD_INFO_LOG
Definition: pi.h:161
@ PI_PROGRAM_BUILD_INFO_OPTIONS
Definition: pi.h:160
@ PI_PROGRAM_BUILD_INFO_BINARY_TYPE
Definition: pi.h:162
@ PI_PROGRAM_BUILD_INFO_STATUS
Definition: pi.h:159
void(* pfn_notify)(pi_event event, pi_int32 eventCommandStatus, void *userData)
Definition: pi_cuda.hpp:633
@ Device
PI context mapping to a CUDA context object.
Definition: pi_cuda.hpp:166
pi_device_binary_property PropertiesBegin
Definition: pi.h:733
pi_device_binary_property PropertiesEnd
Definition: pi.h:734
PI device mapping to a CUdevice.
Definition: pi_cuda.hpp:84
PI Event mapping to CUevent.
Definition: pi_cuda.hpp:637
size_t image_slice_pitch
Definition: pi.h:967
pi_uint32 num_mip_levels
Definition: pi.h:968
size_t image_height
Definition: pi.h:963
size_t image_row_pitch
Definition: pi.h:966
pi_uint32 num_samples
Definition: pi.h:969
size_t image_depth
Definition: pi.h:964
pi_mem buffer
Definition: pi.h:970
size_t image_width
Definition: pi.h:962
pi_mem_type image_type
Definition: pi.h:961
size_t image_array_size
Definition: pi.h:965
pi_image_channel_type image_channel_data_type
Definition: pi.h:957
pi_image_channel_order image_channel_order
Definition: pi.h:956
Implementation of a PI Kernel for CUDA.
Definition: pi_cuda.hpp:821
PI Mem mapping to CUDA memory allocations, both data and texture/surface.
Definition: pi_cuda.hpp:229
Definition: pi.h:699
char * name
Definition: pi.h:701
size_t size
Definition: pi.h:702
int32_t reserved
Definition: pi.h:704
int32_t flags
Definition: pi.h:703
void * addr
Definition: pi.h:700
A PI platform stores all known PI devices, in the CUDA plugin this is just a vector of available devi...
Definition: pi_cuda.hpp:74
char PluginVersion[20]
Definition: pi.h:1980
struct _pi_plugin::FunctionPointers PiFunctionTable
char PiVersion[20]
Definition: pi.h:1978
char * Targets
Definition: pi.h:1981
Implementation of PI Program on CUDA Module object.
Definition: pi_cuda.hpp:765
PI queue mapping on to CUstream objects.
Definition: pi_cuda.hpp:400
Implementation of samplers for CUDA.
Definition: pi_cuda.hpp:992
This struct is a record of all the device code that may be offloaded.
Definition: pi.h:919
uint16_t Version
version of this structure - for backward compatibility; all modifications which change order/type/off...
Definition: pi.h:923
uint16_t NumDeviceBinaries
Number of device binaries in this descriptor.
Definition: pi.h:925
pi_device_binary DeviceBinaries
Device binaries data.
Definition: pi.h:927
_pi_offload_entry * HostEntriesEnd
Definition: pi.h:930
_pi_offload_entry * HostEntriesBegin
the offload entry table (not used, for compatibility with OpenMP)
Definition: pi.h:929
This struct is a record of the device binary information.
Definition: pi.h:822
_pi_offload_entry EntriesEnd
Definition: pi.h:859
const char * LinkOptions
a null-terminated string; target- and compiler-specific options which are suggested to use to "link" ...
Definition: pi.h:848
_pi_offload_entry EntriesBegin
the offload entry table
Definition: pi.h:858
const char * CompileOptions
a null-terminated string; target- and compiler-specific options which are suggested to use to "compil...
Definition: pi.h:845
const unsigned char * BinaryEnd
Pointer to the target code end.
Definition: pi.h:856
const char * ManifestStart
Pointer to the manifest data start.
Definition: pi.h:850
uint16_t Version
version of this structure - for backward compatibility; all modifications which change order/type/off...
Definition: pi.h:826
const char * DeviceTargetSpec
null-terminated string representation of the device's target architecture which holds one of: __SYCL_...
Definition: pi.h:842
pi_device_binary_property_set PropertySetsEnd
Definition: pi.h:863
pi_device_binary_property_set PropertySetsBegin
Definition: pi.h:862
uint8_t Format
format of the binary data - SPIR-V, LLVM IR bitcode,...
Definition: pi.h:830
const char * ManifestEnd
Pointer to the manifest data end.
Definition: pi.h:852
uint8_t Kind
the type of offload model the binary employs; must be 4 for SYCL
Definition: pi.h:828
const unsigned char * BinaryStart
Pointer to the target code start.
Definition: pi.h:854