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 // 12.24 Added new PI_EXT_KERNEL_EXEC_INFO_CACHE_CONFIG property to the
81 // _pi_kernel_exec_info. Defined _pi_kernel_cache_config enum with values of
82 // the new PI_EXT_KERNEL_EXEC_INFO_CACHE_CONFIG property.
83 // 12.25 Added PI_EXT_DEVICE_INFO_ATOMIC_FENCE_ORDER_CAPABILITIES and
84 // PI_EXT_DEVICE_INFO_ATOMIC_FENCE_SCOPE_CAPABILITIES for piDeviceGetInfo.
85 // 12.26 Added piextEnqueueReadHostPipe and piextEnqueueWriteHostPipe functions.
86 // 12.27 Added properties parameter to piextQueueCreateWithNativeHandle and
87 // changed native handle type of piextQueueCreateWithNativeHandle and
88 // piextQueueGetNativeHandle
89 // 12.28 Added piextMemImageCreateWithNativeHandle for creating images from
90 // native handles.
91 // 12.29 Support PI_EXT_PLATFORM_INFO_BACKEND query in piPlatformGetInfo
92 // 12.30 Added PI_EXT_INTEL_DEVICE_INFO_MEM_CHANNEL_SUPPORT device info query.
93 // 12.31 Added PI_EXT_CODEPLAY_DEVICE_INFO_MAX_REGISTERS_PER_WORK_GROUP device
94 // info query.
95 // 13.32 Removed backwards compatibility of piextQueueCreateWithNativeHandle and
96 // piextQueueGetNativeHandle
97 // 14.33 Added new parameter (memory object properties) to
98 // piextKernelSetArgMemObj
99 // 14.34 Added command-buffer extension methods
100 // 14.35 Added piextEnablePeerAccess, piextDisablePeerAccess,
101 // piextPeerAccessGetInfo, and pi_peer_attr enum.
102 // 14.36 Adding support for experimental bindless images. This includes:
103 // - Added device info queries
104 // - Device queries for bindless image support
105 // - PI_EXT_ONEAPI_DEVICE_INFO_BINDLESS_IMAGES_SUPPORT
106 // - PI_EXT_ONEAPI_DEVICE_INFO_BINDLESS_IMAGES_SHARED_USM_SUPPORT
107 // - PI_EXT_ONEAPI_DEVICE_INFO_BINDLESS_IMAGES_1D_USM_SUPPORT
108 // - PI_EXT_ONEAPI_DEVICE_INFO_BINDLESS_IMAGES_2D_USM_SUPPORT
109 // - Device queries for pitched USM allocations
110 // - PI_EXT_ONEAPI_DEVICE_INFO_IMAGE_PITCH_ALIGN
111 // - PI_EXT_ONEAPI_DEVICE_INFO_MAX_IMAGE_LINEAR_WIDTH
112 // - PI_EXT_ONEAPI_DEVICE_INFO_MAX_IMAGE_LINEAR_HEIGHT
113 // - PI_EXT_ONEAPI_DEVICE_INFO_MAX_IMAGE_LINEAR_PITCH
114 // - Device queries for mipmap image support
115 // - PI_EXT_ONEAPI_DEVICE_INFO_MIPMAP_SUPPORT
116 // - PI_EXT_ONEAPI_DEVICE_INFO_MIPMAP_ANISOTROPY_SUPPORT
117 // - PI_EXT_ONEAPI_DEVICE_INFO_MIPMAP_MAX_ANISOTROPY
118 // - PI_EXT_ONEAPI_DEVICE_INFO_MIPMAP_LEVEL_REFERENCE_SUPPORT
119 // - Device queries for interop memory support
120 // - PI_EXT_ONEAPI_DEVICE_INFO_INTEROP_MEMORY_IMPORT_SUPPORT
121 // - PI_EXT_ONEAPI_DEVICE_INFO_INTEROP_MEMORY_EXPORT_SUPPORT
122 // - PI_EXT_ONEAPI_DEVICE_INFO_INTEROP_SEMAPHORE_IMPORT_SUPPORT
123 // - PI_EXT_ONEAPI_DEVICE_INFO_INTEROP_SEMAPHORE_EXPORT_SUPPORT
124 // - Added PI_IMAGE_INFO_DEPTH to _pi_image_info
125 // - Added _pi_image_copy_flags enum to determine direction of copy
126 // - Added new extension functions
127 // - piextBindlessImageSamplerCreate
128 // - piextUSMPitchedAlloc
129 // - piextMemUnsampledImageHandleDestroy
130 // - piextMemSampledImageHandleDestroy
131 // - piextMemImageAllocate
132 // - piextMemImageFree
133 // - piextMemUnsampledImageCreate
134 // - piextMemSampledImageCreate
135 // - piextMemImageCopy
136 // - piextMemImageGetInfo
137 // - piextMemMipmapGetLevel
138 // - piextMemMipmapFree
139 // - piextMemImportOpaqueFD
140 // - piextMemMapExternalArray
141 // - piextMemReleaseInterop
142 // - piextImportExternalSemaphoreOpaqueFD
143 // - piextDestroyExternalSemaphore
144 // - piextWaitExternalSemaphore
145 // - piextSignalExternalSemaphore
146 // 14.37 Added piextUSMImportExternalPointer and piextUSMReleaseImportedPointer.
147 // 14.38 Change PI_MEM_ADVICE_* values to flags for use in bitwise operations.
148 // 14.39 Added PI_EXT_INTEL_DEVICE_INFO_ESIMD_SUPPORT device info query.
149 // 14.40 Add HIP _pi_mem_advice alises to match the PI_MEM_ADVICE_CUDA* ones.
150 // 14.41 Added piextCommandBufferMemBufferFill & piextCommandBufferFillUSM
151 // 14.42 Added piextCommandBufferPrefetchUSM and piextCommandBufferAdviseUSM
152 // 15.43 Changed the signature of piextMemGetNativeHandle to also take a
153 // pi_device
154 // 15.44 Add coarse-grain memory advice flag for HIP.
155 // 15.45 Added piextKernelSuggestMaxCooperativeGroupCount and
156 // piextEnqueueCooperativeKernelLaunch.
157 // 15.46 Add piextGetGlobalVariablePointer
158 // 15.47 Added PI_ERROR_FEATURE_UNSUPPORTED.
159 // 15.48 Add CommandBuffer update definitions
160 // 15.49 Added cubemap support:
161 // - Added cubemap image type, PI_MEM_TYPE_IMAGE_CUBEMAP, to _pi_mem_type
162 // - Added cubemap sampling capabilities
163 // - _pi_sampler_cubemap_filter_mode
164 // - PI_SAMPLER_PROPERTIES_CUBEMAP_FILTER_MODE
165 // - Added device queries for cubemap support
166 // - PI_EXT_ONEAPI_DEVICE_INFO_CUBEMAP_SUPPORT
167 // - PI_EXT_ONEAPI_DEVICE_INFO_CUBEMAP_SEAMLESS_FILTERING_SUPPORT
168 // 15.50 Added device queries for sampled image fetch support
169 // - PI_EXT_ONEAPI_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_USM
170 // - PI_EXT_ONEAPI_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D
171 // - PI_EXT_ONEAPI_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_USM
172 // - PI_EXT_ONEAPI_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D
173 // - PI_EXT_ONEAPI_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_3D_USM
174 // - PI_EXT_ONEAPI_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_3D
175 // 15.51 Removed ret_mem argument from piextMemUnsampledImageCreate and
176 // piextMemSampledImageCreate
177 
178 #define _PI_H_VERSION_MAJOR 15
179 #define _PI_H_VERSION_MINOR 51
180 
181 #define _PI_STRING_HELPER(a) #a
182 #define _PI_CONCAT(a, b) _PI_STRING_HELPER(a.b)
183 #define _PI_TRIPLE_CONCAT(a, b, c) _PI_STRING_HELPER(a.b.c)
184 
185 // This is the macro that plugins should all use to define their version.
186 // _PI_PLUGIN_VERSION_STRING will be printed when environment variable
187 // SYCL_PI_TRACE is set to 1. PluginVersion should be defined for each plugin
188 // in plugins/*/pi_*.hpp. PluginVersion should be incremented with each change
189 // to the plugin.
190 #define _PI_PLUGIN_VERSION_STRING(PluginVersion) \
191  _PI_TRIPLE_CONCAT(_PI_H_VERSION_MAJOR, _PI_H_VERSION_MINOR, PluginVersion)
192 
193 #define _PI_H_VERSION_STRING \
194  _PI_CONCAT(_PI_H_VERSION_MAJOR, _PI_H_VERSION_MINOR)
195 
196 // This will be used to check the major versions of plugins versus the major
197 // versions of PI.
198 #define _PI_STRING_SUBSTITUTE(X) _PI_STRING_HELPER(X)
199 #define _PI_PLUGIN_VERSION_CHECK(PI_API_VERSION, PI_PLUGIN_VERSION) \
200  if (strncmp(PI_API_VERSION, PI_PLUGIN_VERSION, \
201  sizeof(_PI_STRING_SUBSTITUTE(_PI_H_VERSION_MAJOR))) < 0) { \
202  return PI_ERROR_INVALID_OPERATION; \
203  }
204 
205 // NOTE: This file presents a maping of OpenCL to PI enums, constants and
206 // typedefs. The general approach taken was to replace `CL_` prefix with `PI_`.
207 // Please consider this when adding or modifying values, as the strict value
208 // match is required.
209 // TODO: We should consider re-implementing PI enums and constants and only
210 // perform a mapping of PI to OpenCL in the pi_opencl backend.
211 #include <sycl/detail/export.hpp>
212 
213 #include <cstddef>
214 #include <cstdint>
215 #include <variant>
216 
217 #ifdef __cplusplus
218 extern "C" {
219 #endif // __cplusplus
220 
221 using pi_int32 = int32_t;
222 using pi_uint32 = uint32_t;
223 using pi_uint64 = uint64_t;
226 using pi_native_handle = uintptr_t;
227 
228 //
229 // NOTE: prefer to map 1:1 to OpenCL so that no translation is needed
230 // for PI <-> OpenCL ways. The PI <-> to other BE translation is almost
231 // always needed anyway.
232 //
233 typedef enum {
234 #define _PI_ERRC(NAME, VAL) NAME = VAL,
235 #define _PI_ERRC_WITH_MSG(NAME, VAL, MSG) NAME = VAL,
236 #include <sycl/detail/pi_error.def>
237 #undef _PI_ERRC
238 #undef _PI_ERRC_WITH_MSG
239 } _pi_result;
240 
241 typedef enum {
245  PI_EVENT_QUEUED = 0x3
247 
248 typedef enum {
254  PI_EXT_PLATFORM_INFO_BACKEND = 0x21000 // returns pi_platform_backend
256 
257 typedef enum {
263 
264 typedef enum {
270 
271 typedef enum {
277 
278 // NOTE: this is made 64-bit to match the size of cl_device_type to
279 // make the translation to OpenCL transparent.
280 //
281 typedef enum : pi_uint64 {
283  (1 << 0),
284  PI_DEVICE_TYPE_ALL = 0xFFFFFFFF,
285  PI_DEVICE_TYPE_CPU = (1 << 1),
286  PI_DEVICE_TYPE_GPU = (1 << 2),
287  PI_DEVICE_TYPE_ACC = (1 << 3),
289  PI_DEVICE_TYPE_CUSTOM = (1 << 4)
291 
292 typedef enum {
301 
302 typedef enum {
307 
308 typedef enum {
312 
313 typedef enum {
398  // Intel UUID extension.
400  // These are Intel-specific extensions.
411  // Return true if sub-device should do its own program build
414  // Return 0 if device doesn't have any memory modules. Return the minimum of
415  // the clock rate values if there are several memory modules on the device.
417  // Return 0 if device doesn't have any memory modules. Return the minimum of
418  // the bus width values if there are several memory modules on the device.
420  // Return 1 if the device doesn't have a notion of a "queue index". Otherwise,
421  // return the number of queue indices that are available for this device.
428  // Return whether bfloat16 math functions are supported by device
439  // The number of max registers per block (device specific)
448  // Bindless images, mipmaps, interop
465 
467 
468  // Composite device
471 
472  // Command Buffers
475 
476  // Bindless images cubemaps
479 
480  // Bindless images sampled image fetch
488 
489 typedef enum {
500 
501 typedef enum {
507  // Atomics capabilities extensions
512  // Native 2D USM memory operation support
517 
518 typedef enum {
525  // Return 'true' if all commands previously submitted to the queue have
526  // completed, otherwise return 'false'.
529 
530 typedef enum {
538 
539 typedef enum {
546  // The number of registers used by the compiled kernel (device specific)
549 
550 typedef enum {
557  PI_IMAGE_INFO_DEPTH = 0x1116
559 
560 typedef enum {
566 
567 typedef enum {
574 
575 typedef enum {
609 
610 typedef enum {
619 } _pi_mem_type;
620 
621 typedef enum {
622  // Device-specific value opaque in PI API.
636  PI_MEM_ADVICE_UNKNOWN = 0x7FFFFFFF,
638 
639 // HIP _pi_mem_advice aliases
654 static constexpr _pi_mem_advice
661 
662 typedef enum {
679 
680 typedef enum {
697 
698 typedef enum {
703 
705 
706 const pi_bool PI_TRUE = 1;
707 const pi_bool PI_FALSE = 0;
708 
709 typedef enum {
717  PI_SAMPLER_INFO_LOD_MAX = 0x1157
719 
720 typedef enum {
727 
728 typedef enum {
732 
733 typedef enum {
737 
738 using pi_context_properties = intptr_t;
739 
742  (1 << 0);
745 
748  0x1152;
753  0x1156;
754 
761 
768 
769 typedef enum {
775 
776 // NOTE: this is made 64-bit to match the size of cl_mem_flags to
777 // make the translation to OpenCL transparent.
778 // TODO: populate
779 //
781 // Access
784 // Host pointer
788 
789 // flags passed to Map operations
791 constexpr pi_map_flags PI_MAP_READ = (1 << 0);
792 constexpr pi_map_flags PI_MAP_WRITE = (1 << 1);
794 // NOTE: this is made 64-bit to match the size of cl_mem_properties_intel to
795 // make the translation to OpenCL transparent.
799 
800 // NOTE: this is made 64-bit to match the size of cl_mem_properties_intel to
801 // make the translation to OpenCL transparent.
806  (1 << 1);
808 // Hints that the device/shared allocation will not be written on device.
810 
812 
813 // NOTE: queue properties are implemented this way to better support bit
814 // manipulations
818 // clang-format off
828 // clang-format on
829 
830 typedef enum {
831  // No preference for SLM or data cache.
833  // Large SLM size.
835  // Large General Data size.
838 
871 
873 
874 // For compatibility with OpenCL define this not as enum.
877  0x1086;
879  0x1087;
880 static constexpr pi_device_partition_property
882 static constexpr pi_device_partition_property
884 static constexpr pi_device_partition_property
886 
887 // For compatibility with OpenCL define this not as enum.
890  (1 << 0);
892  (1 << 1);
894  (1 << 2);
896  (1 << 3);
898  (1 << 4);
899 static constexpr pi_device_affinity_domain
901 
902 // For compatibility with OpenCL define this not as enum.
904 static constexpr pi_device_fp_config PI_FP_DENORM = (1 << 0);
905 static constexpr pi_device_fp_config PI_FP_INF_NAN = (1 << 1);
906 static constexpr pi_device_fp_config PI_FP_ROUND_TO_NEAREST = (1 << 2);
907 static constexpr pi_device_fp_config PI_FP_ROUND_TO_ZERO = (1 << 3);
908 static constexpr pi_device_fp_config PI_FP_ROUND_TO_INF = (1 << 4);
909 static constexpr pi_device_fp_config PI_FP_FMA = (1 << 5);
910 static constexpr pi_device_fp_config PI_FP_SOFT_FLOAT = (1 << 6);
912  (1 << 7);
913 
914 // For compatibility with OpenCL define this not as enum.
916 static constexpr pi_device_exec_capabilities PI_EXEC_KERNEL = (1 << 0);
918 
919 // Entry type, matches OpenMP for compatibility
921  void *addr;
922  char *name;
923  size_t size;
924  int32_t flags;
925  int32_t reserved;
926 };
927 
929 
930 // A type of a binary image property.
931 typedef enum {
933  PI_PROPERTY_TYPE_UINT32, // 32-bit integer
935  PI_PROPERTY_TYPE_STRING // null-terminated string
937 
938 // Device binary image property.
939 // If the type size of the property value is fixed and is no greater than
940 // 64 bits, then ValAddr is 0 and the value is stored in the ValSize field.
941 // Example - PI_PROPERTY_TYPE_UINT32, which is 32-bit
943  char *Name; // null-terminated property name
944  void *ValAddr; // address of property value
945  uint32_t Type; // _pi_property_type
946  uint64_t ValSize; // size of property value in bytes
947 };
948 
950 
951 // Named array of properties.
953  char *Name; // the name
956 };
957 
959 
961 using pi_device_binary_type = uint8_t;
962 // format is not determined
964 // specific to a device
966 // portable binary types go next
967 // SPIR-V
969 // LLVM bitcode
971 
972 // Device binary descriptor version supported by this library.
973 static const uint16_t PI_DEVICE_BINARY_VERSION = 1;
974 
975 // The kind of offload model the binary employs; must be 4 for SYCL
976 static const uint8_t PI_DEVICE_BINARY_OFFLOAD_KIND_SYCL = 4;
977 
985 #define __SYCL_PI_DEVICE_BINARY_TARGET_UNKNOWN "<unknown>"
987 #define __SYCL_PI_DEVICE_BINARY_TARGET_SPIRV32 "spir"
989 #define __SYCL_PI_DEVICE_BINARY_TARGET_SPIRV64 "spir64"
992 #define __SYCL_PI_DEVICE_BINARY_TARGET_SPIRV64_X86_64 "spir64_x86_64"
993 #define __SYCL_PI_DEVICE_BINARY_TARGET_SPIRV64_GEN "spir64_gen"
994 #define __SYCL_PI_DEVICE_BINARY_TARGET_SPIRV64_FPGA "spir64_fpga"
996 #define __SYCL_PI_DEVICE_BINARY_TARGET_NVPTX64 "nvptx64"
997 #define __SYCL_PI_DEVICE_BINARY_TARGET_AMDGCN "amdgcn"
998 #define __SYCL_PI_DEVICE_BINARY_TARGET_NATIVE_CPU "native_cpu"
999 
1003 #define PI_DEVICE_INFO_EXTENSION_DEVICELIB_ASSERT "cl_intel_devicelib_assert"
1004 
1009 #define __SYCL_PI_PROPERTY_SET_SPEC_CONST_MAP "SYCL/specialization constants"
1012 #define __SYCL_PI_PROPERTY_SET_SPEC_CONST_DEFAULT_VALUES_MAP \
1013  "SYCL/specialization constants default values"
1015 #define __SYCL_PI_PROPERTY_SET_DEVICELIB_REQ_MASK "SYCL/devicelib req mask"
1017 #define __SYCL_PI_PROPERTY_SET_KERNEL_PARAM_OPT_INFO "SYCL/kernel param opt"
1019 #define __SYCL_PI_PROPERTY_SET_PROGRAM_METADATA "SYCL/program metadata"
1021 #define __SYCL_PI_PROPERTY_SET_SYCL_MISC_PROP "SYCL/misc properties"
1023 #define __SYCL_PI_PROPERTY_SET_SYCL_ASSERT_USED "SYCL/assert used"
1025 #define __SYCL_PI_PROPERTY_SET_SYCL_EXPORTED_SYMBOLS "SYCL/exported symbols"
1027 #define __SYCL_PI_PROPERTY_SET_SYCL_DEVICE_GLOBALS "SYCL/device globals"
1029 #define __SYCL_PI_PROPERTY_SET_SYCL_DEVICE_REQUIREMENTS \
1030  "SYCL/device requirements"
1032 #define __SYCL_PI_PROPERTY_SET_SYCL_HOST_PIPES "SYCL/host pipes"
1033 
1036 #define __SYCL_PI_PROGRAM_METADATA_TAG_REQD_WORK_GROUP_SIZE \
1037  "@reqd_work_group_size"
1038 #define __SYCL_PI_PROGRAM_METADATA_GLOBAL_ID_MAPPING "@global_id_mapping"
1039 
1040 #define __SYCL_PI_PROGRAM_METADATA_TAG_NEED_FINALIZATION "Requires finalization"
1041 
1051  uint16_t Version;
1053  uint8_t Kind;
1055  uint8_t Format;
1067  const char *DeviceTargetSpec;
1070  const char *CompileOptions;
1073  const char *LinkOptions;
1075  const char *ManifestStart;
1077  const char *ManifestEnd;
1079  const unsigned char *BinaryStart;
1081  const unsigned char *BinaryEnd;
1085  // Array of preperty sets; e.g. specialization constants symbol-int ID map is
1086  // propagated to runtime with this mechanism.
1089  // TODO Other fields like entries, link options can be propagated using
1090  // the property set infrastructure. This will improve binary compatibility and
1091  // add flexibility.
1092 };
1094 
1095 // pi_buffer_region structure repeats cl_buffer_region, used for sub buffers.
1097  size_t origin;
1098  size_t size;
1099 };
1101 
1102 // pi_buff_rect_offset structure is 3D offset argument passed to buffer rect
1103 // operations (piEnqueueMemBufferCopyRect, etc).
1105  size_t x_bytes;
1106  size_t y_scalar;
1107  size_t z_scalar;
1108 };
1110 
1111 // pi_buff_rect_region structure represents size of 3D region passed to buffer
1112 // rect operations (piEnqueueMemBufferCopyRect, etc).
1114  size_t width_bytes;
1117 };
1119 
1120 // pi_image_offset structure is 3D offset argument passed to image operations
1121 // (piEnqueueMemImageRead, etc).
1123  size_t x;
1124  size_t y;
1125  size_t z;
1126 };
1128 
1129 // pi_image_region structure represents size of 3D region passed to image
1130 // operations (piEnqueueMemImageRead, etc).
1132  size_t width;
1133  size_t height;
1134  size_t depth;
1135 };
1137 
1138 // Offload binaries descriptor version supported by this library.
1139 static const uint16_t PI_DEVICE_BINARIES_VERSION = 1;
1140 
1148  uint16_t Version;
1156 };
1158 
1159 // Opaque types that make reading build log errors easier.
1160 struct _pi_platform;
1161 struct _pi_device;
1162 struct _pi_context;
1163 struct _pi_queue;
1164 struct _pi_mem;
1165 struct _pi_program;
1166 struct _pi_kernel;
1167 struct _pi_event;
1168 struct _pi_sampler;
1169 
1174 using pi_mem = _pi_mem *;
1180 using pi_image_mem_handle = void *;
1183 
1184 typedef struct {
1188 
1189 typedef struct {
1191  size_t image_width;
1193  size_t image_depth;
1200 } _pi_image_desc;
1201 
1204 
1205 typedef enum { PI_MEM_CONTEXT = 0x1106, PI_MEM_SIZE = 0x1102 } _pi_mem_info;
1206 
1207 typedef enum {
1209  0x0,
1212  0x1
1215 
1218 
1219 //
1220 // Following section contains SYCL RT Plugin Interface (PI) functions.
1221 // They are 3 distinct categories:
1222 //
1223 // 1) Ones having direct analogy in OpenCL and needed for the core SYCL
1224 // functionality are started with just "pi" prefix in their names.
1225 // 2) Those having direct analogy in OpenCL but only needed for SYCL
1226 // interoperability with OpenCL are started with "picl" prefix.
1227 // 3) Functions having no direct analogy in OpenCL, started with "piext".
1228 //
1229 // TODO: describe interfaces in Doxygen format
1230 //
1231 
1232 struct _pi_plugin;
1234 
1235 // PI Plugin Initialise.
1236 // Plugin will check the PI version of Plugin Interface,
1237 // populate the PI Version it supports, update targets field and populate
1238 // PiFunctionTable with Supported APIs. The pointers are in a predetermined
1239 // order in pi.def file.
1240 __SYCL_EXPORT pi_result piPluginInit(pi_plugin *plugin_info);
1241 
1242 //
1243 // Platform
1244 //
1245 __SYCL_EXPORT pi_result piPlatformsGet(pi_uint32 num_entries,
1246  pi_platform *platforms,
1247  pi_uint32 *num_platforms);
1248 
1249 __SYCL_EXPORT pi_result piPlatformGetInfo(pi_platform platform,
1250  pi_platform_info param_name,
1251  size_t param_value_size,
1252  void *param_value,
1253  size_t *param_value_size_ret);
1254 
1260  pi_platform platform, pi_native_handle *nativeHandle);
1261 
1268  pi_native_handle nativeHandle, pi_platform *platform);
1269 
1270 __SYCL_EXPORT pi_result piDevicesGet(pi_platform platform,
1272  pi_uint32 num_entries, pi_device *devices,
1273  pi_uint32 *num_devices);
1274 
1275 __SYCL_EXPORT pi_result piextEnablePeerAccess(pi_device command_device,
1276  pi_device peer_device);
1277 __SYCL_EXPORT pi_result piextDisablePeerAccess(pi_device command_device,
1278  pi_device peer_device);
1279 __SYCL_EXPORT pi_result piextPeerAccessGetInfo(
1280  pi_device command_device, pi_device peer_device, pi_peer_attr attr,
1281  size_t param_value_size, void *param_value, size_t *param_value_size_ret);
1282 
1286 __SYCL_EXPORT pi_result piDeviceGetInfo(pi_device device,
1287  pi_device_info param_name,
1288  size_t param_value_size,
1289  void *param_value,
1290  size_t *param_value_size_ret);
1291 
1292 __SYCL_EXPORT pi_result piDeviceRetain(pi_device device);
1293 
1294 __SYCL_EXPORT pi_result piDeviceRelease(pi_device device);
1295 
1296 __SYCL_EXPORT pi_result piDevicePartition(
1297  pi_device device, const pi_device_partition_property *properties,
1298  pi_uint32 num_devices, pi_device *out_devices, pi_uint32 *out_num_devices);
1299 
1304 __SYCL_EXPORT pi_result
1306 
1314  pi_native_handle nativeHandle, pi_platform platform, pi_device *device);
1315 
1319 __SYCL_EXPORT pi_result piextDeviceSelectBinary(pi_device device,
1320  pi_device_binary *binaries,
1321  pi_uint32 num_binaries,
1322  pi_uint32 *selected_binary_ind);
1323 
1336  pi_device device, pi_program program, const char *function_name,
1337  pi_uint64 *function_pointer_ret);
1338 
1340  pi_device Device, pi_program Program, const char *GlobalVariableName,
1341  size_t *GlobalVariableSize, void **GlobalVariablePointerRet);
1342 
1343 //
1344 // Context
1345 //
1347  const pi_context_properties *properties, pi_uint32 num_devices,
1348  const pi_device *devices,
1349  void (*pfn_notify)(const char *errinfo, const void *private_info, size_t cb,
1350  void *user_data),
1351  void *user_data, pi_context *ret_context);
1352 
1353 __SYCL_EXPORT pi_result piContextGetInfo(pi_context context,
1354  pi_context_info param_name,
1355  size_t param_value_size,
1356  void *param_value,
1357  size_t *param_value_size_ret);
1358 
1359 __SYCL_EXPORT pi_result piContextRetain(pi_context context);
1360 
1361 __SYCL_EXPORT pi_result piContextRelease(pi_context context);
1362 
1363 typedef void (*pi_context_extended_deleter)(void *user_data);
1364 
1366  pi_context context, pi_context_extended_deleter func, void *user_data);
1367 
1372 __SYCL_EXPORT pi_result
1374 
1399  pi_native_handle nativeHandle, pi_uint32 numDevices,
1400  const pi_device *devices, bool pluginOwnsNativeHandle, pi_context *context);
1401 
1402 //
1403 // Queue
1404 //
1405 
1406 // TODO: Remove during next ABI break and rename piextQueueCreate to
1407 // piQueueCreate.
1408 __SYCL_EXPORT pi_result piQueueCreate(pi_context context, pi_device device,
1409  pi_queue_properties properties,
1410  pi_queue *queue);
1414 __SYCL_EXPORT pi_result piextQueueCreate(pi_context context, pi_device device,
1415  pi_queue_properties *properties,
1416  pi_queue *queue);
1417 
1418 __SYCL_EXPORT pi_result piQueueGetInfo(pi_queue command_queue,
1419  pi_queue_info param_name,
1420  size_t param_value_size,
1421  void *param_value,
1422  size_t *param_value_size_ret);
1423 
1424 __SYCL_EXPORT pi_result piQueueRetain(pi_queue command_queue);
1425 
1426 __SYCL_EXPORT pi_result piQueueRelease(pi_queue command_queue);
1427 
1428 __SYCL_EXPORT pi_result piQueueFinish(pi_queue command_queue);
1429 
1430 __SYCL_EXPORT pi_result piQueueFlush(pi_queue command_queue);
1431 
1437 __SYCL_EXPORT pi_result piextQueueGetNativeHandle(
1438  pi_queue queue, pi_native_handle *nativeHandle, int32_t *nativeHandleDesc);
1439 
1454  pi_native_handle nativeHandle, int32_t nativeHandleDesc, pi_context context,
1455  pi_device device, bool pluginOwnsNativeHandle,
1456  pi_queue_properties *Properties, pi_queue *queue);
1457 
1458 //
1459 // Memory
1460 //
1461 __SYCL_EXPORT pi_result piMemBufferCreate(
1462  pi_context context, pi_mem_flags flags, size_t size, void *host_ptr,
1463  pi_mem *ret_mem, const pi_mem_properties *properties = nullptr);
1464 
1465 __SYCL_EXPORT pi_result piMemImageCreate(pi_context context, pi_mem_flags flags,
1467  const pi_image_desc *image_desc,
1468  void *host_ptr, pi_mem *ret_mem);
1469 
1470 __SYCL_EXPORT pi_result piMemGetInfo(pi_mem mem, pi_mem_info param_name,
1471  size_t param_value_size, void *param_value,
1472  size_t *param_value_size_ret);
1473 
1474 __SYCL_EXPORT pi_result piMemImageGetInfo(pi_mem image,
1475  pi_image_info param_name,
1476  size_t param_value_size,
1477  void *param_value,
1478  size_t *param_value_size_ret);
1479 
1480 __SYCL_EXPORT pi_result piMemRetain(pi_mem mem);
1481 
1482 __SYCL_EXPORT pi_result piMemRelease(pi_mem mem);
1483 
1484 __SYCL_EXPORT pi_result piMemBufferPartition(
1485  pi_mem buffer, pi_mem_flags flags, pi_buffer_create_type buffer_create_type,
1486  void *buffer_create_info, pi_mem *ret_mem);
1487 
1493 __SYCL_EXPORT pi_result piextMemGetNativeHandle(pi_mem mem, pi_device dev,
1494  pi_native_handle *nativeHandle);
1495 
1505  pi_native_handle nativeHandle, pi_context context, bool ownNativeHandle,
1506  pi_mem *mem);
1507 
1522  pi_native_handle nativeHandle, pi_context context, bool ownNativeHandle,
1523  const pi_image_format *ImageFormat, const pi_image_desc *ImageDesc,
1524  pi_mem *img);
1525 
1526 //
1527 // Program
1528 //
1529 
1530 __SYCL_EXPORT pi_result piProgramCreate(pi_context context, const void *il,
1531  size_t length, pi_program *res_program);
1532 
1549 __SYCL_EXPORT pi_result piProgramCreateWithBinary(
1550  pi_context context, pi_uint32 num_devices, const pi_device *device_list,
1551  const size_t *lengths, const unsigned char **binaries,
1552  size_t num_metadata_entries, const pi_device_binary_property *metadata,
1553  pi_int32 *binary_status, pi_program *ret_program);
1554 
1555 __SYCL_EXPORT pi_result piProgramGetInfo(pi_program program,
1556  pi_program_info param_name,
1557  size_t param_value_size,
1558  void *param_value,
1559  size_t *param_value_size_ret);
1560 
1561 __SYCL_EXPORT pi_result
1562 piProgramLink(pi_context context, pi_uint32 num_devices,
1563  const pi_device *device_list, const char *options,
1564  pi_uint32 num_input_programs, const pi_program *input_programs,
1565  void (*pfn_notify)(pi_program program, void *user_data),
1566  void *user_data, pi_program *ret_program);
1567 
1569  pi_program program, pi_uint32 num_devices, const pi_device *device_list,
1570  const char *options, pi_uint32 num_input_headers,
1571  const pi_program *input_headers, const char **header_include_names,
1572  void (*pfn_notify)(pi_program program, void *user_data), void *user_data);
1573 
1575  pi_program program, pi_uint32 num_devices, const pi_device *device_list,
1576  const char *options,
1577  void (*pfn_notify)(pi_program program, void *user_data), void *user_data);
1578 
1579 __SYCL_EXPORT pi_result piProgramGetBuildInfo(
1580  pi_program program, pi_device device, _pi_program_build_info param_name,
1581  size_t param_value_size, void *param_value, size_t *param_value_size_ret);
1582 
1583 __SYCL_EXPORT pi_result piProgramRetain(pi_program program);
1584 
1585 __SYCL_EXPORT pi_result piProgramRelease(pi_program program);
1586 
1596 __SYCL_EXPORT pi_result
1598  size_t spec_size, const void *spec_value);
1599 
1604 __SYCL_EXPORT pi_result
1606 
1616  pi_native_handle nativeHandle, pi_context context,
1617  bool pluginOwnsNativeHandle, pi_program *program);
1618 
1619 //
1620 // Kernel
1621 //
1622 
1623 typedef enum {
1627  PI_USM_PTRS = 0x4203,
1631 
1633 
1634 __SYCL_EXPORT pi_result piKernelCreate(pi_program program,
1635  const char *kernel_name,
1636  pi_kernel *ret_kernel);
1637 
1638 __SYCL_EXPORT pi_result piKernelSetArg(pi_kernel kernel, pi_uint32 arg_index,
1639  size_t arg_size, const void *arg_value);
1640 
1641 __SYCL_EXPORT pi_result piKernelGetInfo(pi_kernel kernel,
1642  pi_kernel_info param_name,
1643  size_t param_value_size,
1644  void *param_value,
1645  size_t *param_value_size_ret);
1646 
1647 __SYCL_EXPORT pi_result piKernelGetGroupInfo(pi_kernel kernel, pi_device device,
1648  pi_kernel_group_info param_name,
1649  size_t param_value_size,
1650  void *param_value,
1651  size_t *param_value_size_ret);
1652 
1671 __SYCL_EXPORT pi_result piKernelGetSubGroupInfo(
1672  pi_kernel kernel, pi_device device, pi_kernel_sub_group_info param_name,
1673  size_t input_value_size, const void *input_value, size_t param_value_size,
1674  void *param_value, size_t *param_value_size_ret);
1675 
1676 __SYCL_EXPORT pi_result piKernelRetain(pi_kernel kernel);
1677 
1678 __SYCL_EXPORT pi_result piKernelRelease(pi_kernel kernel);
1679 
1687 __SYCL_EXPORT pi_result piextKernelSetArgPointer(pi_kernel kernel,
1688  pi_uint32 arg_index,
1689  size_t arg_size,
1690  const void *arg_value);
1691 
1703 __SYCL_EXPORT pi_result piKernelSetExecInfo(pi_kernel kernel,
1704  pi_kernel_exec_info value_name,
1705  size_t param_value_size,
1706  const void *param_value);
1707 
1718  pi_native_handle nativeHandle, pi_context context, pi_program program,
1719  bool pluginOwnsNativeHandle, pi_kernel *kernel);
1720 
1725 __SYCL_EXPORT pi_result
1727 
1737  pi_kernel kernel, size_t local_work_size, size_t dynamic_shared_memory_size,
1738  pi_uint32 *group_count_ret);
1739 
1740 //
1741 // Events
1742 //
1743 
1748 __SYCL_EXPORT pi_result piEventCreate(pi_context context, pi_event *ret_event);
1749 
1750 __SYCL_EXPORT pi_result piEventGetInfo(pi_event event, pi_event_info param_name,
1751  size_t param_value_size,
1752  void *param_value,
1753  size_t *param_value_size_ret);
1754 
1755 __SYCL_EXPORT pi_result piEventGetProfilingInfo(pi_event event,
1756  pi_profiling_info param_name,
1757  size_t param_value_size,
1758  void *param_value,
1759  size_t *param_value_size_ret);
1760 
1761 __SYCL_EXPORT pi_result piEventsWait(pi_uint32 num_events,
1762  const pi_event *event_list);
1763 
1765  pi_event event, pi_int32 command_exec_callback_type,
1766  void (*pfn_notify)(pi_event event, pi_int32 event_command_status,
1767  void *user_data),
1768  void *user_data);
1769 
1770 __SYCL_EXPORT pi_result piEventSetStatus(pi_event event,
1771  pi_int32 execution_status);
1772 
1773 __SYCL_EXPORT pi_result piEventRetain(pi_event event);
1774 
1775 __SYCL_EXPORT pi_result piEventRelease(pi_event event);
1776 
1781 __SYCL_EXPORT pi_result
1783 
1793  pi_native_handle nativeHandle, pi_context context, bool ownNativeHandle,
1794  pi_event *event);
1795 
1796 //
1797 // Sampler
1798 //
1799 __SYCL_EXPORT pi_result piSamplerCreate(
1800  pi_context context, const pi_sampler_properties *sampler_properties,
1801  pi_sampler *result_sampler);
1802 
1803 __SYCL_EXPORT pi_result piSamplerGetInfo(pi_sampler sampler,
1804  pi_sampler_info param_name,
1805  size_t param_value_size,
1806  void *param_value,
1807  size_t *param_value_size_ret);
1808 
1809 __SYCL_EXPORT pi_result piSamplerRetain(pi_sampler sampler);
1810 
1811 __SYCL_EXPORT pi_result piSamplerRelease(pi_sampler sampler);
1812 
1813 //
1814 // Queue Commands
1815 //
1816 __SYCL_EXPORT pi_result piEnqueueKernelLaunch(
1817  pi_queue queue, pi_kernel kernel, pi_uint32 work_dim,
1818  const size_t *global_work_offset, const size_t *global_work_size,
1819  const size_t *local_work_size, pi_uint32 num_events_in_wait_list,
1820  const pi_event *event_wait_list, pi_event *event);
1821 
1823  pi_queue queue, pi_kernel kernel, pi_uint32 work_dim,
1824  const size_t *global_work_offset, const size_t *global_work_size,
1825  const size_t *local_work_size, pi_uint32 num_events_in_wait_list,
1826  const pi_event *event_wait_list, pi_event *event);
1827 
1828 __SYCL_EXPORT pi_result piEnqueueEventsWait(pi_queue command_queue,
1829  pi_uint32 num_events_in_wait_list,
1830  const pi_event *event_wait_list,
1831  pi_event *event);
1832 
1834  pi_queue command_queue, pi_uint32 num_events_in_wait_list,
1835  const pi_event *event_wait_list, pi_event *event);
1836 
1837 __SYCL_EXPORT pi_result piEnqueueMemBufferRead(
1838  pi_queue queue, pi_mem buffer, pi_bool blocking_read, size_t offset,
1839  size_t size, void *ptr, pi_uint32 num_events_in_wait_list,
1840  const pi_event *event_wait_list, pi_event *event);
1841 
1843  pi_queue command_queue, pi_mem buffer, pi_bool blocking_read,
1844  pi_buff_rect_offset buffer_offset, pi_buff_rect_offset host_offset,
1845  pi_buff_rect_region region, size_t buffer_row_pitch,
1846  size_t buffer_slice_pitch, size_t host_row_pitch, size_t host_slice_pitch,
1847  void *ptr, pi_uint32 num_events_in_wait_list,
1848  const pi_event *event_wait_list, pi_event *event);
1849 
1850 __SYCL_EXPORT pi_result
1851 piEnqueueMemBufferWrite(pi_queue command_queue, pi_mem buffer,
1852  pi_bool blocking_write, size_t offset, size_t size,
1853  const void *ptr, pi_uint32 num_events_in_wait_list,
1854  const pi_event *event_wait_list, pi_event *event);
1855 
1857  pi_queue command_queue, pi_mem buffer, pi_bool blocking_write,
1858  pi_buff_rect_offset buffer_offset, pi_buff_rect_offset host_offset,
1859  pi_buff_rect_region region, size_t buffer_row_pitch,
1860  size_t buffer_slice_pitch, size_t host_row_pitch, size_t host_slice_pitch,
1861  const void *ptr, pi_uint32 num_events_in_wait_list,
1862  const pi_event *event_wait_list, pi_event *event);
1863 
1864 __SYCL_EXPORT pi_result
1865 piEnqueueMemBufferCopy(pi_queue command_queue, pi_mem src_buffer,
1866  pi_mem dst_buffer, size_t src_offset, size_t dst_offset,
1867  size_t size, pi_uint32 num_events_in_wait_list,
1868  const pi_event *event_wait_list, pi_event *event);
1869 
1871  pi_queue command_queue, pi_mem src_buffer, pi_mem dst_buffer,
1872  pi_buff_rect_offset src_origin, pi_buff_rect_offset dst_origin,
1873  pi_buff_rect_region region, size_t src_row_pitch, size_t src_slice_pitch,
1874  size_t dst_row_pitch, size_t dst_slice_pitch,
1875  pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list,
1876  pi_event *event);
1877 
1878 __SYCL_EXPORT pi_result
1879 piEnqueueMemBufferFill(pi_queue command_queue, pi_mem buffer,
1880  const void *pattern, size_t pattern_size, size_t offset,
1881  size_t size, pi_uint32 num_events_in_wait_list,
1882  const pi_event *event_wait_list, pi_event *event);
1883 
1884 __SYCL_EXPORT pi_result piEnqueueMemImageRead(
1885  pi_queue command_queue, pi_mem image, pi_bool blocking_read,
1886  pi_image_offset origin, pi_image_region region, size_t row_pitch,
1887  size_t slice_pitch, void *ptr, pi_uint32 num_events_in_wait_list,
1888  const pi_event *event_wait_list, pi_event *event);
1889 
1890 __SYCL_EXPORT pi_result piEnqueueMemImageWrite(
1891  pi_queue command_queue, pi_mem image, pi_bool blocking_write,
1892  pi_image_offset origin, pi_image_region region, size_t input_row_pitch,
1893  size_t input_slice_pitch, const void *ptr,
1894  pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list,
1895  pi_event *event);
1896 
1897 __SYCL_EXPORT pi_result piEnqueueMemImageCopy(
1898  pi_queue command_queue, pi_mem src_image, pi_mem dst_image,
1899  pi_image_offset src_origin, pi_image_offset dst_origin,
1900  pi_image_region region, pi_uint32 num_events_in_wait_list,
1901  const pi_event *event_wait_list, pi_event *event);
1902 
1903 __SYCL_EXPORT pi_result
1904 piEnqueueMemImageFill(pi_queue command_queue, pi_mem image,
1905  const void *fill_color, const size_t *origin,
1906  const size_t *region, pi_uint32 num_events_in_wait_list,
1907  const pi_event *event_wait_list, pi_event *event);
1908 
1909 __SYCL_EXPORT pi_result piEnqueueMemBufferMap(
1910  pi_queue command_queue, pi_mem buffer, pi_bool blocking_map,
1911  pi_map_flags map_flags, size_t offset, size_t size,
1912  pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list,
1913  pi_event *event, void **ret_map);
1914 
1915 __SYCL_EXPORT pi_result piEnqueueMemUnmap(pi_queue command_queue, pi_mem memobj,
1916  void *mapped_ptr,
1917  pi_uint32 num_events_in_wait_list,
1918  const pi_event *event_wait_list,
1919  pi_event *event);
1920 
1921 #ifndef PI_BIT
1922 #define PI_BIT(_i) (1 << _i)
1923 #endif // PI_BIT
1924 
1925 typedef enum {
1931 typedef uint32_t pi_mem_access_flag;
1932 
1933 typedef enum {
1935  PI_ENUM_FORCE_UINT32 = 0x7fffffff
1938 
1939 typedef struct {
1941  void *pNext;
1945 
1946 // Extension to allow backends to process a PI memory object before adding it
1947 // as an argument for a kernel.
1948 // Note: This is needed by the CUDA backend to extract the device pointer to
1949 // the memory as the kernels uses it rather than the PI object itself.
1950 __SYCL_EXPORT pi_result piextKernelSetArgMemObj(
1951  pi_kernel kernel, pi_uint32 arg_index,
1952  const pi_mem_obj_property *arg_properties, const pi_mem *arg_value);
1953 
1954 // Extension to allow backends to process a PI sampler object before adding it
1955 // as an argument for a kernel.
1956 // Note: This is needed by the CUDA backend to extract the properties of the
1957 // sampler as the kernels uses it rather than the PI object itself.
1958 __SYCL_EXPORT pi_result piextKernelSetArgSampler(pi_kernel kernel,
1959  pi_uint32 arg_index,
1960  const pi_sampler *arg_value);
1961 
1963 // USM
1965 typedef enum {
1972 
1973 typedef enum : pi_bitfield {
1974  PI_USM_ACCESS = (1 << 0),
1979 
1980 typedef enum {
1986 
1987 typedef enum {
1991  PI_MEM_TYPE_SHARED = 0x4199
1993 
1994 // Flag is used for piProgramUSMEnqueuePrefetch. PI_USM_MIGRATION_TBD0 is a
1995 // placeholder for future developments and should not change the behaviour of
1996 // piProgramUSMEnqueuePrefetch
1997 typedef enum : pi_bitfield {
1998  PI_USM_MIGRATION_TBD0 = (1 << 0)
2000 
2006 
2014 __SYCL_EXPORT pi_result piextUSMHostAlloc(void **result_ptr, pi_context context,
2015  pi_usm_mem_properties *properties,
2016  size_t size, pi_uint32 alignment);
2017 
2026 __SYCL_EXPORT pi_result piextUSMDeviceAlloc(void **result_ptr,
2027  pi_context context,
2028  pi_device device,
2029  pi_usm_mem_properties *properties,
2030  size_t size, pi_uint32 alignment);
2031 
2040 __SYCL_EXPORT pi_result piextUSMSharedAlloc(void **result_ptr,
2041  pi_context context,
2042  pi_device device,
2043  pi_usm_mem_properties *properties,
2044  size_t size, pi_uint32 alignment);
2045 
2057 __SYCL_EXPORT pi_result piextUSMPitchedAlloc(
2058  void **result_ptr, size_t *result_pitch, pi_context context,
2059  pi_device device, pi_usm_mem_properties *properties, size_t width_in_bytes,
2060  size_t height, unsigned int element_size_bytes);
2061 
2068 __SYCL_EXPORT pi_result piextUSMFree(pi_context context, void *ptr);
2069 
2081 __SYCL_EXPORT pi_result piextUSMEnqueueMemset(pi_queue queue, void *ptr,
2082  pi_int32 value, size_t count,
2083  pi_uint32 num_events_in_waitlist,
2084  const pi_event *events_waitlist,
2085  pi_event *event);
2086 
2097 __SYCL_EXPORT pi_result piextUSMEnqueueMemcpy(pi_queue queue, pi_bool blocking,
2098  void *dst_ptr,
2099  const void *src_ptr, size_t size,
2100  pi_uint32 num_events_in_waitlist,
2101  const pi_event *events_waitlist,
2102  pi_event *event);
2103 
2113 __SYCL_EXPORT pi_result piextUSMEnqueuePrefetch(
2114  pi_queue queue, const void *ptr, size_t size, pi_usm_migration_flags flags,
2115  pi_uint32 num_events_in_waitlist, const pi_event *events_waitlist,
2116  pi_event *event);
2117 
2125 // USM memadvise API to govern behavior of automatic migration mechanisms
2126 __SYCL_EXPORT pi_result piextUSMEnqueueMemAdvise(pi_queue queue,
2127  const void *ptr, size_t length,
2128  pi_mem_advice advice,
2129  pi_event *event);
2130 
2147 __SYCL_EXPORT pi_result piextUSMGetMemAllocInfo(
2148  pi_context context, const void *ptr, pi_mem_alloc_info param_name,
2149  size_t param_value_size, void *param_value, size_t *param_value_size_ret);
2150 
2163 __SYCL_EXPORT pi_result piextUSMEnqueueFill2D(pi_queue queue, void *ptr,
2164  size_t pitch, size_t pattern_size,
2165  const void *pattern, size_t width,
2166  size_t height,
2167  pi_uint32 num_events_in_waitlist,
2168  const pi_event *events_waitlist,
2169  pi_event *event);
2170 
2182 __SYCL_EXPORT pi_result piextUSMEnqueueMemset2D(
2183  pi_queue queue, void *ptr, size_t pitch, int value, size_t width,
2184  size_t height, pi_uint32 num_events_in_waitlist,
2185  const pi_event *events_waitlist, pi_event *event);
2186 
2201 __SYCL_EXPORT pi_result piextUSMEnqueueMemcpy2D(
2202  pi_queue queue, pi_bool blocking, void *dst_ptr, size_t dst_pitch,
2203  const void *src_ptr, size_t src_pitch, size_t width, size_t height,
2204  pi_uint32 num_events_in_waitlist, const pi_event *events_waitlist,
2205  pi_event *event);
2206 
2212 __SYCL_EXPORT pi_result piextUSMImport(const void *ptr, size_t size,
2213  pi_context context);
2214 
2219 __SYCL_EXPORT pi_result piextUSMRelease(const void *ptr, pi_context context);
2220 
2224 
2239  pi_queue queue, pi_program program, const char *name,
2240  pi_bool blocking_write, size_t count, size_t offset, const void *src,
2241  pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list,
2242  pi_event *event);
2243 
2258  pi_queue queue, pi_program program, const char *name, pi_bool blocking_read,
2259  size_t count, size_t offset, void *dst, pi_uint32 num_events_in_wait_list,
2260  const pi_event *event_wait_list, pi_event *event);
2261 
2266 // Host Pipes
2268 
2287 __SYCL_EXPORT pi_result piextEnqueueReadHostPipe(
2288  pi_queue queue, pi_program program, const char *pipe_symbol,
2289  pi_bool blocking, void *ptr, size_t size, pi_uint32 num_events_in_waitlist,
2290  const pi_event *events_waitlist, pi_event *event);
2291 
2310 __SYCL_EXPORT pi_result piextEnqueueWriteHostPipe(
2311  pi_queue queue, pi_program program, const char *pipe_symbol,
2312  pi_bool blocking, void *ptr, size_t size, pi_uint32 num_events_in_waitlist,
2313  const pi_event *events_waitlist, pi_event *event);
2314 
2321 __SYCL_EXPORT pi_result piextPluginGetOpaqueData(void *opaque_data_param,
2322  void **opaque_data_return);
2323 
2327 __SYCL_EXPORT pi_result piTearDown(void *PluginParameter);
2328 
2340 __SYCL_EXPORT pi_result piPluginGetLastError(char **message);
2341 
2349 __SYCL_EXPORT pi_result piPluginGetBackendOption(pi_platform platform,
2350  const char *frontend_option,
2351  const char **backend_option);
2352 
2363 __SYCL_EXPORT pi_result piGetDeviceAndHostTimer(pi_device Device,
2364  uint64_t *DeviceTime,
2365  uint64_t *HostTime);
2366 
2368 struct _pi_ext_command_buffer;
2369 struct _pi_ext_sync_point;
2370 struct _pi_ext_command_buffer_command;
2371 
2373 using pi_ext_command_buffer_command = _pi_ext_command_buffer_command *;
2375 
2376 typedef enum {
2379 
2382  const void *pNext;
2386 };
2387 
2388 // Command Buffer Update types
2390  uint32_t arg_index;
2393 };
2394 
2396  uint32_t arg_index;
2397  void *new_ptr;
2398 };
2399 
2401  uint32_t arg_index;
2402  uint32_t arg_size;
2403  void *new_value;
2404 };
2405 
2408  uint32_t num_ptr_args;
2409  uint32_t num_value_args;
2410  uint32_t num_work_dim;
2411 
2415 
2419 };
2420 
2427 __SYCL_EXPORT pi_result
2429  const pi_ext_command_buffer_desc *desc,
2430  pi_ext_command_buffer *ret_command_buffer);
2431 
2434 __SYCL_EXPORT pi_result
2436 
2441 __SYCL_EXPORT pi_result
2443 
2447 __SYCL_EXPORT pi_result
2449 
2465  pi_ext_command_buffer command_buffer, pi_kernel kernel, pi_uint32 work_dim,
2466  const size_t *global_work_offset, const size_t *global_work_size,
2467  const size_t *local_work_size, pi_uint32 num_sync_points_in_wait_list,
2468  const pi_ext_sync_point *sync_point_wait_list,
2469  pi_ext_sync_point *sync_point, pi_ext_command_buffer_command *command);
2470 
2482  pi_ext_command_buffer command_buffer, void *dst_ptr, const void *src_ptr,
2483  size_t size, pi_uint32 num_sync_points_in_wait_list,
2484  const pi_ext_sync_point *sync_point_wait_list,
2485  pi_ext_sync_point *sync_point);
2486 
2500  pi_ext_command_buffer command_buffer, pi_mem src_buffer, pi_mem dst_buffer,
2501  size_t src_offset, size_t dst_offset, size_t size,
2502  pi_uint32 num_sync_points_in_wait_list,
2503  const pi_ext_sync_point *sync_point_wait_list,
2504  pi_ext_sync_point *sync_point);
2505 
2523  pi_ext_command_buffer command_buffer, pi_mem src_buffer, pi_mem dst_buffer,
2524  pi_buff_rect_offset src_origin, pi_buff_rect_offset dst_origin,
2525  pi_buff_rect_region region, size_t src_row_pitch, size_t src_slice_pitch,
2526  size_t dst_row_pitch, size_t dst_slice_pitch,
2527  pi_uint32 num_sync_points_in_wait_list,
2528  const pi_ext_sync_point *sync_point_wait_list,
2529  pi_ext_sync_point *sync_point);
2530 
2543  pi_ext_command_buffer command_buffer, pi_mem buffer, size_t offset,
2544  size_t size, void *dst, pi_uint32 num_sync_points_in_wait_list,
2545  const pi_ext_sync_point *sync_point_wait_list,
2546  pi_ext_sync_point *sync_point);
2547 
2565  pi_ext_command_buffer command_buffer, pi_mem buffer,
2566  pi_buff_rect_offset buffer_offset, pi_buff_rect_offset host_offset,
2567  pi_buff_rect_region region, size_t buffer_row_pitch,
2568  size_t buffer_slice_pitch, size_t host_row_pitch, size_t host_slice_pitch,
2569  void *ptr, pi_uint32 num_sync_points_in_wait_list,
2570  const pi_ext_sync_point *sync_point_wait_list,
2571  pi_ext_sync_point *sync_point);
2572 
2585  pi_ext_command_buffer command_buffer, pi_mem buffer, size_t offset,
2586  size_t size, const void *ptr, pi_uint32 num_sync_points_in_wait_list,
2587  const pi_ext_sync_point *sync_point_wait_list,
2588  pi_ext_sync_point *sync_point);
2589 
2607  pi_ext_command_buffer command_buffer, pi_mem buffer,
2608  pi_buff_rect_offset buffer_offset, pi_buff_rect_offset host_offset,
2609  pi_buff_rect_region region, size_t buffer_row_pitch,
2610  size_t buffer_slice_pitch, size_t host_row_pitch, size_t host_slice_pitch,
2611  const void *ptr, pi_uint32 num_sync_points_in_wait_list,
2612  const pi_ext_sync_point *sync_point_wait_list,
2613  pi_ext_sync_point *sync_point);
2614 
2628  pi_ext_command_buffer command_buffer, pi_mem buffer, const void *pattern,
2629  size_t pattern_size, size_t offset, size_t size,
2630  pi_uint32 num_sync_points_in_wait_list,
2631  const pi_ext_sync_point *sync_point_wait_list,
2632  pi_ext_sync_point *sync_point);
2633 
2645 __SYCL_EXPORT pi_result piextCommandBufferFillUSM(
2646  pi_ext_command_buffer command_buffer, void *ptr, const void *pattern,
2647  size_t pattern_size, size_t size, pi_uint32 num_sync_points_in_wait_list,
2648  const pi_ext_sync_point *sync_point_wait_list,
2649  pi_ext_sync_point *sync_point);
2650 
2662  pi_ext_command_buffer command_buffer, const void *ptr, size_t size,
2663  pi_usm_migration_flags flags, pi_uint32 num_sync_points_in_wait_list,
2664  const pi_ext_sync_point *sync_point_wait_list,
2665  pi_ext_sync_point *sync_point);
2666 
2678  pi_ext_command_buffer command_buffer, const void *ptr, size_t length,
2679  pi_mem_advice advice, pi_uint32 num_sync_points_in_wait_list,
2680  const pi_ext_sync_point *sync_point_wait_list,
2681  pi_ext_sync_point *sync_point);
2682 
2692 __SYCL_EXPORT pi_result
2694  pi_uint32 num_events_in_wait_list,
2695  const pi_event *event_wait_list, pi_event *event);
2696 
2704 
2707 __SYCL_EXPORT pi_result
2709 
2713 __SYCL_EXPORT pi_result
2715 
2722  pi_context context, pi_device device, pi_image_handle handle);
2723 
2729  pi_context context, pi_device device, pi_image_handle handle);
2730 
2739 __SYCL_EXPORT pi_result piextMemImageAllocate(pi_context context,
2740  pi_device device,
2742  pi_image_desc *image_desc,
2743  pi_image_mem_handle *ret_mem);
2744 
2752 __SYCL_EXPORT pi_result piextMemMipmapGetLevel(pi_context context,
2753  pi_device device,
2754  pi_image_mem_handle mip_mem,
2755  unsigned int level,
2756  pi_image_mem_handle *ret_mem);
2757 
2763 __SYCL_EXPORT pi_result piextMemImageFree(pi_context context, pi_device device,
2764  pi_image_mem_handle memory_handle);
2765 
2771 __SYCL_EXPORT pi_result piextMemMipmapFree(pi_context context, pi_device device,
2772  pi_image_mem_handle memory_handle);
2773 
2784  pi_context context, pi_device device, pi_image_mem_handle img_mem,
2786  pi_image_handle *ret_handle);
2787 
2799  pi_context context, pi_device device, pi_image_mem_handle img_mem,
2801  pi_sampler sampler, pi_image_handle *ret_handle);
2802 
2813  pi_context context, const pi_sampler_properties *sampler_properties,
2814  float min_mipmap_level_clamp, float max_mipmap_level_clamp,
2815  float max_anisotropy, pi_sampler *result_sampler);
2816 
2832 __SYCL_EXPORT pi_result piextMemImageCopy(
2833  pi_queue command_queue, void *dst_ptr, void *src_ptr,
2834  const pi_image_format *image_format, const pi_image_desc *image_desc,
2835  const pi_image_copy_flags flags, pi_image_offset src_offset,
2836  pi_image_offset dst_offset, pi_image_region copy_extent,
2837  pi_image_region host_extent, pi_uint32 num_events_in_wait_list,
2838  const pi_event *event_wait_list, pi_event *event);
2839 
2846 __SYCL_EXPORT pi_result piextMemImageGetInfo(
2847  const pi_image_mem_handle mem_handle, pi_image_info param_name,
2848  void *param_value, size_t *param_value_size_ret);
2849 
2858 __SYCL_EXPORT pi_result
2859 piextMemImportOpaqueFD(pi_context context, pi_device device, size_t size,
2860  int file_descriptor, pi_interop_mem_handle *ret_handle);
2861 
2871 __SYCL_EXPORT pi_result piextMemMapExternalArray(
2873  pi_image_desc *image_desc, pi_interop_mem_handle mem_handle,
2874  pi_image_mem_handle *ret_mem);
2875 
2881 __SYCL_EXPORT pi_result piextMemReleaseInterop(
2882  pi_context context, pi_device device, pi_interop_mem_handle memory_handle);
2883 
2892  pi_context context, pi_device device, int file_descriptor,
2893  pi_interop_semaphore_handle *ret_handle);
2894 
2901 __SYCL_EXPORT pi_result
2903  pi_interop_semaphore_handle sem_handle);
2904 
2914  pi_queue command_queue, pi_interop_semaphore_handle sem_handle,
2915  pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list,
2916  pi_event *event);
2917 
2928  pi_queue command_queue, pi_interop_semaphore_handle sem_handle,
2929  pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list,
2930  pi_event *event);
2931 
2932 typedef enum {
2938 
2939 struct _pi_plugin {
2940  // PI version supported by host passed to the plugin. The Plugin
2941  // checks and writes the appropriate Function Pointers in
2942  // PiFunctionTable.
2943  // TODO: Work on version fields and their handshaking mechanism.
2944  // Some choices are:
2945  // - Use of integers to keep major and minor version.
2946  // - Keeping char* Versions.
2947  char PiVersion[20];
2948  // Plugin edits this.
2949  char PluginVersion[20];
2950  char *Targets;
2952 #define _PI_API(api) decltype(::api) *api;
2953 #include <sycl/detail/pi.def>
2955 
2957 };
2958 
2959 #ifdef __cplusplus
2960 } // extern "C"
2961 #endif // __cplusplus
2962 
2963 #endif // _PI_H_
constexpr alignment_key::value_t< K > alignment
multi_ptr< ElementType, access::address_space::ext_intel_global_host_space, IsDecorated > host_ptr
image_format
Definition: image.hpp:93
ValueT length(const ValueT *a, const int len)
Calculate the square root of the input array.
Definition: math.hpp:184
constexpr pi_queue_properties PI_QUEUE_COMPUTE_INDEX
Definition: pi.h:817
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.
Definition: pi_cuda.cpp:904
pi_result piextDisablePeerAccess(pi_device command_device, pi_device peer_device)
Definition: pi_cuda.cpp:1257
_pi_kernel_cache_config
Definition: pi.h:830
@ PI_EXT_KERNEL_EXEC_INFO_CACHE_LARGE_DATA
Definition: pi.h:836
@ PI_EXT_KERNEL_EXEC_INFO_CACHE_DEFAULT
Definition: pi.h:832
@ PI_EXT_KERNEL_EXEC_INFO_CACHE_LARGE_SLM
Definition: pi.h:834
uint32_t pi_mem_access_flag
Definition: pi.h:1931
pi_result piextMemGetNativeHandle(pi_mem mem, pi_device dev, pi_native_handle *nativeHandle)
Gets the native handle of a PI mem object.
Definition: pi_cuda.cpp:236
static constexpr pi_device_fp_config PI_FP_SOFT_FLOAT
Definition: pi.h:910
constexpr pi_mem_flags PI_MEM_ACCESS_READ_ONLY
Definition: pi.h:783
pi_result piKernelCreate(pi_program program, const char *kernel_name, pi_kernel *ret_kernel)
Definition: pi_cuda.cpp:341
pi_result piextEnablePeerAccess(pi_device command_device, pi_device peer_device)
Definition: pi_cuda.cpp:1251
constexpr pi_memory_scope_capabilities PI_MEMORY_SCOPE_WORK_GROUP
Definition: pi.h:765
pi_bitfield pi_device_exec_capabilities
Definition: pi.h:740
int32_t pi_int32
Definition: pi.h:221
constexpr pi_sampler_properties PI_SAMPLER_PROPERTIES_NORMALIZED_COORDS
Definition: pi.h:747
constexpr pi_memory_scope_capabilities PI_MEMORY_SCOPE_WORK_ITEM
Definition: pi.h:763
static constexpr _pi_mem_advice PI_MEM_ADVICE_HIP_SET_READ_MOSTLY
Definition: pi.h:640
pi_result piQueueFinish(pi_queue command_queue)
Definition: pi_cuda.cpp:186
constexpr pi_usm_mem_properties PI_MEM_ALLOC_INITIAL_PLACEMENT_DEVICE
Definition: pi.h:805
uintptr_t pi_native_handle
Definition: pi.h:226
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)
Definition: pi_cuda.cpp:310
static constexpr pi_device_binary_type PI_DEVICE_BINARY_TYPE_LLVMIR_BITCODE
Definition: pi.h:970
pi_bitfield pi_map_flags
Definition: pi.h:790
pi_result piextDeviceGetNativeHandle(pi_device device, pi_native_handle *nativeHandle)
Gets the native handle of a PI device object.
Definition: pi_cuda.cpp:100
static constexpr _pi_mem_advice PI_MEM_ADVICE_HIP_UNSET_PREFERRED_LOCATION_HOST
Definition: pi.h:655
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)
Definition: pi_cuda.cpp:736
static constexpr pi_device_affinity_domain PI_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE
Definition: pi.h:900
_pi_result
Definition: pi.h:233
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)
Definition: pi_cuda.cpp:780
pi_result piextEnqueueReadHostPipe(pi_queue queue, pi_program program, const char *pipe_symbol, pi_bool blocking, void *ptr, size_t size, pi_uint32 num_events_in_waitlist, const pi_event *events_waitlist, pi_event *event)
Plugin.
Definition: pi_cuda.cpp:1012
pi_result piKernelRelease(pi_kernel kernel)
Definition: pi_cuda.cpp:530
constexpr pi_sampler_properties PI_SAMPLER_PROPERTIES_ADDRESSING_MODE
Definition: pi.h:749
pi_uint32 pi_bool
Definition: pi.h:224
static constexpr pi_device_partition_property PI_EXT_INTEL_DEVICE_PARTITION_BY_CSLICE
Definition: pi.h:885
constexpr pi_usm_mem_properties PI_MEM_USM_ALLOC_BUFFER_LOCATION
Definition: pi.h:811
pi_result piextUSMFree(pi_context context, void *ptr)
Indicates that the allocated USM memory is no longer needed on the runtime side.
Definition: pi_cuda.cpp:894
pi_result piextMemImageAllocate(pi_context context, pi_device device, pi_image_format *image_format, pi_image_desc *image_desc, pi_image_mem_handle *ret_mem)
API to allocate memory for bindless images.
Definition: pi_cuda.cpp:374
pi_result piextMemImageCopy(pi_queue command_queue, void *dst_ptr, void *src_ptr, const pi_image_format *image_format, const pi_image_desc *image_desc, const pi_image_copy_flags flags, pi_image_offset src_offset, pi_image_offset dst_offset, pi_image_region copy_extent, pi_image_region host_extent, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event)
API to copy image data Host to Device or Device to Host.
Definition: pi_cuda.cpp:426
static constexpr _pi_mem_advice PI_MEM_ADVICE_HIP_UNSET_ACCESSED_BY
Definition: pi.h:650
constexpr pi_queue_properties PI_EXT_QUEUE_FLAG_SUBMISSION_IMMEDIATE
Definition: pi.h:827
pi_bitfield pi_usm_mem_properties
Definition: pi.h:802
_pi_device_info
Definition: pi.h:313
@ PI_DEVICE_INFO_PRINTF_BUFFER_SIZE
Definition: pi.h:383
@ PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_CHAR
Definition: pi.h:324
@ PI_EXT_ONEAPI_DEVICE_INFO_MAX_IMAGE_LINEAR_WIDTH
Definition: pi.h:454
@ PI_EXT_ONEAPI_DEVICE_INFO_MAX_WORK_GROUPS_1D
Definition: pi.h:431
@ PI_EXT_ONEAPI_DEVICE_INFO_WORK_GROUP_PROGRESS_AT_ROOT_GROUP_LEVEL
Definition: pi.h:442
@ PI_DEVICE_INFO_MAX_MEM_BANDWIDTH
Definition: pi.h:409
@ PI_DEVICE_INFO_GPU_SLICES
Definition: pi.h:406
@ PI_DEVICE_INFO_PREFERRED_INTEROP_USER_SYNC
Definition: pi.h:384
@ PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_FLOAT
Definition: pi.h:335
@ PI_EXT_ONEAPI_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D
Definition: pi.h:482
@ PI_DEVICE_INFO_BUILD_ON_SUBDEVICE
Definition: pi.h:412
@ PI_EXT_ONEAPI_DEVICE_INFO_INTEROP_MEMORY_IMPORT_SUPPORT
Definition: pi.h:461
@ PI_DEVICE_INFO_MAX_WORK_GROUP_SIZE
Definition: pi.h:319
@ PI_DEVICE_INFO_IMAGE_SRGB
Definition: pi.h:410
@ PI_EXT_ONEAPI_DEVICE_INFO_WORK_ITEM_PROGRESS_AT_WORK_GROUP_LEVEL
Definition: pi.h:446
@ PI_EXT_ONEAPI_DEVICE_INFO_CUBEMAP_SUPPORT
Definition: pi.h:477
@ PI_DEVICE_INFO_IMAGE3D_MAX_WIDTH
Definition: pi.h:346
@ PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_SHORT
Definition: pi.h:325
@ PI_EXT_ONEAPI_DEVICE_INFO_SUB_GROUP_PROGRESS_AT_ROOT_GROUP_LEVEL
Definition: pi.h:443
@ PI_DEVICE_INFO_IMAGE3D_MAX_HEIGHT
Definition: pi.h:347
@ PI_DEVICE_INFO_MAX_CLOCK_FREQUENCY
Definition: pi.h:338
@ PI_DEVICE_INFO_USM_SINGLE_SHARED_SUPPORT
Definition: pi.h:395
@ PI_DEVICE_INFO_MAX_WORK_ITEM_DIMENSIONS
Definition: pi.h:317
@ PI_DEVICE_INFO_EXECUTION_CAPABILITIES
Definition: pi.h:369
@ PI_EXT_ONEAPI_DEVICE_INFO_COMMAND_BUFFER_UPDATE_SUPPORT
Definition: pi.h:474
@ PI_EXT_INTEL_DEVICE_INFO_ESIMD_SUPPORT
Definition: pi.h:441
@ PI_DEVICE_INFO_QUEUE_PROPERTIES
Definition: pi.h:323
@ PI_DEVICE_INFO_GPU_EU_COUNT
Definition: pi.h:404
@ PI_EXT_ONEAPI_DEVICE_INFO_SUB_GROUP_PROGRESS_AT_WORK_GROUP_LEVEL
Definition: pi.h:444
@ PI_EXT_ONEAPI_DEVICE_INFO_MAX_WORK_GROUPS_2D
Definition: pi.h:432
@ PI_DEVICE_INFO_COMPILER_AVAILABLE
Definition: pi.h:367
@ PI_EXT_ONEAPI_DEVICE_INFO_MAX_IMAGE_LINEAR_PITCH
Definition: pi.h:456
@ PI_DEVICE_INFO_IMAGE_SUPPORT
Definition: pi.h:341
@ PI_DEVICE_INFO_ERROR_CORRECTION_SUPPORT
Definition: pi.h:362
@ PI_EXT_INTEL_DEVICE_INFO_FREE_MEMORY
Definition: pi.h:413
@ PI_EXT_ONEAPI_DEVICE_INFO_INTEROP_MEMORY_EXPORT_SUPPORT
Definition: pi.h:462
@ PI_DEVICE_INFO_QUEUE_ON_DEVICE_PROPERTIES
Definition: pi.h:370
@ PI_DEVICE_INFO_PARTITION_MAX_SUB_DEVICES
Definition: pi.h:387
@ PI_DEVICE_INFO_BUILT_IN_KERNELS
Definition: pi.h:372
@ PI_DEVICE_INFO_UUID
Definition: pi.h:399
@ PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_FLOAT
Definition: pi.h:328
@ PI_EXT_ONEAPI_DEVICE_INFO_MAX_IMAGE_LINEAR_HEIGHT
Definition: pi.h:455
@ PI_DEVICE_INFO_MAX_NUM_SUB_GROUPS
Definition: pi.h:390
@ PI_EXT_ONEAPI_DEVICE_INFO_MIPMAP_SUPPORT
Definition: pi.h:457
@ PI_DEVICE_INFO_AVAILABLE
Definition: pi.h:366
@ PI_DEVICE_INFO_HALF_FP_CONFIG
Definition: pi.h:321
@ PI_EXT_ONEAPI_DEVICE_INFO_MIPMAP_ANISOTROPY_SUPPORT
Definition: pi.h:458
@ PI_DEVICE_INFO_PARENT_DEVICE
Definition: pi.h:385
@ PI_DEVICE_INFO_SUB_GROUP_SIZES_INTEL
Definition: pi.h:392
@ PI_DEVICE_INFO_GPU_EU_SIMD_WIDTH
Definition: pi.h:405
@ PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_SHORT
Definition: pi.h:332
@ PI_DEVICE_INFO_QUEUE_ON_HOST_PROPERTIES
Definition: pi.h:371
@ PI_EXT_ONEAPI_DEVICE_INFO_WORK_ITEM_PROGRESS_AT_ROOT_GROUP_LEVEL
Definition: pi.h:445
@ PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_DOUBLE
Definition: pi.h:336
@ PI_DEVICE_INFO_GLOBAL_MEM_CACHE_TYPE
Definition: pi.h:354
@ PI_DEVICE_INFO_DRIVER_VERSION
Definition: pi.h:378
@ PI_DEVICE_INFO_MAX_PARAMETER_SIZE
Definition: pi.h:352
@ PI_DEVICE_INFO_PARTITION_PROPERTIES
Definition: pi.h:386
@ PI_EXT_DEVICE_INFO_ATOMIC_MEMORY_ORDER_CAPABILITIES
Definition: pi.h:424
@ PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_INT
Definition: pi.h:326
@ PI_DEVICE_INFO_USM_CROSS_SHARED_SUPPORT
Definition: pi.h:396
@ PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_HALF
Definition: pi.h:330
@ PI_EXT_ONEAPI_DEVICE_INFO_BINDLESS_IMAGES_SUPPORT
Definition: pi.h:449
@ PI_DEVICE_INFO_VERSION
Definition: pi.h:380
@ PI_EXT_INTEL_DEVICE_INFO_MEM_CHANNEL_SUPPORT
Definition: pi.h:438
@ PI_DEVICE_INFO_IMAGE3D_MAX_DEPTH
Definition: pi.h:348
@ PI_DEVICE_INFO_MAX_COMPUTE_UNITS
Definition: pi.h:316
@ PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_CHAR
Definition: pi.h:331
@ PI_DEVICE_INFO_IMAGE2D_MAX_HEIGHT
Definition: pi.h:345
@ PI_DEVICE_INFO_VENDOR_ID
Definition: pi.h:315
@ PI_DEVICE_INFO_GLOBAL_MEM_CACHELINE_SIZE
Definition: pi.h:355
@ PI_EXT_DEVICE_INFO_ATOMIC_FENCE_SCOPE_CAPABILITIES
Definition: pi.h:437
@ PI_DEVICE_INFO_GPU_HW_THREADS_PER_EU
Definition: pi.h:426
@ PI_DEVICE_INFO_BACKEND_VERSION
Definition: pi.h:427
@ PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_LONG
Definition: pi.h:327
@ PI_DEVICE_INFO_PLATFORM
Definition: pi.h:373
@ PI_EXT_ONEAPI_DEVICE_INFO_CUBEMAP_SEAMLESS_FILTERING_SUPPORT
Definition: pi.h:478
@ PI_DEVICE_INFO_LOCAL_MEM_SIZE
Definition: pi.h:361
@ PI_DEVICE_INFO_REFERENCE_COUNT
Definition: pi.h:374
@ PI_DEVICE_INFO_MAX_SAMPLERS
Definition: pi.h:351
@ PI_DEVICE_INFO_DEVICE_ID
Definition: pi.h:402
@ PI_EXT_ONEAPI_DEVICE_INFO_INTEROP_SEMAPHORE_EXPORT_SUPPORT
Definition: pi.h:464
@ PI_EXT_ONEAPI_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_3D_USM
Definition: pi.h:485
@ PI_DEVICE_INFO_PROFILE
Definition: pi.h:379
@ PI_DEVICE_INFO_MAX_WORK_ITEM_SIZES
Definition: pi.h:318
@ PI_DEVICE_INFO_EXTENSIONS
Definition: pi.h:382
@ PI_EXT_ONEAPI_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_1D_USM
Definition: pi.h:481
@ PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_INT
Definition: pi.h:333
@ PI_DEVICE_INFO_HOST_UNIFIED_MEMORY
Definition: pi.h:363
@ PI_DEVICE_INFO_PCI_ADDRESS
Definition: pi.h:403
@ PI_DEVICE_INFO_MAX_MEM_ALLOC_SIZE
Definition: pi.h:340
@ PI_DEVICE_INFO_GLOBAL_MEM_CACHE_SIZE
Definition: pi.h:356
@ PI_DEVICE_INFO_IMAGE_MAX_ARRAY_SIZE
Definition: pi.h:350
@ PI_DEVICE_INFO_LINKER_AVAILABLE
Definition: pi.h:368
@ PI_EXT_ONEAPI_DEVICE_INFO_MAX_WORK_GROUPS_3D
Definition: pi.h:433
@ PI_EXT_ONEAPI_DEVICE_INFO_CUDA_ASYNC_BARRIER
Definition: pi.h:434
@ PI_DEVICE_INFO_ADDRESS_BITS
Definition: pi.h:339
@ PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_DOUBLE
Definition: pi.h:329
@ PI_DEVICE_INFO_ATOMIC_64
Definition: pi.h:423
@ PI_DEVICE_INFO_USM_HOST_SUPPORT
Definition: pi.h:393
@ PI_DEVICE_INFO_USM_DEVICE_SUPPORT
Definition: pi.h:394
@ PI_EXT_INTEL_DEVICE_INFO_MAX_COMPUTE_QUEUE_INDICES
Definition: pi.h:422
@ PI_DEVICE_INFO_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS
Definition: pi.h:391
@ PI_DEVICE_INFO_GPU_EU_COUNT_PER_SUBSLICE
Definition: pi.h:408
@ PI_EXT_ONEAPI_DEVICE_INFO_MIPMAP_LEVEL_REFERENCE_SUPPORT
Definition: pi.h:460
@ PI_DEVICE_INFO_MAX_WRITE_IMAGE_ARGS
Definition: pi.h:343
@ PI_EXT_DEVICE_INFO_ATOMIC_MEMORY_SCOPE_CAPABILITIES
Definition: pi.h:425
@ PI_EXT_ONEAPI_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D
Definition: pi.h:484
@ PI_EXT_CODEPLAY_DEVICE_INFO_MAX_REGISTERS_PER_WORK_GROUP
Definition: pi.h:440
@ PI_DEVICE_INFO_IL_VERSION
Definition: pi.h:375
@ PI_EXT_CODEPLAY_DEVICE_INFO_SUPPORTS_FUSION
Definition: pi.h:435
@ PI_DEVICE_INFO_PROFILING_TIMER_RESOLUTION
Definition: pi.h:364
@ PI_DEVICE_INFO_VENDOR
Definition: pi.h:377
@ PI_DEVICE_INFO_MEM_BASE_ADDR_ALIGN
Definition: pi.h:353
@ PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG
Definition: pi.h:334
@ PI_EXT_ONEAPI_DEVICE_INFO_WORK_ITEM_PROGRESS_AT_SUB_GROUP_LEVEL
Definition: pi.h:447
@ PI_DEVICE_INFO_MAX_READ_IMAGE_ARGS
Definition: pi.h:342
@ PI_DEVICE_INFO_PARTITION_AFFINITY_DOMAIN
Definition: pi.h:388
@ PI_DEVICE_INFO_USM_SYSTEM_SHARED_SUPPORT
Definition: pi.h:397
@ PI_EXT_ONEAPI_DEVICE_INFO_MAX_GLOBAL_WORK_GROUPS
Definition: pi.h:430
@ PI_DEVICE_INFO_IMAGE_MAX_BUFFER_SIZE
Definition: pi.h:349
@ PI_EXT_ONEAPI_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_2D_USM
Definition: pi.h:483
@ PI_EXT_INTEL_DEVICE_INFO_MEMORY_CLOCK_RATE
Definition: pi.h:416
@ PI_DEVICE_INFO_DOUBLE_FP_CONFIG
Definition: pi.h:322
@ PI_EXT_ONEAPI_DEVICE_INFO_INTEROP_SEMAPHORE_IMPORT_SUPPORT
Definition: pi.h:463
@ PI_EXT_ONEAPI_DEVICE_INFO_BINDLESS_IMAGES_SHARED_USM_SUPPORT
Definition: pi.h:450
@ PI_EXT_ONEAPI_DEVICE_INFO_BINDLESS_IMAGES_1D_USM_SUPPORT
Definition: pi.h:451
@ PI_EXT_ONEAPI_DEVICE_INFO_MATRIX_COMBINATIONS
Definition: pi.h:466
@ PI_EXT_INTEL_DEVICE_INFO_MEMORY_BUS_WIDTH
Definition: pi.h:419
@ PI_DEVICE_INFO_MAX_CONSTANT_BUFFER_SIZE
Definition: pi.h:358
@ PI_DEVICE_INFO_PARTITION_TYPE
Definition: pi.h:389
@ PI_DEVICE_INFO_TYPE
Definition: pi.h:314
@ PI_EXT_ONEAPI_DEVICE_INFO_COMPONENT_DEVICES
Definition: pi.h:469
@ PI_DEVICE_INFO_SINGLE_FP_CONFIG
Definition: pi.h:320
@ PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_HALF
Definition: pi.h:337
@ PI_DEVICE_INFO_GLOBAL_MEM_SIZE
Definition: pi.h:357
@ PI_DEVICE_INFO_NAME
Definition: pi.h:376
@ PI_EXT_ONEAPI_DEVICE_INFO_COMPOSITE_DEVICE
Definition: pi.h:470
@ PI_DEVICE_INFO_LOCAL_MEM_TYPE
Definition: pi.h:360
@ PI_DEVICE_INFO_MAX_CONSTANT_ARGS
Definition: pi.h:359
@ PI_EXT_ONEAPI_DEVICE_INFO_MIPMAP_MAX_ANISOTROPY
Definition: pi.h:459
@ PI_EXT_ONEAPI_DEVICE_INFO_BINDLESS_IMAGES_2D_USM_SUPPORT
Definition: pi.h:452
@ PI_EXT_ONEAPI_DEVICE_INFO_COMMAND_BUFFER_SUPPORT
Definition: pi.h:473
@ PI_EXT_DEVICE_INFO_ATOMIC_FENCE_ORDER_CAPABILITIES
Definition: pi.h:436
@ PI_EXT_ONEAPI_DEVICE_INFO_IMAGE_PITCH_ALIGN
Definition: pi.h:453
@ PI_DEVICE_INFO_OPENCL_C_VERSION
Definition: pi.h:381
@ PI_DEVICE_INFO_ENDIAN_LITTLE
Definition: pi.h:365
@ PI_DEVICE_INFO_IMAGE2D_MAX_WIDTH
Definition: pi.h:344
@ PI_DEVICE_INFO_GPU_SUBSLICES_PER_SLICE
Definition: pi.h:407
@ PI_EXT_ONEAPI_DEVICE_INFO_BINDLESS_SAMPLED_IMAGE_FETCH_3D
Definition: pi.h:486
@ PI_EXT_ONEAPI_DEVICE_INFO_IP_VERSION
Definition: pi.h:401
@ PI_EXT_ONEAPI_DEVICE_INFO_BFLOAT16_MATH_FUNCTIONS
Definition: pi.h:429
pi_uint64 pi_bitfield
Definition: pi.h:225
static constexpr pi_device_binary_type PI_DEVICE_BINARY_TYPE_NATIVE
Definition: pi.h:965
static constexpr pi_device_fp_config PI_FP_DENORM
Definition: pi.h:904
pi_result piextUSMEnqueueMemAdvise(pi_queue queue, const void *ptr, size_t length, pi_mem_advice advice, pi_event *event)
USM Memadvise API.
Definition: pi_cuda.cpp:933
constexpr pi_mem_flags PI_MEM_FLAGS_HOST_PTR_ALLOC
Definition: pi.h:787
pi_result piextMemImportOpaqueFD(pi_context context, pi_device device, size_t size, int file_descriptor, pi_interop_mem_handle *ret_handle)
API to import external memory in the form of a file descriptor.
Definition: pi_cuda.cpp:458
_pi_program_build_status
Definition: pi.h:264
@ PI_PROGRAM_BUILD_STATUS_SUCCESS
Definition: pi.h:267
@ PI_PROGRAM_BUILD_STATUS_ERROR
Definition: pi.h:266
@ PI_PROGRAM_BUILD_STATUS_IN_PROGRESS
Definition: pi.h:268
@ PI_PROGRAM_BUILD_STATUS_NONE
Definition: pi.h:265
static constexpr _pi_mem_advice PI_MEM_ADVICE_HIP_UNSET_ACCESSED_BY_HOST
Definition: pi.h:659
static constexpr pi_device_affinity_domain PI_DEVICE_AFFINITY_DOMAIN_L2_CACHE
Definition: pi.h:895
constexpr pi_usm_mem_properties PI_MEM_ALLOC_FLAGS
Definition: pi.h:803
_pi_queue_info
Definition: pi.h:518
@ PI_QUEUE_INFO_DEVICE_DEFAULT
Definition: pi.h:521
@ PI_QUEUE_INFO_PROPERTIES
Definition: pi.h:522
@ PI_QUEUE_INFO_DEVICE
Definition: pi.h:520
@ PI_QUEUE_INFO_CONTEXT
Definition: pi.h:519
@ PI_QUEUE_INFO_REFERENCE_COUNT
Definition: pi.h:523
@ PI_QUEUE_INFO_SIZE
Definition: pi.h:524
@ PI_EXT_ONEAPI_QUEUE_INFO_EMPTY
Definition: pi.h:527
_pi_mem_advice
Definition: pi.h:621
@ PI_MEM_ADVICE_CUDA_UNSET_ACCESSED_BY_HOST
Definition: pi.h:633
@ PI_MEM_ADVICE_CUDA_UNSET_READ_MOSTLY
Definition: pi.h:625
@ PI_MEM_ADVICE_CUDA_UNSET_PREFERRED_LOCATION
Definition: pi.h:627
@ PI_MEM_ADVICE_CUDA_SET_READ_MOSTLY
Definition: pi.h:624
@ PI_MEM_ADVICE_RESET
Definition: pi.h:623
@ PI_MEM_ADVICE_CUDA_SET_PREFERRED_LOCATION_HOST
Definition: pi.h:630
@ PI_MEM_ADVICE_HIP_SET_COARSE_GRAINED
Definition: pi.h:634
@ PI_MEM_ADVICE_UNKNOWN
Definition: pi.h:636
@ PI_MEM_ADVICE_HIP_UNSET_COARSE_GRAINED
Definition: pi.h:635
@ PI_MEM_ADVICE_CUDA_UNSET_ACCESSED_BY
Definition: pi.h:629
@ PI_MEM_ADVICE_CUDA_SET_ACCESSED_BY_HOST
Definition: pi.h:632
@ PI_MEM_ADVICE_CUDA_UNSET_PREFERRED_LOCATION_HOST
Definition: pi.h:631
@ PI_MEM_ADVICE_CUDA_SET_PREFERRED_LOCATION
Definition: pi.h:626
@ PI_MEM_ADVICE_CUDA_SET_ACCESSED_BY
Definition: pi.h:628
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)
Definition: pi_cuda.cpp:788
static constexpr pi_device_affinity_domain PI_DEVICE_AFFINITY_DOMAIN_L3_CACHE
Definition: pi.h:893
pi_result piextPluginGetOpaqueData(void *opaque_data_param, void **opaque_data_return)
API to get Plugin internal data, opaque to SYCL RT.
Definition: pi_cuda.cpp:1237
_pi_image_channel_type
Definition: pi.h:680
@ PI_IMAGE_CHANNEL_TYPE_FLOAT
Definition: pi.h:695
@ PI_IMAGE_CHANNEL_TYPE_UNORM_SHORT_565
Definition: pi.h:685
@ PI_IMAGE_CHANNEL_TYPE_UNORM_INT8
Definition: pi.h:683
@ PI_IMAGE_CHANNEL_TYPE_SIGNED_INT16
Definition: pi.h:689
@ PI_IMAGE_CHANNEL_TYPE_SNORM_INT16
Definition: pi.h:682
@ PI_IMAGE_CHANNEL_TYPE_UNSIGNED_INT8
Definition: pi.h:691
@ PI_IMAGE_CHANNEL_TYPE_SIGNED_INT8
Definition: pi.h:688
@ PI_IMAGE_CHANNEL_TYPE_UNORM_INT_101010
Definition: pi.h:687
@ PI_IMAGE_CHANNEL_TYPE_UNSIGNED_INT32
Definition: pi.h:693
@ PI_IMAGE_CHANNEL_TYPE_UNSIGNED_INT16
Definition: pi.h:692
@ PI_IMAGE_CHANNEL_TYPE_SNORM_INT8
Definition: pi.h:681
@ PI_IMAGE_CHANNEL_TYPE_UNORM_SHORT_555
Definition: pi.h:686
@ PI_IMAGE_CHANNEL_TYPE_SIGNED_INT32
Definition: pi.h:690
@ PI_IMAGE_CHANNEL_TYPE_HALF_FLOAT
Definition: pi.h:694
@ PI_IMAGE_CHANNEL_TYPE_UNORM_INT16
Definition: pi.h:684
_pi_kernel_sub_group_info
Definition: pi.h:560
@ PI_KERNEL_COMPILE_NUM_SUB_GROUPS
Definition: pi.h:563
@ PI_KERNEL_MAX_NUM_SUB_GROUPS
Definition: pi.h:562
@ PI_KERNEL_COMPILE_SUB_GROUP_SIZE_INTEL
Definition: pi.h:564
@ PI_KERNEL_MAX_SUB_GROUP_SIZE
Definition: pi.h:561
pi_result piextProgramCreateWithNativeHandle(pi_native_handle nativeHandle, pi_context context, bool pluginOwnsNativeHandle, pi_program *program)
Creates PI program object from a native handle.
Definition: pi_cuda.cpp:333
pi_bitfield pi_mem_properties
Definition: pi.h:796
pi_result piextEnqueueWriteHostPipe(pi_queue queue, pi_program program, const char *pipe_symbol, pi_bool blocking, void *ptr, size_t size, pi_uint32 num_events_in_waitlist, const pi_event *events_waitlist, pi_event *event)
Write to pipe of a given name.
Definition: pi_cuda.cpp:1032
pi_result piKernelSetArg(pi_kernel kernel, pi_uint32 arg_index, size_t arg_size, const void *arg_value)
Definition: pi_cuda.cpp:347
pi_result piEnqueueEventsWaitWithBarrier(pi_queue command_queue, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event)
Definition: pi_cuda.cpp:664
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)
Definition: pi_cuda.cpp:536
_pi_kernel_group_info
Definition: pi.h:539
@ PI_KERNEL_GROUP_INFO_WORK_GROUP_SIZE
Definition: pi.h:541
@ PI_KERNEL_GROUP_INFO_COMPILE_WORK_GROUP_SIZE
Definition: pi.h:542
@ PI_KERNEL_GROUP_INFO_GLOBAL_WORK_SIZE
Definition: pi.h:540
@ PI_KERNEL_GROUP_INFO_PRIVATE_MEM_SIZE
Definition: pi.h:545
@ PI_KERNEL_GROUP_INFO_LOCAL_MEM_SIZE
Definition: pi.h:543
@ PI_KERNEL_GROUP_INFO_PREFERRED_WORK_GROUP_SIZE_MULTIPLE
Definition: pi.h:544
@ PI_KERNEL_GROUP_INFO_NUM_REGS
Definition: pi.h:547
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)
Definition: pi_cuda.cpp:673
constexpr pi_queue_properties PI_EXT_QUEUE_FLAG_SUBMISSION_NO_IMMEDIATE
Definition: pi.h:826
constexpr pi_memory_order_capabilities PI_MEMORY_ORDER_ACQUIRE
Definition: pi.h:757
pi_result piProgramRetain(pi_program program)
Definition: pi_cuda.cpp:320
pi_uint64 pi_image_handle
Definition: pi.h:1179
pi_result piextWaitExternalSemaphore(pi_queue command_queue, pi_interop_semaphore_handle sem_handle, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event)
API to instruct the queue with a non-blocking wait on an external semaphore.
Definition: pi_cuda.cpp:491
const pi_bool PI_TRUE
Definition: pi.h:706
pi_result piextCommandBufferMemBufferCopy(pi_ext_command_buffer command_buffer, pi_mem src_buffer, pi_mem dst_buffer, size_t src_offset, size_t dst_offset, size_t size, pi_uint32 num_sync_points_in_wait_list, const pi_ext_sync_point *sync_point_wait_list, pi_ext_sync_point *sync_point)
API to append a mem buffer copy command to the command-buffer.
Definition: pi_cuda.cpp:1107
_pi_ext_command_buffer_command * pi_ext_command_buffer_command
Definition: pi.h:2373
pi_result piextUSMImport(const void *ptr, size_t size, pi_context context)
Import host system memory into USM.
Definition: pi_cuda.cpp:984
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)
Definition: pi_cuda.cpp:227
pi_property_type
Definition: pi.h:931
@ PI_PROPERTY_TYPE_UINT32
Definition: pi.h:933
@ PI_PROPERTY_TYPE_UNKNOWN
Definition: pi.h:932
@ PI_PROPERTY_TYPE_BYTE_ARRAY
Definition: pi.h:934
@ PI_PROPERTY_TYPE_STRING
Definition: pi.h:935
pi_result piextCommandBufferRetainCommand(pi_ext_command_buffer_command command)
API to increment the reference count of a command-buffer command.
Definition: pi_cuda.cpp:1228
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.
Definition: pi_cuda.cpp:923
_pi_kernel_exec_info
Definition: pi.h:1623
@ PI_USM_INDIRECT_ACCESS
indicates that the kernel might access data through USM ptrs
Definition: pi.h:1625
@ PI_EXT_KERNEL_EXEC_INFO_CACHE_CONFIG
provides the preferred cache configuration (large slm or large data)
Definition: pi.h:1629
@ PI_USM_PTRS
provides an explicit list of pointers that the kernel will access
Definition: pi.h:1627
pi_result piextPlatformGetNativeHandle(pi_platform platform, pi_native_handle *nativeHandle)
Gets the native handle of a PI platform object.
Definition: pi_cuda.cpp:42
pi_result piProgramRelease(pi_program program)
Definition: pi_cuda.cpp:324
pi_result piextEnqueueCommandBuffer(pi_ext_command_buffer command_buffer, pi_queue queue, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event)
API to submit the command-buffer to queue for execution, returns an error if the command-buffer is no...
Definition: pi_cuda.cpp:1212
_pi_platform_info
Definition: pi.h:248
@ PI_PLATFORM_INFO_VENDOR
Definition: pi.h:252
@ PI_PLATFORM_INFO_EXTENSIONS
Definition: pi.h:249
@ PI_PLATFORM_INFO_PROFILE
Definition: pi.h:251
@ PI_EXT_PLATFORM_INFO_BACKEND
Definition: pi.h:254
@ PI_PLATFORM_INFO_NAME
Definition: pi.h:250
@ PI_PLATFORM_INFO_VERSION
Definition: pi.h:253
pi_result piextKernelSetArgSampler(pi_kernel kernel, pi_uint32 arg_index, const pi_sampler *arg_value)
Definition: pi_cuda.cpp:360
pi_result piextMemMapExternalArray(pi_context context, pi_device device, pi_image_format *image_format, pi_image_desc *image_desc, pi_interop_mem_handle mem_handle, pi_image_mem_handle *ret_mem)
API to map an interop memory handle to an image memory handle.
Definition: pi_cuda.cpp:464
static constexpr pi_device_partition_property PI_DEVICE_PARTITION_BY_COUNTS
Definition: pi.h:878
pi_result piSamplerRetain(pi_sampler sampler)
Definition: pi_cuda.cpp:648
constexpr pi_queue_properties PI_QUEUE_FLAG_OUT_OF_ORDER_EXEC_MODE_ENABLE
Definition: pi.h:819
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)
Definition: pi_cuda.cpp:217
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.
Definition: pi_cuda.cpp:887
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...
Definition: pi_cuda.cpp:78
pi_result piKernelRetain(pi_kernel kernel)
Definition: pi_cuda.cpp:525
pi_result piPlatformsGet(pi_uint32 num_entries, pi_platform *platforms, pi_uint32 *num_platforms)
Definition: pi_cuda.cpp:30
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.
Definition: pi_cuda.cpp:992
pi_result piextKernelSuggestMaxCooperativeGroupCount(pi_kernel kernel, size_t local_work_size, size_t dynamic_shared_memory_size, pi_uint32 *group_count_ret)
Gets the max work group count for a cooperative kernel.
Definition: pi_cuda.cpp:571
pi_result piextQueueCreate(pi_context context, pi_device device, pi_queue_properties *properties, pi_queue *queue)
Definition: pi_cuda.cpp:167
pi_result piextDestroyExternalSemaphore(pi_context context, pi_device device, pi_interop_semaphore_handle sem_handle)
API to destroy the external semaphore handle.
Definition: pi_cuda.cpp:486
static constexpr _pi_mem_advice PI_MEM_ADVICE_HIP_UNSET_READ_MOSTLY
Definition: pi.h:642
_pi_image_info
Definition: pi.h:550
@ PI_IMAGE_INFO_HEIGHT
Definition: pi.h:556
@ PI_IMAGE_INFO_SLICE_PITCH
Definition: pi.h:554
@ PI_IMAGE_INFO_ROW_PITCH
Definition: pi.h:553
@ PI_IMAGE_INFO_WIDTH
Definition: pi.h:555
@ PI_IMAGE_INFO_FORMAT
Definition: pi.h:551
@ PI_IMAGE_INFO_ELEMENT_SIZE
Definition: pi.h:552
@ PI_IMAGE_INFO_DEPTH
Definition: pi.h:557
pi_result piextEventGetNativeHandle(pi_event event, pi_native_handle *nativeHandle)
Gets the native handle of a PI event object.
Definition: pi_cuda.cpp:620
pi_result piEnqueueEventsWait(pi_queue command_queue, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event)
Definition: pi_cuda.cpp:656
_pi_usm_capabilities
Definition: pi.h:1973
@ PI_USM_ATOMIC_ACCESS
Definition: pi.h:1975
@ PI_USM_ACCESS
Definition: pi.h:1974
@ PI_USM_CONCURRENT_ACCESS
Definition: pi.h:1976
@ PI_USM_CONCURRENT_ATOMIC_ACCESS
Definition: pi.h:1977
pi_uint32 pi_ext_sync_point
Definition: pi.h:2374
_pi_image_channel_order
Definition: pi.h:662
@ PI_IMAGE_CHANNEL_ORDER_RGB
Definition: pi.h:667
@ PI_IMAGE_CHANNEL_ORDER_RA
Definition: pi.h:666
@ PI_IMAGE_CHANNEL_ORDER_RGBA
Definition: pi.h:668
@ PI_IMAGE_CHANNEL_ORDER_INTENSITY
Definition: pi.h:672
@ PI_IMAGE_CHANNEL_ORDER_R
Definition: pi.h:664
@ PI_IMAGE_CHANNEL_ORDER_ABGR
Definition: pi.h:671
@ PI_IMAGE_CHANNEL_ORDER_RGBx
Definition: pi.h:676
@ PI_IMAGE_CHANNEL_ORDER_RG
Definition: pi.h:665
@ PI_IMAGE_CHANNEL_ORDER_BGRA
Definition: pi.h:669
@ PI_IMAGE_CHANNEL_ORDER_Rx
Definition: pi.h:674
@ PI_IMAGE_CHANNEL_ORDER_A
Definition: pi.h:663
@ PI_IMAGE_CHANNEL_ORDER_sRGBA
Definition: pi.h:677
@ PI_IMAGE_CHANNEL_ORDER_LUMINANCE
Definition: pi.h:673
@ PI_IMAGE_CHANNEL_ORDER_RGx
Definition: pi.h:675
@ PI_IMAGE_CHANNEL_ORDER_ARGB
Definition: pi.h:670
constexpr pi_memory_order_capabilities PI_MEMORY_ORDER_ACQ_REL
Definition: pi.h:759
_pi_profiling_info
Definition: pi.h:769
@ PI_PROFILING_INFO_COMMAND_END
Definition: pi.h:773
@ PI_PROFILING_INFO_COMMAND_START
Definition: pi.h:772
@ PI_PROFILING_INFO_COMMAND_SUBMIT
Definition: pi.h:771
@ PI_PROFILING_INFO_COMMAND_QUEUED
Definition: pi.h:770
static constexpr pi_device_partition_property PI_DEVICE_PARTITION_BY_COUNTS_LIST_END
Definition: pi.h:881
_pi_usm_type
Definition: pi.h:1987
@ PI_MEM_TYPE_SHARED
Definition: pi.h:1991
@ PI_MEM_TYPE_UNKNOWN
Definition: pi.h:1988
@ PI_MEM_TYPE_DEVICE
Definition: pi.h:1990
@ PI_MEM_TYPE_HOST
Definition: pi.h:1989
_pi_sampler_cubemap_filter_mode
Definition: pi.h:733
@ PI_SAMPLER_CUBEMAP_FILTER_MODE_SEAMLESS
Definition: pi.h:735
@ PI_SAMPLER_CUBEMAP_FILTER_MODE_DISJOINTED
Definition: pi.h:734
_pi_usm_migration_flags
Definition: pi.h:1997
@ PI_USM_MIGRATION_TBD0
Definition: pi.h:1998
pi_result piTearDown(void *PluginParameter)
API to notify that the plugin should clean up its resources.
Definition: pi_cuda.cpp:1242
_pi_device_type
Definition: pi.h:281
@ PI_DEVICE_TYPE_ACC
A PI device that is a dedicated accelerator.
Definition: pi.h:287
@ PI_DEVICE_TYPE_ALL
All devices available in the PI plugin.
Definition: pi.h:284
@ PI_DEVICE_TYPE_DEFAULT
The default device available in the PI plugin.
Definition: pi.h:282
@ PI_DEVICE_TYPE_GPU
A PI device that is a GPU.
Definition: pi.h:286
@ PI_DEVICE_TYPE_CUSTOM
A PI device that is a custom device.
Definition: pi.h:289
@ PI_DEVICE_TYPE_CPU
A PI device that is the host processor.
Definition: pi.h:285
static constexpr pi_device_partition_property PI_DEVICE_PARTITION_EQUALLY
Definition: pi.h:876
pi_result piextUSMRelease(const void *ptr, pi_context context)
Release host system memory from USM.
Definition: pi_cuda.cpp:988
pi_result piContextRetain(pi_context context)
Definition: pi_cuda.cpp:152
#define PI_BIT(_i)
Definition: pi.h:1922
_pi_device_mem_cache_type
Definition: pi.h:302
@ PI_DEVICE_MEM_CACHE_TYPE_READ_WRITE_CACHE
Definition: pi.h:305
@ PI_DEVICE_MEM_CACHE_TYPE_READ_ONLY_CACHE
Definition: pi.h:304
@ PI_DEVICE_MEM_CACHE_TYPE_NONE
Definition: pi.h:303
uint64_t pi_uint64
Definition: pi.h:223
pi_bitfield pi_queue_properties
Definition: pi.h:815
pi_result piEventCreate(pi_context context, pi_event *ret_event)
Create PI event object in a signalled/completed state.
Definition: pi_cuda.cpp:578
pi_result piextCommandBufferNDRangeKernel(pi_ext_command_buffer command_buffer, 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_sync_points_in_wait_list, const pi_ext_sync_point *sync_point_wait_list, pi_ext_sync_point *sync_point, pi_ext_command_buffer_command *command)
API to append a kernel execution command to the command-buffer.
Definition: pi_cuda.cpp:1086
pi_result piextPlatformCreateWithNativeHandle(pi_native_handle nativeHandle, pi_platform *platform)
Creates PI platform object from a native handle.
Definition: pi_cuda.cpp:47
uint8_t pi_device_binary_type
Types of device binary.
Definition: pi.h:961
pi_result piMemRetain(pi_mem mem)
Definition: pi_cuda.cpp:223
_pi_image_copy_flags
Definition: pi.h:698
@ PI_IMAGE_COPY_DEVICE_TO_DEVICE
Definition: pi.h:701
@ PI_IMAGE_COPY_DEVICE_TO_HOST
Definition: pi.h:700
@ PI_IMAGE_COPY_HOST_TO_DEVICE
Definition: pi.h:699
pi_result piextCommandBufferFinalize(pi_ext_command_buffer command_buffer)
API to stop command-buffer recording such that no more commands can be appended, and makes the comman...
Definition: pi_cuda.cpp:1082
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.
Definition: pi_cuda.cpp:515
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.
Definition: pi_cuda.cpp:1059
const pi_bool PI_FALSE
Definition: pi.h:707
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)
Definition: pi_cuda.cpp:582
pi_result piextCommandBufferMemBufferReadRect(pi_ext_command_buffer command_buffer, pi_mem buffer, 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_sync_points_in_wait_list, const pi_ext_sync_point *sync_point_wait_list, pi_ext_sync_point *sync_point)
API to append a rectangular mem buffer read command to the command-buffer.
Definition: pi_cuda.cpp:1138
pi_result piDevicesGet(pi_platform platform, pi_device_type device_type, pi_uint32 num_entries, pi_device *devices, pi_uint32 *num_devices)
Definition: pi_cuda.cpp:63
pi_result piQueueRelease(pi_queue command_queue)
Definition: pi_cuda.cpp:182
constexpr pi_queue_properties PI_EXT_ONEAPI_QUEUE_FLAG_PRIORITY_LOW
Definition: pi.h:824
pi_result piextCommandBufferMemBufferRead(pi_ext_command_buffer command_buffer, pi_mem buffer, size_t offset, size_t size, void *dst, pi_uint32 num_sync_points_in_wait_list, const pi_ext_sync_point *sync_point_wait_list, pi_ext_sync_point *sync_point)
API to append a mem buffer read command to the command-buffer.
Definition: pi_cuda.cpp:1129
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.
Definition: pi_cuda.cpp:953
constexpr pi_memory_order_capabilities PI_MEMORY_ORDER_RELEASE
Definition: pi.h:758
pi_bitfield pi_sampler_properties
Definition: pi.h:746
_pi_usm_capability_query
Definition: pi.h:1965
@ PI_USM_SYSTEM_SHARED_SUPPORT
Definition: pi.h:1970
@ PI_USM_SINGLE_SHARED_SUPPORT
Definition: pi.h:1968
@ PI_USM_DEVICE_SUPPORT
Definition: pi.h:1967
@ PI_USM_HOST_SUPPORT
Definition: pi.h:1966
@ PI_USM_CROSS_SHARED_SUPPORT
Definition: pi.h:1969
constexpr pi_queue_properties PI_QUEUE_FLAG_ON_DEVICE_DEFAULT
Definition: pi.h:822
pi_result piextCommandBufferMemBufferFill(pi_ext_command_buffer command_buffer, pi_mem buffer, const void *pattern, size_t pattern_size, size_t offset, size_t size, pi_uint32 num_sync_points_in_wait_list, const pi_ext_sync_point *sync_point_wait_list, pi_ext_sync_point *sync_point)
API to append a mem buffer fill command to the command-buffer.
Definition: pi_cuda.cpp:1173
constexpr pi_queue_properties PI_EXT_ONEAPI_QUEUE_FLAG_DISCARD_EVENTS
Definition: pi.h:823
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.
Definition: pi_cuda.cpp:143
pi_result piextMemImageFree(pi_context context, pi_device device, pi_image_mem_handle memory_handle)
API to free memory for bindless images.
Definition: pi_cuda.cpp:416
constexpr pi_queue_properties PI_QUEUE_FLAG_ON_DEVICE
Definition: pi.h:821
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)
Definition: pi_cuda.cpp:589
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)
Definition: pi_cuda.cpp:699
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)
Definition: pi_cuda.cpp:725
constexpr pi_mem_flags PI_MEM_FLAGS_HOST_PTR_COPY
Definition: pi.h:786
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)
Definition: pi_cuda.cpp:711
_pi_buffer_create_type
Definition: pi.h:704
@ PI_BUFFER_CREATE_TYPE_REGION
Definition: pi.h:704
static constexpr pi_device_affinity_domain PI_DEVICE_AFFINITY_DOMAIN_L4_CACHE
Definition: pi.h:891
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)
Definition: pi_cuda.cpp:772
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.
Definition: pi_cuda.cpp:1052
static constexpr _pi_mem_advice PI_MEM_ADVICE_HIP_SET_ACCESSED_BY
Definition: pi.h:648
static constexpr pi_device_fp_config PI_FP_ROUND_TO_NEAREST
Definition: pi.h:906
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)
Definition: pi_cuda.cpp:272
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:222
_pi_device_binary_property_set_struct * pi_device_binary_property_set
Definition: pi.h:958
static const uint16_t PI_DEVICE_BINARY_VERSION
Definition: pi.h:973
static constexpr pi_device_partition_property PI_DEVICE_PARTITION_BY_AFFINITY_DOMAIN
Definition: pi.h:883
constexpr pi_memory_order_capabilities PI_MEMORY_ORDER_RELAXED
Definition: pi.h:756
_pi_event_info
Definition: pi.h:567
@ PI_EVENT_INFO_COMMAND_EXECUTION_STATUS
Definition: pi.h:571
@ PI_EVENT_INFO_REFERENCE_COUNT
Definition: pi.h:572
@ PI_EVENT_INFO_COMMAND_TYPE
Definition: pi.h:570
@ PI_EVENT_INFO_CONTEXT
Definition: pi.h:569
@ PI_EVENT_INFO_COMMAND_QUEUE
Definition: pi.h:568
constexpr pi_queue_properties PI_EXT_ONEAPI_QUEUE_FLAG_PRIORITY_HIGH
Definition: pi.h:825
pi_result piextEventCreateWithNativeHandle(pi_native_handle nativeHandle, pi_context context, bool ownNativeHandle, pi_event *event)
Creates PI event object from a native handle.
Definition: pi_cuda.cpp:626
constexpr pi_usm_mem_properties PI_MEM_ALLOC_INITIAL_PLACEMENT_HOST
Definition: pi.h:807
static constexpr pi_device_fp_config PI_FP_ROUND_TO_INF
Definition: pi.h:908
pi_result piextGetGlobalVariablePointer(pi_device Device, pi_program Program, const char *GlobalVariableName, size_t *GlobalVariableSize, void **GlobalVariablePointerRet)
Definition: pi_cuda.cpp:850
pi_result piextMemSampledImageHandleDestroy(pi_context context, pi_device device, pi_image_handle handle)
API to destroy bindless sampled image handles.
Definition: pi_cuda.cpp:444
intptr_t pi_context_properties
Definition: pi.h:738
pi_result piEventsWait(pi_uint32 num_events, const pi_event *event_list)
Definition: pi_cuda.cpp:597
pi_bitfield pi_mem_flags
Definition: pi.h:780
constexpr pi_usm_mem_properties PI_MEM_ALLOC_WRTITE_COMBINED
Definition: pi.h:804
constexpr pi_queue_properties PI_QUEUE_FLAGS
Definition: pi.h:816
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)
Definition: pi_cuda.cpp:761
pi_result piextCommandBufferRelease(pi_ext_command_buffer command_buffer)
API to decrement the reference count of the command-buffer.
Definition: pi_cuda.cpp:1078
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:968
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.
Definition: pi_cuda.cpp:940
constexpr pi_queue_properties PI_QUEUE_FLAG_PROFILING_ENABLE
Definition: pi.h:820
static constexpr _pi_mem_advice PI_MEM_ADVICE_HIP_SET_PREFERRED_LOCATION_HOST
Definition: pi.h:652
pi_result piextCommandBufferMemBufferCopyRect(pi_ext_command_buffer command_buffer, 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_sync_points_in_wait_list, const pi_ext_sync_point *sync_point_wait_list, pi_ext_sync_point *sync_point)
API to append a rectangular mem buffer copy command to the command-buffer.
Definition: pi_cuda.cpp:1117
pi_result piQueueFlush(pi_queue command_queue)
Definition: pi_cuda.cpp:188
pi_result piMemRelease(pi_mem mem)
Definition: pi_cuda.cpp:225
constexpr pi_mem_flags PI_MEM_FLAGS_HOST_PTR_USE
Definition: pi.h:785
void(* pi_context_extended_deleter)(void *user_data)
Definition: pi.h:1363
static constexpr _pi_mem_advice PI_MEM_ADVICE_HIP_SET_ACCESSED_BY_HOST
Definition: pi.h:657
constexpr pi_map_flags PI_MAP_WRITE
Definition: pi.h:792
constexpr pi_map_flags PI_MAP_WRITE_INVALIDATE_REGION
Definition: pi.h:793
_pi_mem_type
Definition: pi.h:610
@ PI_MEM_TYPE_BUFFER
Definition: pi.h:611
@ PI_MEM_TYPE_IMAGE_CUBEMAP
Definition: pi.h:618
@ PI_MEM_TYPE_IMAGE1D_BUFFER
Definition: pi.h:617
@ PI_MEM_TYPE_IMAGE1D
Definition: pi.h:615
@ PI_MEM_TYPE_IMAGE1D_ARRAY
Definition: pi.h:616
@ PI_MEM_TYPE_IMAGE2D
Definition: pi.h:612
@ PI_MEM_TYPE_IMAGE2D_ARRAY
Definition: pi.h:614
@ PI_MEM_TYPE_IMAGE3D
Definition: pi.h:613
pi_result piSamplerCreate(pi_context context, const pi_sampler_properties *sampler_properties, pi_sampler *result_sampler)
Definition: pi_cuda.cpp:634
constexpr pi_usm_mem_properties PI_MEM_ALLOC_DEVICE_READ_ONLY
Definition: pi.h:809
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)
Definition: pi_cuda.cpp:814
_pi_device_binary_property_struct * pi_device_binary_property
Definition: pi.h:949
pi_result piextCommandBufferMemcpyUSM(pi_ext_command_buffer command_buffer, void *dst_ptr, const void *src_ptr, size_t size, pi_uint32 num_sync_points_in_wait_list, const pi_ext_sync_point *sync_point_wait_list, pi_ext_sync_point *sync_point)
API to append a USM memcpy command to the command-buffer.
Definition: pi_cuda.cpp:1098
_pi_sampler_info
Definition: pi.h:709
@ PI_SAMPLER_INFO_CONTEXT
Definition: pi.h:711
@ PI_SAMPLER_INFO_MIP_FILTER_MODE
Definition: pi.h:715
@ PI_SAMPLER_INFO_NORMALIZED_COORDS
Definition: pi.h:712
@ PI_SAMPLER_INFO_FILTER_MODE
Definition: pi.h:714
@ PI_SAMPLER_INFO_LOD_MIN
Definition: pi.h:716
@ PI_SAMPLER_INFO_LOD_MAX
Definition: pi.h:717
@ PI_SAMPLER_INFO_REFERENCE_COUNT
Definition: pi.h:710
@ PI_SAMPLER_INFO_ADDRESSING_MODE
Definition: pi.h:713
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)
pi_result piQueueCreate(pi_context context, pi_device device, pi_queue_properties properties, pi_queue *queue)
Definition: pi_cuda.cpp:161
pi_result piextMemUnsampledImageHandleDestroy(pi_context context, pi_device device, pi_image_handle handle)
API to destroy bindless unsampled image handles.
Definition: pi_cuda.cpp:439
pi_result piEventSetStatus(pi_event event, pi_int32 execution_status)
Definition: pi_cuda.cpp:610
pi_result piextQueueGetNativeHandle(pi_queue queue, pi_native_handle *nativeHandle, int32_t *nativeHandleDesc)
Gets the native handle of a PI queue object.
Definition: pi_cuda.cpp:190
static constexpr pi_device_fp_config PI_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT
Definition: pi.h:911
pi_result piextEnqueueCooperativeKernelLaunch(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)
Definition: pi_cuda.cpp:546
constexpr pi_map_flags PI_MAP_READ
Definition: pi.h:791
pi_result piextContextGetNativeHandle(pi_context context, pi_native_handle *nativeHandle)
Gets the native handle of a PI context object.
Definition: pi_cuda.cpp:138
pi_result piextMemMipmapFree(pi_context context, pi_device device, pi_image_mem_handle memory_handle)
API to free mipmap memory for bindless images.
Definition: pi_cuda.cpp:421
static constexpr pi_device_affinity_domain PI_DEVICE_AFFINITY_DOMAIN_L1_CACHE
Definition: pi.h:897
static constexpr pi_device_affinity_domain PI_DEVICE_AFFINITY_DOMAIN_NUMA
Definition: pi.h:889
pi_bitfield pi_memory_scope_capabilities
Definition: pi.h:762
pi_result piPluginGetLastError(char **message)
API to get Plugin specific warning and error messages.
Definition: pi_cuda.cpp:52
pi_result piProgramCreate(pi_context context, const void *il, size_t length, pi_program *res_program)
Definition: pi_cuda.cpp:248
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)
Definition: pi_cuda.cpp:749
pi_result piPluginInit(pi_plugin *plugin_info)
Definition: pi_cuda.cpp:1274
pi_result piextMemMipmapGetLevel(pi_context context, pi_device device, pi_image_mem_handle mip_mem, unsigned int level, pi_image_mem_handle *ret_mem)
API to retrieve individual image from mipmap.
Definition: pi_cuda.cpp:408
pi_result piextDeviceCreateWithNativeHandle(pi_native_handle nativeHandle, pi_platform platform, pi_device *device)
Creates PI device object from a native handle.
Definition: pi_cuda.cpp:106
pi_result piDeviceRetain(pi_device device)
Definition: pi_cuda.cpp:70
pi_result piDeviceRelease(pi_device device)
Definition: pi_cuda.cpp:74
_pi_sanitize_type
Definition: pi.h:2932
@ _PI_SANITIZE_TYPE_ADDRESS
Definition: pi.h:2934
@ _PI_SANITIZE_TYPE_THREAD
Definition: pi.h:2936
@ _PI_SANITIZE_TYPE_MEMORY
Definition: pi.h:2935
@ _PI_SANITIZE_TYPE_NONE
Definition: pi.h:2933
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)
Definition: pi_cuda.cpp:835
pi_bitfield pi_device_fp_config
Definition: pi.h:903
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.
Definition: pi_cuda.cpp:859
constexpr pi_sampler_properties PI_SAMPLER_PROPERTIES_FILTER_MODE
Definition: pi.h:750
pi_result piextCommandBufferMemBufferWrite(pi_ext_command_buffer command_buffer, pi_mem buffer, size_t offset, size_t size, const void *ptr, pi_uint32 num_sync_points_in_wait_list, const pi_ext_sync_point *sync_point_wait_list, pi_ext_sync_point *sync_point)
API to append a mem buffer write command to the command-buffer.
Definition: pi_cuda.cpp:1151
constexpr pi_mem_flags PI_MEM_FLAGS_ACCESS_RW
Definition: pi.h:782
_pi_mem_obj_access
Definition: pi.h:1925
@ PI_ACCESS_READ_WRITE
Definition: pi.h:1926
@ PI_ACCESS_READ_ONLY
Definition: pi.h:1928
@ PI_ACCESS_WRITE_ONLY
Definition: pi.h:1927
_pi_kernel_info
Definition: pi.h:530
@ PI_KERNEL_INFO_PROGRAM
Definition: pi.h:535
@ PI_KERNEL_INFO_FUNCTION_NAME
Definition: pi.h:531
@ PI_KERNEL_INFO_REFERENCE_COUNT
Definition: pi.h:533
@ PI_KERNEL_INFO_CONTEXT
Definition: pi.h:534
@ PI_KERNEL_INFO_ATTRIBUTES
Definition: pi.h:536
@ PI_KERNEL_INFO_NUM_ARGS
Definition: pi.h:532
constexpr pi_device_exec_capabilities PI_DEVICE_EXEC_CAPABILITIES_NATIVE_KERNEL
Definition: pi.h:744
constexpr pi_memory_scope_capabilities PI_MEMORY_SCOPE_DEVICE
Definition: pi.h:766
constexpr pi_sampler_properties PI_SAMPLER_PROPERTIES_CUBEMAP_FILTER_MODE
Definition: pi.h:752
_pi_command_type
Definition: pi.h:575
@ PI_COMMAND_TYPE_SVM_UNMAP
Definition: pi.h:604
@ PI_COMMAND_TYPE_MARKER
Definition: pi.h:594
@ PI_COMMAND_TYPE_COPY_IMAGE_TO_BUFFER
Definition: pi.h:592
@ PI_COMMAND_TYPE_COPY_BUFFER_TO_IMAGE
Definition: pi.h:591
@ PI_COMMAND_TYPE_RELEASE_GL_OBJECTS
Definition: pi.h:596
@ PI_COMMAND_TYPE_MIGRATE_MEM_OBJECTS
Definition: pi.h:598
@ PI_COMMAND_TYPE_IMAGE_WRITE
Definition: pi.h:588
@ PI_COMMAND_TYPE_SVM_FREE
Definition: pi.h:600
@ PI_COMMAND_TYPE_MEM_BUFFER_COPY_RECT
Definition: pi.h:584
@ PI_COMMAND_TYPE_SVM_MAP
Definition: pi.h:603
@ PI_COMMAND_TYPE_DEVICE_GLOBAL_VARIABLE_WRITE
Definition: pi.h:607
@ PI_COMMAND_TYPE_MEM_BUFFER_READ
Definition: pi.h:577
@ PI_COMMAND_TYPE_DEVICE_GLOBAL_VARIABLE_READ
Definition: pi.h:606
@ PI_COMMAND_TYPE_MEM_BUFFER_UNMAP
Definition: pi.h:581
@ PI_COMMAND_TYPE_IMAGE_READ
Definition: pi.h:587
@ PI_COMMAND_TYPE_IMAGE_COPY
Definition: pi.h:589
@ PI_COMMAND_TYPE_MEM_BUFFER_READ_RECT
Definition: pi.h:582
@ PI_COMMAND_TYPE_MEM_BUFFER_COPY
Definition: pi.h:579
@ PI_COMMAND_TYPE_MEM_BUFFER_MAP
Definition: pi.h:580
@ PI_COMMAND_TYPE_MEM_BUFFER_WRITE
Definition: pi.h:578
@ PI_COMMAND_TYPE_ACQUIRE_GL_OBJECTS
Definition: pi.h:595
@ PI_COMMAND_TYPE_BARRIER
Definition: pi.h:597
@ PI_COMMAND_TYPE_NDRANGE_KERNEL
Definition: pi.h:576
@ PI_COMMAND_TYPE_NATIVE_KERNEL
Definition: pi.h:590
@ PI_COMMAND_TYPE_MEM_BUFFER_WRITE_RECT
Definition: pi.h:583
@ PI_COMMAND_TYPE_EXT_COMMAND_BUFFER
Definition: pi.h:605
@ PI_COMMAND_TYPE_SVM_MEMFILL
Definition: pi.h:602
@ PI_COMMAND_TYPE_MEM_BUFFER_FILL
Definition: pi.h:586
@ PI_COMMAND_TYPE_USER
Definition: pi.h:585
@ PI_COMMAND_TYPE_FILL_IMAGE
Definition: pi.h:599
@ PI_COMMAND_TYPE_MAP_IMAGE
Definition: pi.h:593
@ PI_COMMAND_TYPE_SVM_MEMCPY
Definition: pi.h:601
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...
Definition: pi_cuda.cpp:1246
pi_result piextSignalExternalSemaphore(pi_queue command_queue, pi_interop_semaphore_handle sem_handle, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event)
API to instruct the queue to signal the external semaphore handle once all previous commands have com...
Definition: pi_cuda.cpp:499
pi_result piextMemReleaseInterop(pi_context context, pi_device device, pi_interop_mem_handle memory_handle)
API to destroy interop memory.
Definition: pi_cuda.cpp:472
pi_result piextPeerAccessGetInfo(pi_device command_device, pi_device peer_device, pi_peer_attr attr, size_t param_value_size, void *param_value, size_t *param_value_size_ret)
Definition: pi_cuda.cpp:1263
pi_result piextBindlessImageSamplerCreate(pi_context context, const pi_sampler_properties *sampler_properties, float min_mipmap_level_clamp, float max_mipmap_level_clamp, float max_anisotropy, pi_sampler *result_sampler)
API to create samplers for bindless images.
Definition: pi_cuda.cpp:399
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)
Definition: pi_cuda.cpp:640
static const uint8_t PI_DEVICE_BINARY_OFFLOAD_KIND_SYCL
Definition: pi.h:976
_pi_mem_alloc_info
Definition: pi.h:1980
@ PI_MEM_ALLOC_BASE_PTR
Definition: pi.h:1982
@ PI_MEM_ALLOC_TYPE
Definition: pi.h:1981
@ PI_MEM_ALLOC_DEVICE
Definition: pi.h:1984
@ PI_MEM_ALLOC_SIZE
Definition: pi.h:1983
pi_result piextCommandBufferFillUSM(pi_ext_command_buffer command_buffer, void *ptr, const void *pattern, size_t pattern_size, size_t size, pi_uint32 num_sync_points_in_wait_list, const pi_ext_sync_point *sync_point_wait_list, pi_ext_sync_point *sync_point)
API to append a USM fill command to the command-buffer.
Definition: pi_cuda.cpp:1183
pi_result piextKernelGetNativeHandle(pi_kernel kernel, pi_native_handle *nativeHandle)
Gets the native handle of a PI kernel object.
Definition: pi_cuda.cpp:566
_pi_device_local_mem_type
Definition: pi.h:308
@ PI_DEVICE_LOCAL_MEM_TYPE_GLOBAL
Definition: pi.h:310
@ PI_DEVICE_LOCAL_MEM_TYPE_LOCAL
Definition: pi.h:309
static constexpr _pi_mem_advice PI_MEM_ADVICE_HIP_UNSET_PREFERRED_LOCATION
Definition: pi.h:646
constexpr pi_memory_scope_capabilities PI_MEMORY_SCOPE_SYSTEM
Definition: pi.h:767
constexpr pi_memory_scope_capabilities PI_MEMORY_SCOPE_SUB_GROUP
Definition: pi.h:764
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)
Definition: pi_cuda.cpp:800
_pi_context_info
Definition: pi.h:501
@ PI_EXT_CONTEXT_INFO_ATOMIC_MEMORY_ORDER_CAPABILITIES
Definition: pi.h:508
@ PI_CONTEXT_INFO_PROPERTIES
Definition: pi.h:505
@ PI_CONTEXT_INFO_PLATFORM
Definition: pi.h:503
@ PI_CONTEXT_INFO_NUM_DEVICES
Definition: pi.h:504
@ PI_EXT_ONEAPI_CONTEXT_INFO_USM_MEMSET2D_SUPPORT
Definition: pi.h:514
@ PI_EXT_ONEAPI_CONTEXT_INFO_USM_MEMCPY2D_SUPPORT
Definition: pi.h:515
@ PI_EXT_CONTEXT_INFO_ATOMIC_FENCE_ORDER_CAPABILITIES
Definition: pi.h:510
@ PI_CONTEXT_INFO_DEVICES
Definition: pi.h:502
@ PI_CONTEXT_INFO_REFERENCE_COUNT
Definition: pi.h:506
@ PI_EXT_CONTEXT_INFO_ATOMIC_FENCE_SCOPE_CAPABILITIES
Definition: pi.h:511
@ PI_EXT_ONEAPI_CONTEXT_INFO_USM_FILL2D_SUPPORT
Definition: pi.h:513
@ PI_EXT_CONTEXT_INFO_ATOMIC_MEMORY_SCOPE_CAPABILITIES
Definition: pi.h:509
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.
Definition: pi_cuda.cpp:556
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)
Definition: pi_cuda.cpp:210
pi_result piextImportExternalSemaphoreOpaqueFD(pi_context context, pi_device device, int file_descriptor, pi_interop_semaphore_handle *ret_handle)
API to import an external semaphore in the form of a file descriptor.
Definition: pi_cuda.cpp:478
_pi_sampler_filter_mode
Definition: pi.h:728
@ PI_SAMPLER_FILTER_MODE_NEAREST
Definition: pi.h:729
@ PI_SAMPLER_FILTER_MODE_LINEAR
Definition: pi.h:730
static const uint16_t PI_DEVICE_BINARIES_VERSION
Definition: pi.h:1139
pi_result piEventRelease(pi_event event)
Definition: pi_cuda.cpp:616
pi_result piPluginGetBackendOption(pi_platform platform, const char *frontend_option, const char **backend_option)
API to get backend specific option.
Definition: pi_cuda.cpp:56
static constexpr pi_device_exec_capabilities PI_EXEC_NATIVE_KERNEL
Definition: pi.h:917
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)
Definition: pi_cuda.cpp:172
pi_result piextCommandBufferAdviseUSM(pi_ext_command_buffer command_buffer, const void *ptr, size_t length, pi_mem_advice advice, pi_uint32 num_sync_points_in_wait_list, const pi_ext_sync_point *sync_point_wait_list, pi_ext_sync_point *sync_point)
API to append a USM Advise command to the command-buffer.
Definition: pi_cuda.cpp:1203
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.
Definition: pi_cuda.cpp:965
pi_result piContextRelease(pi_context context)
Definition: pi_cuda.cpp:157
_pi_event_status
Definition: pi.h:241
@ PI_EVENT_SUBMITTED
Definition: pi.h:244
@ PI_EVENT_QUEUED
Definition: pi.h:245
@ PI_EVENT_COMPLETE
Definition: pi.h:242
@ PI_EVENT_RUNNING
Definition: pi.h:243
pi_result piextCommandBufferRetain(pi_ext_command_buffer command_buffer)
API to increment the reference count of the command-buffer.
Definition: pi_cuda.cpp:1074
constexpr pi_mem_properties PI_MEM_PROPERTIES_ALLOC_BUFFER_LOCATION
Definition: pi.h:798
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)
Definition: pi_cuda.cpp:823
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.
Definition: pi_cuda.cpp:253
pi_result piextProgramGetNativeHandle(pi_program program, pi_native_handle *nativeHandle)
Gets the native handle of a PI program object.
Definition: pi_cuda.cpp:328
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.
Definition: pi_cuda.cpp:868
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.
Definition: pi_cuda.cpp:912
pi_result piextMemImageGetInfo(const pi_image_mem_handle mem_handle, pi_image_info param_name, void *param_value, size_t *param_value_size_ret)
API to query an image memory handle for specific properties.
Definition: pi_cuda.cpp:449
static constexpr pi_device_fp_config PI_FP_ROUND_TO_ZERO
Definition: pi.h:907
void * pi_image_mem_handle
Definition: pi.h:1180
static constexpr pi_device_fp_config PI_FP_FMA
Definition: pi.h:909
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)
Definition: pi_cuda.cpp:685
pi_result piextMemSampledImageCreate(pi_context context, pi_device device, pi_image_mem_handle img_mem, pi_image_format *image_format, pi_image_desc *image_desc, pi_sampler sampler, pi_image_handle *ret_handle)
API to create sampled bindless image handles.
Definition: pi_cuda.cpp:391
_pi_sampler_addressing_mode
Definition: pi.h:720
@ PI_SAMPLER_ADDRESSING_MODE_MIRRORED_REPEAT
Definition: pi.h:721
@ PI_SAMPLER_ADDRESSING_MODE_CLAMP
Definition: pi.h:724
@ PI_SAMPLER_ADDRESSING_MODE_NONE
Definition: pi.h:725
@ PI_SAMPLER_ADDRESSING_MODE_REPEAT
Definition: pi.h:722
@ PI_SAMPLER_ADDRESSING_MODE_CLAMP_TO_EDGE
Definition: pi.h:723
_pi_platform_backend
Definition: pi.h:292
@ PI_EXT_PLATFORM_BACKEND_OPENCL
The backend is OpenCL.
Definition: pi.h:295
@ PI_EXT_PLATFORM_BACKEND_NATIVE_CPU
The backend is NATIVE_CPU.
Definition: pi.h:299
@ PI_EXT_PLATFORM_BACKEND_UNKNOWN
The backend is not a recognized one.
Definition: pi.h:293
@ PI_EXT_PLATFORM_BACKEND_LEVEL_ZERO
The backend is Level Zero.
Definition: pi.h:294
@ PI_EXT_PLATFORM_BACKEND_ESIMD
The backend is ESIMD.
Definition: pi.h:298
@ PI_EXT_PLATFORM_BACKEND_HIP
The backend is HIP.
Definition: pi.h:297
@ PI_EXT_PLATFORM_BACKEND_CUDA
The backend is CUDA.
Definition: pi.h:296
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.
Definition: pi_cuda.cpp:899
_pi_program_info
Definition: pi.h:489
@ PI_PROGRAM_INFO_NUM_DEVICES
Definition: pi.h:492
@ PI_PROGRAM_INFO_SOURCE
Definition: pi.h:494
@ PI_PROGRAM_INFO_BINARY_SIZES
Definition: pi.h:495
@ PI_PROGRAM_INFO_KERNEL_NAMES
Definition: pi.h:498
@ PI_PROGRAM_INFO_CONTEXT
Definition: pi.h:491
@ PI_PROGRAM_INFO_REFERENCE_COUNT
Definition: pi.h:490
@ PI_PROGRAM_INFO_BINARIES
Definition: pi.h:496
@ PI_PROGRAM_INFO_NUM_KERNELS
Definition: pi.h:497
@ PI_PROGRAM_INFO_DEVICES
Definition: pi.h:493
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)
Definition: pi_cuda.cpp:366
static constexpr _pi_mem_advice PI_MEM_ADVICE_HIP_SET_PREFERRED_LOCATION
Definition: pi.h:644
intptr_t pi_device_partition_property
Definition: pi.h:875
pi_result piextMemUnsampledImageCreate(pi_context context, pi_device device, pi_image_mem_handle img_mem, pi_image_format *image_format, pi_image_desc *image_desc, pi_image_handle *ret_handle)
API to create bindless image handles.
Definition: pi_cuda.cpp:383
static constexpr pi_device_exec_capabilities PI_EXEC_KERNEL
Definition: pi.h:916
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)
Definition: pi_cuda.cpp:507
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...
Definition: pi_cuda.cpp:976
pi_result piextCommandBufferUpdateKernelLaunch(pi_ext_command_buffer_command command, pi_ext_command_buffer_update_kernel_launch_desc *desc)
API to update a kernel launch command inside of a command-buffer.
Definition: pi_cuda.cpp:1221
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)
Definition: pi_cuda.cpp:35
constexpr pi_sampler_properties PI_SAMPLER_PROPERTIES_MIP_FILTER_MODE
Definition: pi.h:751
pi_result piextMemCreateWithNativeHandle(pi_native_handle nativeHandle, pi_context context, bool ownNativeHandle, pi_mem *mem)
Creates PI mem object from a native handle.
Definition: pi_cuda.cpp:241
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.
Definition: pi_cuda.cpp:843
pi_result piextQueueCreateWithNativeHandle(pi_native_handle nativeHandle, int32_t nativeHandleDesc, pi_context context, pi_device device, bool pluginOwnsNativeHandle, pi_queue_properties *Properties, pi_queue *queue)
Creates PI queue object from a native handle.
Definition: pi_cuda.cpp:198
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)
Definition: pi_cuda.cpp:124
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.
Definition: pi_cuda.cpp:93
constexpr pi_device_exec_capabilities PI_DEVICE_EXEC_CAPABILITIES_KERNEL
Definition: pi.h:741
constexpr pi_memory_order_capabilities PI_MEMORY_ORDER_SEQ_CST
Definition: pi.h:760
pi_ext_structure_type
Definition: pi.h:2376
@ PI_EXT_STRUCTURE_TYPE_COMMAND_BUFFER_DESC
Definition: pi.h:2377
static constexpr pi_device_fp_config PI_FP_INF_NAN
Definition: pi.h:905
_pi_mem_info
Definition: pi.h:1205
@ PI_MEM_SIZE
Definition: pi.h:1205
@ PI_MEM_CONTEXT
Definition: pi.h:1205
pi_result piQueueRetain(pi_queue command_queue)
Definition: pi_cuda.cpp:180
pi_result piextMemImageCreateWithNativeHandle(pi_native_handle nativeHandle, pi_context context, bool ownNativeHandle, const pi_image_format *ImageFormat, const pi_image_desc *ImageDesc, pi_mem *img)
Creates PI image object from a native handle.
Definition: pi_cuda.cpp:264
pi_result piextUSMPitchedAlloc(void **result_ptr, size_t *result_pitch, pi_context context, pi_device device, pi_usm_mem_properties *properties, size_t width_in_bytes, size_t height, unsigned int element_size_bytes)
Allocates memory accessible on device.
Definition: pi_cuda.cpp:877
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.
Definition: pi_cuda.cpp:1001
_pi_program_binary_type
Definition: pi.h:271
@ PI_PROGRAM_BINARY_TYPE_LIBRARY
Definition: pi.h:274
@ PI_PROGRAM_BINARY_TYPE_EXECUTABLE
Definition: pi.h:275
@ PI_PROGRAM_BINARY_TYPE_COMPILED_OBJECT
Definition: pi.h:273
@ PI_PROGRAM_BINARY_TYPE_NONE
Definition: pi.h:272
pi_uint64 pi_interop_semaphore_handle
Definition: pi.h:1182
_pi_peer_attr
Definition: pi.h:1207
@ PI_PEER_ACCESS_SUPPORTED
returns a uint32_t: 1 if P2P Access is supported otherwise P2P Access is not supported.
Definition: pi.h:1208
@ PI_PEER_ATOMICS_SUPPORTED
returns a uint32_t: 1 if Atomic operations are supported over the P2P link, otherwise such operations...
Definition: pi.h:1211
pi_result piextContextSetExtendedDeleter(pi_context context, pi_context_extended_deleter func, void *user_data)
Definition: pi_cuda.cpp:132
pi_result piextCommandBufferMemBufferWriteRect(pi_ext_command_buffer command_buffer, pi_mem buffer, 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_sync_points_in_wait_list, const pi_ext_sync_point *sync_point_wait_list, pi_ext_sync_point *sync_point)
API to append a rectangular mem buffer write command to the command-buffer.
Definition: pi_cuda.cpp:1160
static constexpr pi_device_binary_type PI_DEVICE_BINARY_TYPE_NONE
Definition: pi.h:963
pi_result piextCommandBufferPrefetchUSM(pi_ext_command_buffer command_buffer, const void *ptr, size_t size, pi_usm_migration_flags flags, pi_uint32 num_sync_points_in_wait_list, const pi_ext_sync_point *sync_point_wait_list, pi_ext_sync_point *sync_point)
API to append a USM Prefetch command to the command-buffer.
Definition: pi_cuda.cpp:1194
pi_bitfield pi_device_affinity_domain
Definition: pi.h:888
pi_result piSamplerRelease(pi_sampler sampler)
Definition: pi_cuda.cpp:652
pi_result piextCommandBufferReleaseCommand(pi_ext_command_buffer_command command)
API to decrement the reference count of a command-buffer command.
Definition: pi_cuda.cpp:1233
pi_uint64 pi_interop_mem_handle
Definition: pi.h:1181
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)
Definition: pi_cuda.cpp:85
pi_bitfield pi_memory_order_capabilities
Definition: pi.h:755
_pi_mem_obj_property_type
Definition: pi.h:1933
@ PI_ENUM_FORCE_UINT32
Definition: pi.h:1935
@ PI_KERNEL_ARG_MEM_OBJ_ACCESS
Definition: pi.h:1934
pi_result piextKernelSetArgMemObj(pi_kernel kernel, pi_uint32 arg_index, const pi_mem_obj_property *arg_properties, const pi_mem *arg_value)
Definition: pi_cuda.cpp:353
pi_result piEventRetain(pi_event event)
Definition: pi_cuda.cpp:614
constexpr pi_mem_properties PI_MEM_PROPERTIES_CHANNEL
Definition: pi.h:797
_pi_program_build_info
Definition: pi.h:257
@ PI_PROGRAM_BUILD_INFO_LOG
Definition: pi.h:260
@ PI_PROGRAM_BUILD_INFO_OPTIONS
Definition: pi.h:259
@ PI_PROGRAM_BUILD_INFO_BINARY_TYPE
Definition: pi.h:261
@ PI_PROGRAM_BUILD_INFO_STATUS
Definition: pi.h:258
pi_result piextCommandBufferCreate(pi_context context, pi_device device, const pi_ext_command_buffer_desc *desc, pi_ext_command_buffer *ret_command_buffer)
API to create a command-buffer.
Definition: pi_cuda.cpp:1067
pi_device_binary_property PropertiesBegin
Definition: pi.h:954
pi_device_binary_property PropertiesEnd
Definition: pi.h:955
size_t image_slice_pitch
Definition: pi.h:1196
pi_uint32 num_mip_levels
Definition: pi.h:1197
size_t image_height
Definition: pi.h:1192
size_t image_row_pitch
Definition: pi.h:1195
pi_uint32 num_samples
Definition: pi.h:1198
size_t image_depth
Definition: pi.h:1193
pi_mem buffer
Definition: pi.h:1199
size_t image_width
Definition: pi.h:1191
pi_mem_type image_type
Definition: pi.h:1190
size_t image_array_size
Definition: pi.h:1194
pi_image_channel_type image_channel_data_type
Definition: pi.h:1186
pi_image_channel_order image_channel_order
Definition: pi.h:1185
pi_mem_obj_property_type type
Definition: pi.h:1940
pi_mem_access_flag mem_access
Definition: pi.h:1942
void * pNext
Definition: pi.h:1941
Definition: pi.h:920
char * name
Definition: pi.h:922
size_t size
Definition: pi.h:923
int32_t reserved
Definition: pi.h:925
int32_t flags
Definition: pi.h:924
void * addr
Definition: pi.h:921
char PluginVersion[20]
Definition: pi.h:2949
_pi_sanitize_type SanitizeType
Definition: pi.h:2956
struct _pi_plugin::FunctionPointers PiFunctionTable
char PiVersion[20]
Definition: pi.h:2947
char * Targets
Definition: pi.h:2950
This struct is a record of all the device code that may be offloaded.
Definition: pi.h:1144
uint16_t Version
version of this structure - for backward compatibility; all modifications which change order/type/off...
Definition: pi.h:1148
uint16_t NumDeviceBinaries
Number of device binaries in this descriptor.
Definition: pi.h:1150
pi_device_binary DeviceBinaries
Device binaries data.
Definition: pi.h:1152
_pi_offload_entry * HostEntriesEnd
Definition: pi.h:1155
_pi_offload_entry * HostEntriesBegin
the offload entry table (not used, for compatibility with OpenMP)
Definition: pi.h:1154
This struct is a record of the device binary information.
Definition: pi.h:1047
_pi_offload_entry EntriesEnd
Definition: pi.h:1084
const char * LinkOptions
a null-terminated string; target- and compiler-specific options which are suggested to use to "link" ...
Definition: pi.h:1073
_pi_offload_entry EntriesBegin
the offload entry table
Definition: pi.h:1083
const char * CompileOptions
a null-terminated string; target- and compiler-specific options which are suggested to use to "compil...
Definition: pi.h:1070
const unsigned char * BinaryEnd
Pointer to the target code end.
Definition: pi.h:1081
const char * ManifestStart
Pointer to the manifest data start.
Definition: pi.h:1075
uint16_t Version
version of this structure - for backward compatibility; all modifications which change order/type/off...
Definition: pi.h:1051
const char * DeviceTargetSpec
null-terminated string representation of the device's target architecture which holds one of: __SYCL_...
Definition: pi.h:1067
pi_device_binary_property_set PropertySetsEnd
Definition: pi.h:1088
pi_device_binary_property_set PropertySetsBegin
Definition: pi.h:1087
uint8_t Format
format of the binary data - SPIR-V, LLVM IR bitcode,...
Definition: pi.h:1055
const char * ManifestEnd
Pointer to the manifest data end.
Definition: pi.h:1077
uint8_t Kind
the type of offload model the binary employs; must be 4 for SYCL
Definition: pi.h:1053
const unsigned char * BinaryStart
Pointer to the target code start.
Definition: pi.h:1079
pi_bool enable_profiling
Definition: pi.h:2384
pi_ext_structure_type stype
Definition: pi.h:2381
const void * pNext
Definition: pi.h:2382
pi_ext_command_buffer_update_pointer_arg_desc_t * ptr_arg_list
Definition: pi.h:2413
pi_ext_command_buffer_update_memobj_arg_desc_t * mem_obj_arg_list
Definition: pi.h:2412
pi_ext_command_buffer_update_value_arg_desc_t * value_arg_list
Definition: pi.h:2414
const pi_mem_obj_property * properties
Definition: pi.h:2391