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 //
49 #include "CL/cl.h"
50 #define _PI_H_VERSION_MAJOR 8
51 #define _PI_H_VERSION_MINOR 10
52 
53 #define _PI_STRING_HELPER(a) #a
54 #define _PI_CONCAT(a, b) _PI_STRING_HELPER(a.b)
55 #define _PI_H_VERSION_STRING \
56  _PI_CONCAT(_PI_H_VERSION_MAJOR, _PI_H_VERSION_MINOR)
57 
58 // TODO: we need a mapping of PI to OpenCL somewhere, and this can be done
59 // elsewhere, e.g. in the pi_opencl, but constants/enums mapping is now
60 // done here, for efficiency and simplicity.
61 #include <CL/cl_ext.h>
62 #include <CL/sycl/detail/cl.h>
64 
65 #include <cstdint>
66 
67 #ifdef __cplusplus
68 extern "C" {
69 #endif // __cplusplus
70 
71 using pi_int32 = int32_t;
72 using pi_uint32 = uint32_t;
73 using pi_uint64 = uint64_t;
76 using pi_native_handle = uintptr_t;
77 
78 //
79 // NOTE: prefer to map 1:1 to OpenCL so that no translation is needed
80 // for PI <-> OpenCL ways. The PI <-> to other BE translation is almost
81 // always needed anyway.
82 //
83 // TODO: populate PI enums.
84 //
85 typedef enum {
86  PI_SUCCESS = CL_SUCCESS,
87  PI_INVALID_KERNEL_NAME = CL_INVALID_KERNEL_NAME,
88  PI_INVALID_OPERATION = CL_INVALID_OPERATION,
89  PI_INVALID_KERNEL = CL_INVALID_KERNEL,
90  PI_INVALID_QUEUE_PROPERTIES = CL_INVALID_QUEUE_PROPERTIES,
91  PI_INVALID_VALUE = CL_INVALID_VALUE,
92  PI_INVALID_CONTEXT = CL_INVALID_CONTEXT,
93  PI_INVALID_PLATFORM = CL_INVALID_PLATFORM,
94  PI_INVALID_DEVICE = CL_INVALID_DEVICE,
95  PI_INVALID_BINARY = CL_INVALID_BINARY,
96  PI_INVALID_QUEUE = CL_INVALID_COMMAND_QUEUE,
97  PI_OUT_OF_HOST_MEMORY = CL_OUT_OF_HOST_MEMORY,
98  PI_INVALID_PROGRAM = CL_INVALID_PROGRAM,
99  PI_INVALID_PROGRAM_EXECUTABLE = CL_INVALID_PROGRAM_EXECUTABLE,
100  PI_INVALID_SAMPLER = CL_INVALID_SAMPLER,
101  PI_INVALID_BUFFER_SIZE = CL_INVALID_BUFFER_SIZE,
102  PI_INVALID_MEM_OBJECT = CL_INVALID_MEM_OBJECT,
103  PI_OUT_OF_RESOURCES = CL_OUT_OF_RESOURCES,
104  PI_INVALID_EVENT = CL_INVALID_EVENT,
105  PI_INVALID_EVENT_WAIT_LIST = CL_INVALID_EVENT_WAIT_LIST,
106  PI_MISALIGNED_SUB_BUFFER_OFFSET = CL_MISALIGNED_SUB_BUFFER_OFFSET,
107  PI_BUILD_PROGRAM_FAILURE = CL_BUILD_PROGRAM_FAILURE,
108  PI_INVALID_WORK_GROUP_SIZE = CL_INVALID_WORK_GROUP_SIZE,
109  PI_COMPILER_NOT_AVAILABLE = CL_COMPILER_NOT_AVAILABLE,
110  PI_PROFILING_INFO_NOT_AVAILABLE = CL_PROFILING_INFO_NOT_AVAILABLE,
111  PI_DEVICE_NOT_FOUND = CL_DEVICE_NOT_FOUND,
112  PI_INVALID_WORK_ITEM_SIZE = CL_INVALID_WORK_ITEM_SIZE,
113  PI_INVALID_WORK_DIMENSION = CL_INVALID_WORK_DIMENSION,
114  PI_INVALID_KERNEL_ARGS = CL_INVALID_KERNEL_ARGS,
115  PI_INVALID_IMAGE_SIZE = CL_INVALID_IMAGE_SIZE,
116  PI_INVALID_ARG_VALUE = CL_INVALID_ARG_VALUE,
117  PI_INVALID_IMAGE_FORMAT_DESCRIPTOR = CL_INVALID_IMAGE_FORMAT_DESCRIPTOR,
118  PI_IMAGE_FORMAT_NOT_SUPPORTED = CL_IMAGE_FORMAT_NOT_SUPPORTED,
119  PI_MEM_OBJECT_ALLOCATION_FAILURE = CL_MEM_OBJECT_ALLOCATION_FAILURE,
120  PI_LINK_PROGRAM_FAILURE = CL_LINK_PROGRAM_FAILURE,
125  -997,
128  -998,
129  PI_ERROR_UNKNOWN = -999
132 } _pi_result;
133 
134 typedef enum {
135  PI_EVENT_COMPLETE = CL_COMPLETE,
136  PI_EVENT_RUNNING = CL_RUNNING,
137  PI_EVENT_SUBMITTED = CL_SUBMITTED,
138  PI_EVENT_QUEUED = CL_QUEUED
140 
141 typedef enum {
142  PI_PLATFORM_INFO_EXTENSIONS = CL_PLATFORM_EXTENSIONS,
143  PI_PLATFORM_INFO_NAME = CL_PLATFORM_NAME,
144  PI_PLATFORM_INFO_PROFILE = CL_PLATFORM_PROFILE,
145  PI_PLATFORM_INFO_VENDOR = CL_PLATFORM_VENDOR,
146  PI_PLATFORM_INFO_VERSION = CL_PLATFORM_VERSION
148 
149 typedef enum {
150  PI_PROGRAM_BUILD_INFO_STATUS = CL_PROGRAM_BUILD_STATUS,
151  PI_PROGRAM_BUILD_INFO_OPTIONS = CL_PROGRAM_BUILD_OPTIONS,
152  PI_PROGRAM_BUILD_INFO_LOG = CL_PROGRAM_BUILD_LOG,
153  PI_PROGRAM_BUILD_INFO_BINARY_TYPE = CL_PROGRAM_BINARY_TYPE
155 
156 typedef enum {
160  PI_PROGRAM_BUILD_STATUS_IN_PROGRESS = CL_BUILD_IN_PROGRESS
162 
163 typedef enum {
164  PI_PROGRAM_BINARY_TYPE_NONE = CL_PROGRAM_BINARY_TYPE_NONE,
166  CL_PROGRAM_BINARY_TYPE_COMPILED_OBJECT,
167  PI_PROGRAM_BINARY_TYPE_LIBRARY = CL_PROGRAM_BINARY_TYPE_LIBRARY,
168  PI_PROGRAM_BINARY_TYPE_EXECUTABLE = CL_PROGRAM_BINARY_TYPE_EXECUTABLE
170 
171 // NOTE: this is made 64-bit to match the size of cl_device_type to
172 // make the translation to OpenCL transparent.
173 //
174 typedef enum : pi_uint64 {
176  CL_DEVICE_TYPE_DEFAULT,
179  CL_DEVICE_TYPE_ALL,
181  CL_DEVICE_TYPE_CPU,
182  PI_DEVICE_TYPE_GPU = CL_DEVICE_TYPE_GPU,
183  PI_DEVICE_TYPE_ACC = CL_DEVICE_TYPE_ACCELERATOR
186 
187 typedef enum {
192 
193 typedef enum {
197 
198 typedef enum {
199  PI_DEVICE_INFO_TYPE = CL_DEVICE_TYPE,
200  PI_DEVICE_INFO_VENDOR_ID = CL_DEVICE_VENDOR_ID,
201  PI_DEVICE_INFO_MAX_COMPUTE_UNITS = CL_DEVICE_MAX_COMPUTE_UNITS,
202  PI_DEVICE_INFO_MAX_WORK_ITEM_DIMENSIONS = CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS,
203  PI_DEVICE_INFO_MAX_WORK_ITEM_SIZES = CL_DEVICE_MAX_WORK_ITEM_SIZES,
204  PI_DEVICE_INFO_MAX_WORK_GROUP_SIZE = CL_DEVICE_MAX_WORK_GROUP_SIZE,
205  PI_DEVICE_INFO_SINGLE_FP_CONFIG = CL_DEVICE_SINGLE_FP_CONFIG,
206  PI_DEVICE_INFO_HALF_FP_CONFIG = CL_DEVICE_HALF_FP_CONFIG,
207  PI_DEVICE_INFO_DOUBLE_FP_CONFIG = CL_DEVICE_DOUBLE_FP_CONFIG,
208  PI_DEVICE_INFO_QUEUE_PROPERTIES = CL_DEVICE_QUEUE_PROPERTIES,
210  CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR,
212  CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT,
214  CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT,
216  CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG,
218  CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT,
220  CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE,
222  CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF,
223  PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_CHAR = CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR,
225  CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT,
226  PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_INT = CL_DEVICE_NATIVE_VECTOR_WIDTH_INT,
227  PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG = CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG,
229  CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT,
231  CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE,
232  PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_HALF = CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF,
233  PI_DEVICE_INFO_MAX_CLOCK_FREQUENCY = CL_DEVICE_MAX_CLOCK_FREQUENCY,
234  PI_DEVICE_INFO_ADDRESS_BITS = CL_DEVICE_ADDRESS_BITS,
235  PI_DEVICE_INFO_MAX_MEM_ALLOC_SIZE = CL_DEVICE_MAX_MEM_ALLOC_SIZE,
236  PI_DEVICE_INFO_IMAGE_SUPPORT = CL_DEVICE_IMAGE_SUPPORT,
237  PI_DEVICE_INFO_MAX_READ_IMAGE_ARGS = CL_DEVICE_MAX_READ_IMAGE_ARGS,
238  PI_DEVICE_INFO_MAX_WRITE_IMAGE_ARGS = CL_DEVICE_MAX_WRITE_IMAGE_ARGS,
239  PI_DEVICE_INFO_IMAGE2D_MAX_WIDTH = CL_DEVICE_IMAGE2D_MAX_WIDTH,
240  PI_DEVICE_INFO_IMAGE2D_MAX_HEIGHT = CL_DEVICE_IMAGE2D_MAX_HEIGHT,
241  PI_DEVICE_INFO_IMAGE3D_MAX_WIDTH = CL_DEVICE_IMAGE3D_MAX_WIDTH,
242  PI_DEVICE_INFO_IMAGE3D_MAX_HEIGHT = CL_DEVICE_IMAGE3D_MAX_HEIGHT,
243  PI_DEVICE_INFO_IMAGE3D_MAX_DEPTH = CL_DEVICE_IMAGE3D_MAX_DEPTH,
244  PI_DEVICE_INFO_IMAGE_MAX_BUFFER_SIZE = CL_DEVICE_IMAGE_MAX_BUFFER_SIZE,
245  PI_DEVICE_INFO_IMAGE_MAX_ARRAY_SIZE = CL_DEVICE_IMAGE_MAX_ARRAY_SIZE,
246  PI_DEVICE_INFO_MAX_SAMPLERS = CL_DEVICE_MAX_SAMPLERS,
247  PI_DEVICE_INFO_MAX_PARAMETER_SIZE = CL_DEVICE_MAX_PARAMETER_SIZE,
248  PI_DEVICE_INFO_MEM_BASE_ADDR_ALIGN = CL_DEVICE_MEM_BASE_ADDR_ALIGN,
249  PI_DEVICE_INFO_GLOBAL_MEM_CACHE_TYPE = CL_DEVICE_GLOBAL_MEM_CACHE_TYPE,
251  CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE,
252  PI_DEVICE_INFO_GLOBAL_MEM_CACHE_SIZE = CL_DEVICE_GLOBAL_MEM_CACHE_SIZE,
253  PI_DEVICE_INFO_GLOBAL_MEM_SIZE = CL_DEVICE_GLOBAL_MEM_SIZE,
254  PI_DEVICE_INFO_MAX_CONSTANT_BUFFER_SIZE = CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE,
255  PI_DEVICE_INFO_MAX_CONSTANT_ARGS = CL_DEVICE_MAX_CONSTANT_ARGS,
256  PI_DEVICE_INFO_LOCAL_MEM_TYPE = CL_DEVICE_LOCAL_MEM_TYPE,
257  PI_DEVICE_INFO_LOCAL_MEM_SIZE = CL_DEVICE_LOCAL_MEM_SIZE,
258  PI_DEVICE_INFO_ERROR_CORRECTION_SUPPORT = CL_DEVICE_ERROR_CORRECTION_SUPPORT,
259  PI_DEVICE_INFO_HOST_UNIFIED_MEMORY = CL_DEVICE_HOST_UNIFIED_MEMORY,
261  CL_DEVICE_PROFILING_TIMER_RESOLUTION,
262  PI_DEVICE_INFO_ENDIAN_LITTLE = CL_DEVICE_ENDIAN_LITTLE,
263  PI_DEVICE_INFO_AVAILABLE = CL_DEVICE_AVAILABLE,
264  PI_DEVICE_INFO_COMPILER_AVAILABLE = CL_DEVICE_COMPILER_AVAILABLE,
265  PI_DEVICE_INFO_LINKER_AVAILABLE = CL_DEVICE_LINKER_AVAILABLE,
266  PI_DEVICE_INFO_EXECUTION_CAPABILITIES = CL_DEVICE_EXECUTION_CAPABILITIES,
268  CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES,
269  PI_DEVICE_INFO_QUEUE_ON_HOST_PROPERTIES = CL_DEVICE_QUEUE_ON_HOST_PROPERTIES,
270  PI_DEVICE_INFO_BUILT_IN_KERNELS = CL_DEVICE_BUILT_IN_KERNELS,
271  PI_DEVICE_INFO_PLATFORM = CL_DEVICE_PLATFORM,
272  PI_DEVICE_INFO_REFERENCE_COUNT = CL_DEVICE_REFERENCE_COUNT,
273  PI_DEVICE_INFO_IL_VERSION = CL_DEVICE_IL_VERSION_KHR,
274  PI_DEVICE_INFO_NAME = CL_DEVICE_NAME,
275  PI_DEVICE_INFO_VENDOR = CL_DEVICE_VENDOR,
276  PI_DEVICE_INFO_DRIVER_VERSION = CL_DRIVER_VERSION,
277  PI_DEVICE_INFO_PROFILE = CL_DEVICE_PROFILE,
278  PI_DEVICE_INFO_VERSION = CL_DEVICE_VERSION,
279  PI_DEVICE_INFO_OPENCL_C_VERSION = CL_DEVICE_OPENCL_C_VERSION,
280  PI_DEVICE_INFO_EXTENSIONS = CL_DEVICE_EXTENSIONS,
281  PI_DEVICE_INFO_PRINTF_BUFFER_SIZE = CL_DEVICE_PRINTF_BUFFER_SIZE,
283  CL_DEVICE_PREFERRED_INTEROP_USER_SYNC,
284  PI_DEVICE_INFO_PARENT_DEVICE = CL_DEVICE_PARENT_DEVICE,
285  PI_DEVICE_INFO_PARTITION_PROPERTIES = CL_DEVICE_PARTITION_PROPERTIES,
287  CL_DEVICE_PARTITION_MAX_SUB_DEVICES,
289  CL_DEVICE_PARTITION_AFFINITY_DOMAIN,
290  PI_DEVICE_INFO_PARTITION_TYPE = CL_DEVICE_PARTITION_TYPE,
291  PI_DEVICE_INFO_MAX_NUM_SUB_GROUPS = CL_DEVICE_MAX_NUM_SUB_GROUPS,
293  CL_DEVICE_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS,
294  PI_DEVICE_INFO_SUB_GROUP_SIZES_INTEL = CL_DEVICE_SUB_GROUP_SIZES_INTEL,
295  PI_DEVICE_INFO_USM_HOST_SUPPORT = CL_DEVICE_HOST_MEM_CAPABILITIES_INTEL,
296  PI_DEVICE_INFO_USM_DEVICE_SUPPORT = CL_DEVICE_DEVICE_MEM_CAPABILITIES_INTEL,
298  CL_DEVICE_SINGLE_DEVICE_SHARED_MEM_CAPABILITIES_INTEL,
300  CL_DEVICE_CROSS_DEVICE_SHARED_MEM_CAPABILITIES_INTEL,
302  CL_DEVICE_SHARED_SYSTEM_MEM_CAPABILITIES_INTEL,
303  // Intel UUID extension.
304  PI_DEVICE_INFO_UUID = CL_DEVICE_UUID_KHR,
305  // These are Intel-specific extensions.
314  // Return true if sub-device should do its own program build
327 
328 typedef enum {
329  PI_PROGRAM_INFO_REFERENCE_COUNT = CL_PROGRAM_REFERENCE_COUNT,
330  PI_PROGRAM_INFO_CONTEXT = CL_PROGRAM_CONTEXT,
331  PI_PROGRAM_INFO_NUM_DEVICES = CL_PROGRAM_NUM_DEVICES,
332  PI_PROGRAM_INFO_DEVICES = CL_PROGRAM_DEVICES,
333  PI_PROGRAM_INFO_SOURCE = CL_PROGRAM_SOURCE,
334  PI_PROGRAM_INFO_BINARY_SIZES = CL_PROGRAM_BINARY_SIZES,
335  PI_PROGRAM_INFO_BINARIES = CL_PROGRAM_BINARIES,
336  PI_PROGRAM_INFO_NUM_KERNELS = CL_PROGRAM_NUM_KERNELS,
337  PI_PROGRAM_INFO_KERNEL_NAMES = CL_PROGRAM_KERNEL_NAMES
339 
340 typedef enum {
341  PI_CONTEXT_INFO_DEVICES = CL_CONTEXT_DEVICES,
342  PI_CONTEXT_INFO_NUM_DEVICES = CL_CONTEXT_NUM_DEVICES,
343  PI_CONTEXT_INFO_PROPERTIES = CL_CONTEXT_PROPERTIES,
344  PI_CONTEXT_INFO_REFERENCE_COUNT = CL_CONTEXT_REFERENCE_COUNT,
345  // Atomics capabilities extensions
349 
350 typedef enum {
351  PI_QUEUE_INFO_CONTEXT = CL_QUEUE_CONTEXT,
352  PI_QUEUE_INFO_DEVICE = CL_QUEUE_DEVICE,
353  PI_QUEUE_INFO_DEVICE_DEFAULT = CL_QUEUE_DEVICE_DEFAULT,
354  PI_QUEUE_INFO_PROPERTIES = CL_QUEUE_PROPERTIES,
355  PI_QUEUE_INFO_REFERENCE_COUNT = CL_QUEUE_REFERENCE_COUNT,
356  PI_QUEUE_INFO_SIZE = CL_QUEUE_SIZE
358 
359 typedef enum {
360  PI_KERNEL_INFO_FUNCTION_NAME = CL_KERNEL_FUNCTION_NAME,
361  PI_KERNEL_INFO_NUM_ARGS = CL_KERNEL_NUM_ARGS,
362  PI_KERNEL_INFO_REFERENCE_COUNT = CL_KERNEL_REFERENCE_COUNT,
363  PI_KERNEL_INFO_CONTEXT = CL_KERNEL_CONTEXT,
364  PI_KERNEL_INFO_PROGRAM = CL_KERNEL_PROGRAM,
365  PI_KERNEL_INFO_ATTRIBUTES = CL_KERNEL_ATTRIBUTES
367 
368 typedef enum {
369  PI_KERNEL_GROUP_INFO_GLOBAL_WORK_SIZE = CL_KERNEL_GLOBAL_WORK_SIZE,
370  PI_KERNEL_GROUP_INFO_WORK_GROUP_SIZE = CL_KERNEL_WORK_GROUP_SIZE,
372  CL_KERNEL_COMPILE_WORK_GROUP_SIZE,
373  PI_KERNEL_GROUP_INFO_LOCAL_MEM_SIZE = CL_KERNEL_LOCAL_MEM_SIZE,
375  CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE,
376  PI_KERNEL_GROUP_INFO_PRIVATE_MEM_SIZE = CL_KERNEL_PRIVATE_MEM_SIZE,
377  // The number of registers used by the compiled kernel (device specific)
380 
381 typedef enum {
382  PI_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT = CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT,
383  PI_FP_ROUND_TO_NEAREST = CL_FP_ROUND_TO_NEAREST,
384  PI_FP_ROUND_TO_ZERO = CL_FP_ROUND_TO_ZERO,
385  PI_FP_ROUND_TO_INF = CL_FP_ROUND_TO_INF,
386  PI_FP_INF_NAN = CL_FP_INF_NAN,
387  PI_FP_DENORM = CL_FP_DENORM,
388  PI_FP_FMA = CL_FP_FMA
390 
391 typedef enum {
392  PI_IMAGE_INFO_FORMAT = CL_IMAGE_FORMAT,
393  PI_IMAGE_INFO_ELEMENT_SIZE = CL_IMAGE_ELEMENT_SIZE,
394  PI_IMAGE_INFO_ROW_PITCH = CL_IMAGE_ROW_PITCH,
395  PI_IMAGE_INFO_SLICE_PITCH = CL_IMAGE_SLICE_PITCH,
396  PI_IMAGE_INFO_WIDTH = CL_IMAGE_WIDTH,
397  PI_IMAGE_INFO_HEIGHT = CL_IMAGE_HEIGHT,
398  PI_IMAGE_INFO_DEPTH = CL_IMAGE_DEPTH
400 
401 typedef enum {
402  PI_KERNEL_MAX_SUB_GROUP_SIZE = CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE,
403  PI_KERNEL_MAX_NUM_SUB_GROUPS = CL_KERNEL_MAX_NUM_SUB_GROUPS,
404  PI_KERNEL_COMPILE_NUM_SUB_GROUPS = CL_KERNEL_COMPILE_NUM_SUB_GROUPS,
406  CL_KERNEL_COMPILE_SUB_GROUP_SIZE_INTEL
408 
409 typedef enum {
410  PI_EVENT_INFO_COMMAND_QUEUE = CL_EVENT_COMMAND_QUEUE,
411  PI_EVENT_INFO_CONTEXT = CL_EVENT_CONTEXT,
412  PI_EVENT_INFO_COMMAND_TYPE = CL_EVENT_COMMAND_TYPE,
413  PI_EVENT_INFO_COMMAND_EXECUTION_STATUS = CL_EVENT_COMMAND_EXECUTION_STATUS,
414  PI_EVENT_INFO_REFERENCE_COUNT = CL_EVENT_REFERENCE_COUNT
416 
417 typedef enum {
418  PI_COMMAND_TYPE_NDRANGE_KERNEL = CL_COMMAND_NDRANGE_KERNEL,
419  PI_COMMAND_TYPE_MEM_BUFFER_READ = CL_COMMAND_READ_BUFFER,
420  PI_COMMAND_TYPE_MEM_BUFFER_WRITE = CL_COMMAND_WRITE_BUFFER,
421  PI_COMMAND_TYPE_MEM_BUFFER_COPY = CL_COMMAND_COPY_BUFFER,
422  PI_COMMAND_TYPE_MEM_BUFFER_MAP = CL_COMMAND_MAP_BUFFER,
423  PI_COMMAND_TYPE_MEM_BUFFER_UNMAP = CL_COMMAND_UNMAP_MEM_OBJECT,
424  PI_COMMAND_TYPE_MEM_BUFFER_READ_RECT = CL_COMMAND_READ_BUFFER_RECT,
425  PI_COMMAND_TYPE_MEM_BUFFER_WRITE_RECT = CL_COMMAND_WRITE_BUFFER_RECT,
426  PI_COMMAND_TYPE_MEM_BUFFER_COPY_RECT = CL_COMMAND_COPY_BUFFER_RECT,
427  PI_COMMAND_TYPE_USER = CL_COMMAND_USER,
428  PI_COMMAND_TYPE_MEM_BUFFER_FILL = CL_COMMAND_FILL_BUFFER,
429  PI_COMMAND_TYPE_IMAGE_READ = CL_COMMAND_READ_IMAGE,
430  PI_COMMAND_TYPE_IMAGE_WRITE = CL_COMMAND_WRITE_IMAGE,
431  PI_COMMAND_TYPE_IMAGE_COPY = CL_COMMAND_COPY_IMAGE,
432  PI_COMMAND_TYPE_NATIVE_KERNEL = CL_COMMAND_NATIVE_KERNEL,
433  PI_COMMAND_TYPE_COPY_BUFFER_TO_IMAGE = CL_COMMAND_COPY_BUFFER_TO_IMAGE,
434  PI_COMMAND_TYPE_COPY_IMAGE_TO_BUFFER = CL_COMMAND_COPY_IMAGE_TO_BUFFER,
435  PI_COMMAND_TYPE_MAP_IMAGE = CL_COMMAND_MAP_IMAGE,
436  PI_COMMAND_TYPE_MARKER = CL_COMMAND_MARKER,
437  PI_COMMAND_TYPE_ACQUIRE_GL_OBJECTS = CL_COMMAND_ACQUIRE_GL_OBJECTS,
438  PI_COMMAND_TYPE_RELEASE_GL_OBJECTS = CL_COMMAND_RELEASE_GL_OBJECTS,
439  PI_COMMAND_TYPE_BARRIER = CL_COMMAND_BARRIER,
440  PI_COMMAND_TYPE_MIGRATE_MEM_OBJECTS = CL_COMMAND_MIGRATE_MEM_OBJECTS,
441  PI_COMMAND_TYPE_FILL_IMAGE = CL_COMMAND_FILL_IMAGE,
442  PI_COMMAND_TYPE_SVM_FREE = CL_COMMAND_SVM_FREE,
443  PI_COMMAND_TYPE_SVM_MEMCPY = CL_COMMAND_SVM_MEMCPY,
444  PI_COMMAND_TYPE_SVM_MEMFILL = CL_COMMAND_SVM_MEMFILL,
445  PI_COMMAND_TYPE_SVM_MAP = CL_COMMAND_SVM_MAP,
446  PI_COMMAND_TYPE_SVM_UNMAP = CL_COMMAND_SVM_UNMAP
448 
449 typedef enum {
450  PI_MEM_TYPE_BUFFER = CL_MEM_OBJECT_BUFFER,
451  PI_MEM_TYPE_IMAGE2D = CL_MEM_OBJECT_IMAGE2D,
452  PI_MEM_TYPE_IMAGE3D = CL_MEM_OBJECT_IMAGE3D,
453  PI_MEM_TYPE_IMAGE2D_ARRAY = CL_MEM_OBJECT_IMAGE2D_ARRAY,
454  PI_MEM_TYPE_IMAGE1D = CL_MEM_OBJECT_IMAGE1D,
455  PI_MEM_TYPE_IMAGE1D_ARRAY = CL_MEM_OBJECT_IMAGE1D_ARRAY,
456  PI_MEM_TYPE_IMAGE1D_BUFFER = CL_MEM_OBJECT_IMAGE1D_BUFFER
457 } _pi_mem_type;
458 
459 typedef enum {
460  // Device-specific value opaque in PI API.
473 
474 typedef enum {
491 
492 typedef enum {
509 
510 typedef enum {
511  PI_BUFFER_CREATE_TYPE_REGION = CL_BUFFER_CREATE_TYPE_REGION
513 
514 const pi_bool PI_TRUE = CL_TRUE;
515 const pi_bool PI_FALSE = CL_FALSE;
516 
517 typedef enum {
518  PI_SAMPLER_INFO_REFERENCE_COUNT = CL_SAMPLER_REFERENCE_COUNT,
519  PI_SAMPLER_INFO_CONTEXT = CL_SAMPLER_CONTEXT,
520  PI_SAMPLER_INFO_NORMALIZED_COORDS = CL_SAMPLER_NORMALIZED_COORDS,
521  PI_SAMPLER_INFO_ADDRESSING_MODE = CL_SAMPLER_ADDRESSING_MODE,
522  PI_SAMPLER_INFO_FILTER_MODE = CL_SAMPLER_FILTER_MODE,
523  PI_SAMPLER_INFO_MIP_FILTER_MODE = CL_SAMPLER_MIP_FILTER_MODE,
524  PI_SAMPLER_INFO_LOD_MIN = CL_SAMPLER_LOD_MIN,
525  PI_SAMPLER_INFO_LOD_MAX = CL_SAMPLER_LOD_MAX
527 
528 typedef enum {
529  PI_SAMPLER_ADDRESSING_MODE_MIRRORED_REPEAT = CL_ADDRESS_MIRRORED_REPEAT,
531  PI_SAMPLER_ADDRESSING_MODE_CLAMP_TO_EDGE = CL_ADDRESS_CLAMP_TO_EDGE,
535 
536 typedef enum {
537  PI_SAMPLER_FILTER_MODE_NEAREST = CL_FILTER_NEAREST,
538  PI_SAMPLER_FILTER_MODE_LINEAR = CL_FILTER_LINEAR,
540 
541 using pi_context_properties = intptr_t;
542 
545  CL_EXEC_KERNEL;
548 
551  CL_SAMPLER_NORMALIZED_COORDS;
553  CL_SAMPLER_ADDRESSING_MODE;
555  CL_SAMPLER_FILTER_MODE;
556 
563 
570 
571 typedef enum {
572  PI_PROFILING_INFO_COMMAND_QUEUED = CL_PROFILING_COMMAND_QUEUED,
573  PI_PROFILING_INFO_COMMAND_SUBMIT = CL_PROFILING_COMMAND_SUBMIT,
574  PI_PROFILING_INFO_COMMAND_START = CL_PROFILING_COMMAND_START,
575  PI_PROFILING_INFO_COMMAND_END = CL_PROFILING_COMMAND_END
577 
578 // NOTE: this is made 64-bit to match the size of cl_mem_flags to
579 // make the translation to OpenCL transparent.
580 // TODO: populate
581 //
583 // Access
584 constexpr pi_mem_flags PI_MEM_FLAGS_ACCESS_RW = CL_MEM_READ_WRITE;
585 constexpr pi_mem_flags PI_MEM_ACCESS_READ_ONLY = CL_MEM_READ_ONLY;
586 // Host pointer
587 constexpr pi_mem_flags PI_MEM_FLAGS_HOST_PTR_USE = CL_MEM_USE_HOST_PTR;
588 constexpr pi_mem_flags PI_MEM_FLAGS_HOST_PTR_COPY = CL_MEM_COPY_HOST_PTR;
589 constexpr pi_mem_flags PI_MEM_FLAGS_HOST_PTR_ALLOC = CL_MEM_ALLOC_HOST_PTR;
590 
591 // flags passed to Map operations
593 constexpr pi_map_flags PI_MAP_READ = CL_MAP_READ;
594 constexpr pi_map_flags PI_MAP_WRITE = CL_MAP_WRITE;
596  CL_MAP_WRITE_INVALIDATE_REGION;
597 
598 // NOTE: this is made 64-bit to match the size of cl_mem_properties_intel to
599 // make the translation to OpenCL transparent.
601 constexpr pi_mem_properties PI_MEM_PROPERTIES_CHANNEL = CL_MEM_CHANNEL_INTEL;
603  CL_MEM_ALLOC_BUFFER_LOCATION_INTEL;
604 
605 // NOTE: this is made 64-bit to match the size of cl_mem_properties_intel to
606 // make the translation to OpenCL transparent.
608 constexpr pi_usm_mem_properties PI_MEM_ALLOC_FLAGS = CL_MEM_ALLOC_FLAGS_INTEL;
610  CL_MEM_ALLOC_WRITE_COMBINED_INTEL;
612  CL_MEM_ALLOC_INITIAL_PLACEMENT_DEVICE_INTEL;
614  CL_MEM_ALLOC_INITIAL_PLACEMENT_HOST_INTEL;
615 // Hints that the device/shared allocation will not be written on device.
617 
619  CL_MEM_ALLOC_BUFFER_LOCATION_INTEL;
620 
621 // NOTE: queue properties are implemented this way to better support bit
622 // manipulations
625  CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE;
627  CL_QUEUE_PROFILING_ENABLE;
628 constexpr pi_queue_properties PI_QUEUE_ON_DEVICE = CL_QUEUE_ON_DEVICE;
630  CL_QUEUE_ON_DEVICE_DEFAULT;
631 
661 
662 // For compatibility with OpenCL define this not as enum.
665  CL_DEVICE_PARTITION_EQUALLY;
666 static constexpr pi_device_partition_property
668  CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN;
669 
670 // For compatibility with OpenCL define this not as enum.
673  CL_DEVICE_AFFINITY_DOMAIN_NUMA;
674 static constexpr pi_device_affinity_domain
676  CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE;
677 
678 // Entry type, matches OpenMP for compatibility
680  void *addr;
681  char *name;
682  size_t size;
683  int32_t flags;
684  int32_t reserved;
685 };
686 
688 
689 // A type of a binary image property.
690 typedef enum {
692  PI_PROPERTY_TYPE_UINT32, // 32-bit integer
694  PI_PROPERTY_TYPE_STRING // null-terminated string
696 
697 // Device binary image property.
698 // If the type size of the property value is fixed and is no greater than
699 // 64 bits, then ValAddr is 0 and the value is stored in the ValSize field.
700 // Example - PI_PROPERTY_TYPE_UINT32, which is 32-bit
702  char *Name; // null-terminated property name
703  void *ValAddr; // address of property value
704  uint32_t Type; // _pi_property_type
705  uint64_t ValSize; // size of property value in bytes
706 };
707 
709 
710 // Named array of properties.
712  char *Name; // the name
715 };
716 
718 
720 using pi_device_binary_type = uint8_t;
721 // format is not determined
723 // specific to a device
725 // portable binary types go next
726 // SPIR-V
728 // LLVM bitcode
730 
731 // Device binary descriptor version supported by this library.
732 static const uint16_t PI_DEVICE_BINARY_VERSION = 1;
733 
734 // The kind of offload model the binary employs; must be 4 for SYCL
735 static const uint8_t PI_DEVICE_BINARY_OFFLOAD_KIND_SYCL = 4;
736 
744 #define __SYCL_PI_DEVICE_BINARY_TARGET_UNKNOWN "<unknown>"
745 #define __SYCL_PI_DEVICE_BINARY_TARGET_SPIRV32 "spir"
747 #define __SYCL_PI_DEVICE_BINARY_TARGET_SPIRV64 "spir64"
749 #define __SYCL_PI_DEVICE_BINARY_TARGET_SPIRV64_X86_64 "spir64_x86_64"
752 #define __SYCL_PI_DEVICE_BINARY_TARGET_SPIRV64_GEN "spir64_gen"
753 #define __SYCL_PI_DEVICE_BINARY_TARGET_SPIRV64_FPGA "spir64_fpga"
754 #define __SYCL_PI_DEVICE_BINARY_TARGET_NVPTX64 "nvptx64"
756 #define __SYCL_PI_DEVICE_BINARY_TARGET_AMDGCN "amdgcn"
757 
761 #define PI_DEVICE_INFO_EXTENSION_DEVICELIB_ASSERT \
762  "pi_ext_intel_devicelib_assert"
763 
768 #define __SYCL_PI_PROPERTY_SET_SPEC_CONST_MAP "SYCL/specialization constants"
769 #define __SYCL_PI_PROPERTY_SET_SPEC_CONST_DEFAULT_VALUES_MAP \
772  "SYCL/specialization constants default values"
773 #define __SYCL_PI_PROPERTY_SET_DEVICELIB_REQ_MASK "SYCL/devicelib req mask"
775 #define __SYCL_PI_PROPERTY_SET_KERNEL_PARAM_OPT_INFO "SYCL/kernel param opt"
777 #define __SYCL_PI_PROPERTY_SET_PROGRAM_METADATA "SYCL/program metadata"
779 #define __SYCL_PI_PROPERTY_SET_SYCL_MISC_PROP "SYCL/misc properties"
781 #define __SYCL_PI_PROPERTY_SET_SYCL_ASSERT_USED "SYCL/assert used"
783 #define __SYCL_PI_PROPERTY_SET_SYCL_EXPORTED_SYMBOLS "SYCL/exported symbols"
785 #define __SYCL_PI_PROPERTY_SET_SYCL_DEVICE_GLOBALS "SYCL/device globals"
787 
790 #define __SYCL_PI_PROGRAM_METADATA_TAG_REQD_WORK_GROUP_SIZE \
791  "@reqd_work_group_size"
792 
802  uint16_t Version;
804  uint8_t Kind;
806  uint8_t Format;
818  const char *DeviceTargetSpec;
821  const char *CompileOptions;
824  const char *LinkOptions;
826  const char *ManifestStart;
828  const char *ManifestEnd;
830  const unsigned char *BinaryStart;
832  const unsigned char *BinaryEnd;
836  // Array of preperty sets; e.g. specialization constants symbol-int ID map is
837  // propagated to runtime with this mechanism.
840  // TODO Other fields like entries, link options can be propagated using
841  // the property set infrastructure. This will improve binary compatibility and
842  // add flexibility.
843 };
845 
846 // pi_buffer_region structure repeats cl_buffer_region, used for sub buffers.
848  size_t origin;
849  size_t size;
850 };
852 
853 // pi_buff_rect_offset structure is 3D offset argument passed to buffer rect
854 // operations (piEnqueueMemBufferCopyRect, etc).
856  size_t x_bytes;
857  size_t y_scalar;
858  size_t z_scalar;
859 };
861 
862 // pi_buff_rect_region structure represents size of 3D region passed to buffer
863 // rect operations (piEnqueueMemBufferCopyRect, etc).
865  size_t width_bytes;
867  size_t depth_scalar;
868 };
870 
871 // pi_image_offset structure is 3D offset argument passed to image operations
872 // (piEnqueueMemImageRead, etc).
874  size_t x;
875  size_t y;
876  size_t z;
877 };
879 
880 // pi_image_region structure represents size of 3D region passed to image
881 // operations (piEnqueueMemImageRead, etc).
883  size_t width;
884  size_t height;
885  size_t depth;
886 };
888 
889 // Offload binaries descriptor version supported by this library.
890 static const uint16_t PI_DEVICE_BINARIES_VERSION = 1;
891 
899  uint16_t Version;
907 };
909 
910 // Opaque types that make reading build log errors easier.
911 struct _pi_platform;
912 struct _pi_device;
913 struct _pi_context;
914 struct _pi_queue;
915 struct _pi_mem;
916 struct _pi_program;
917 struct _pi_kernel;
918 struct _pi_event;
919 struct _pi_sampler;
920 
924 using pi_queue = _pi_queue *;
925 using pi_mem = _pi_mem *;
928 using pi_event = _pi_event *;
930 
931 typedef struct {
935 
936 typedef struct {
938  size_t image_width;
939  size_t image_height;
940  size_t image_depth;
948 
951 
952 typedef enum {
953  PI_MEM_CONTEXT = CL_MEM_CONTEXT,
954  PI_MEM_SIZE = CL_MEM_SIZE
955 } _pi_mem_info;
956 
958 
959 //
960 // Following section contains SYCL RT Plugin Interface (PI) functions.
961 // They are 3 distinct categories:
962 //
963 // 1) Ones having direct analogy in OpenCL and needed for the core SYCL
964 // functionality are started with just "pi" prefix in their names.
965 // 2) Those having direct analogy in OpenCL but only needed for SYCL
966 // interoperability with OpenCL are started with "picl" prefix.
967 // 3) Functions having no direct analogy in OpenCL, started with "piext".
968 //
969 // TODO: describe interfaces in Doxygen format
970 //
971 
972 struct _pi_plugin;
974 
975 // PI Plugin Initialise.
976 // Plugin will check the PI version of Plugin Interface,
977 // populate the PI Version it supports, update targets field and populate
978 // PiFunctionTable with Supported APIs. The pointers are in a predetermined
979 // order in pi.def file.
980 __SYCL_EXPORT pi_result piPluginInit(pi_plugin *plugin_info);
981 
982 //
983 // Platform
984 //
985 __SYCL_EXPORT pi_result piPlatformsGet(pi_uint32 num_entries,
986  pi_platform *platforms,
987  pi_uint32 *num_platforms);
988 
990  pi_platform_info param_name,
991  size_t param_value_size,
992  void *param_value,
993  size_t *param_value_size_ret);
994 
1000  pi_platform platform, pi_native_handle *nativeHandle);
1001 
1008  pi_native_handle nativeHandle, pi_platform *platform);
1009 
1012  pi_uint32 num_entries, pi_device *devices,
1013  pi_uint32 *num_devices);
1014 
1019  pi_device_info param_name,
1020  size_t param_value_size,
1021  void *param_value,
1022  size_t *param_value_size_ret);
1023 
1024 __SYCL_EXPORT pi_result piDeviceRetain(pi_device device);
1025 
1026 __SYCL_EXPORT pi_result piDeviceRelease(pi_device device);
1027 
1028 __SYCL_EXPORT pi_result piDevicePartition(
1029  pi_device device, const pi_device_partition_property *properties,
1030  pi_uint32 num_devices, pi_device *out_devices, pi_uint32 *out_num_devices);
1031 
1036 __SYCL_EXPORT pi_result
1038 
1047 
1052  pi_device_binary *binaries,
1053  pi_uint32 num_binaries,
1054  pi_uint32 *selected_binary_ind);
1055 
1068  pi_device device, pi_program program, const char *function_name,
1069  pi_uint64 *function_pointer_ret);
1070 
1071 //
1072 // Context
1073 //
1074 __SYCL_EXPORT pi_result piContextCreate(
1075  const pi_context_properties *properties, pi_uint32 num_devices,
1076  const pi_device *devices,
1077  void (*pfn_notify)(const char *errinfo, const void *private_info, size_t cb,
1078  void *user_data),
1079  void *user_data, pi_context *ret_context);
1080 
1082  pi_context_info param_name,
1083  size_t param_value_size,
1084  void *param_value,
1085  size_t *param_value_size_ret);
1086 
1088 
1090 
1091 typedef void (*pi_context_extended_deleter)(void *user_data);
1092 
1094  pi_context context, pi_context_extended_deleter func, void *user_data);
1095 
1100 __SYCL_EXPORT pi_result
1102 
1126  pi_native_handle nativeHandle, pi_uint32 numDevices,
1127  const pi_device *devices, bool pluginOwnsNativeHandle, pi_context *context);
1128 
1129 //
1130 // Queue
1131 //
1133  pi_queue_properties properties,
1134  pi_queue *queue);
1135 
1136 __SYCL_EXPORT pi_result piQueueGetInfo(pi_queue command_queue,
1137  pi_queue_info param_name,
1138  size_t param_value_size,
1139  void *param_value,
1140  size_t *param_value_size_ret);
1141 
1142 __SYCL_EXPORT pi_result piQueueRetain(pi_queue command_queue);
1143 
1144 __SYCL_EXPORT pi_result piQueueRelease(pi_queue command_queue);
1145 
1146 __SYCL_EXPORT pi_result piQueueFinish(pi_queue command_queue);
1147 
1148 __SYCL_EXPORT pi_result piQueueFlush(pi_queue command_queue);
1149 
1154 __SYCL_EXPORT pi_result
1156 
1170  bool pluginOwnsNativeHandle, pi_queue *queue);
1171 
1172 //
1173 // Memory
1174 //
1175 __SYCL_EXPORT pi_result piMemBufferCreate(
1176  pi_context context, pi_mem_flags flags, size_t size, void *host_ptr,
1177  pi_mem *ret_mem, const pi_mem_properties *properties = nullptr);
1178 
1180  const pi_image_format *image_format,
1181  const pi_image_desc *image_desc,
1182  void *host_ptr, pi_mem *ret_mem);
1183 
1184 __SYCL_EXPORT pi_result piMemGetInfo(pi_mem mem, pi_mem_info param_name,
1185  size_t param_value_size, void *param_value,
1186  size_t *param_value_size_ret);
1187 
1188 __SYCL_EXPORT pi_result piMemImageGetInfo(pi_mem image,
1189  pi_image_info param_name,
1190  size_t param_value_size,
1191  void *param_value,
1192  size_t *param_value_size_ret);
1193 
1194 __SYCL_EXPORT pi_result piMemRetain(pi_mem mem);
1195 
1196 __SYCL_EXPORT pi_result piMemRelease(pi_mem mem);
1197 
1198 __SYCL_EXPORT pi_result piMemBufferPartition(
1199  pi_mem buffer, pi_mem_flags flags, pi_buffer_create_type buffer_create_type,
1200  void *buffer_create_info, pi_mem *ret_mem);
1201 
1206 __SYCL_EXPORT pi_result piextMemGetNativeHandle(pi_mem mem,
1207  pi_native_handle *nativeHandle);
1208 
1218  pi_native_handle nativeHandle, pi_context context, bool ownNativeHandle,
1219  pi_mem *mem);
1220 
1221 //
1222 // Program
1223 //
1224 
1225 __SYCL_EXPORT pi_result piProgramCreate(pi_context context, const void *il,
1226  size_t length, pi_program *res_program);
1227 
1229  pi_uint32 count,
1230  const char **strings,
1231  const size_t *lengths,
1232  pi_program *ret_program);
1233 
1250 __SYCL_EXPORT pi_result piProgramCreateWithBinary(
1251  pi_context context, pi_uint32 num_devices, const pi_device *device_list,
1252  const size_t *lengths, const unsigned char **binaries,
1253  size_t num_metadata_entries, const pi_device_binary_property *metadata,
1254  pi_int32 *binary_status, pi_program *ret_program);
1255 
1256 __SYCL_EXPORT pi_result piProgramGetInfo(pi_program program,
1257  pi_program_info param_name,
1258  size_t param_value_size,
1259  void *param_value,
1260  size_t *param_value_size_ret);
1261 
1262 __SYCL_EXPORT pi_result
1264  const pi_device *device_list, const char *options,
1265  pi_uint32 num_input_programs, const pi_program *input_programs,
1266  void (*pfn_notify)(pi_program program, void *user_data),
1267  void *user_data, pi_program *ret_program);
1268 
1269 __SYCL_EXPORT pi_result piProgramCompile(
1270  pi_program program, pi_uint32 num_devices, const pi_device *device_list,
1271  const char *options, pi_uint32 num_input_headers,
1272  const pi_program *input_headers, const char **header_include_names,
1273  void (*pfn_notify)(pi_program program, void *user_data), void *user_data);
1274 
1275 __SYCL_EXPORT pi_result piProgramBuild(
1276  pi_program program, pi_uint32 num_devices, const pi_device *device_list,
1277  const char *options,
1278  void (*pfn_notify)(pi_program program, void *user_data), void *user_data);
1279 
1280 __SYCL_EXPORT pi_result piProgramGetBuildInfo(
1281  pi_program program, pi_device device,
1282  cl_program_build_info param_name, // TODO: untie from OpenCL
1283  size_t param_value_size, void *param_value, size_t *param_value_size_ret);
1284 
1285 __SYCL_EXPORT pi_result piProgramRetain(pi_program program);
1286 
1287 __SYCL_EXPORT pi_result piProgramRelease(pi_program program);
1288 
1298 __SYCL_EXPORT pi_result
1300  size_t spec_size, const void *spec_value);
1301 
1306 __SYCL_EXPORT pi_result
1308 
1318  pi_native_handle nativeHandle, pi_context context,
1319  bool pluginOwnsNativeHandle, pi_program *program);
1320 
1321 //
1322 // Kernel
1323 //
1324 
1325 typedef enum {
1329  PI_USM_PTRS = CL_KERNEL_EXEC_INFO_USM_PTRS_INTEL
1331 
1333 
1334 __SYCL_EXPORT pi_result piKernelCreate(pi_program program,
1335  const char *kernel_name,
1336  pi_kernel *ret_kernel);
1337 
1338 __SYCL_EXPORT pi_result piKernelSetArg(pi_kernel kernel, pi_uint32 arg_index,
1339  size_t arg_size, const void *arg_value);
1340 
1342  pi_kernel_info param_name,
1343  size_t param_value_size,
1344  void *param_value,
1345  size_t *param_value_size_ret);
1346 
1348  pi_kernel_group_info param_name,
1349  size_t param_value_size,
1350  void *param_value,
1351  size_t *param_value_size_ret);
1352 
1371 __SYCL_EXPORT pi_result piKernelGetSubGroupInfo(
1373  size_t input_value_size, const void *input_value, size_t param_value_size,
1374  void *param_value, size_t *param_value_size_ret);
1375 
1376 __SYCL_EXPORT pi_result piKernelRetain(pi_kernel kernel);
1377 
1378 __SYCL_EXPORT pi_result piKernelRelease(pi_kernel kernel);
1379 
1388  pi_uint32 arg_index,
1389  size_t arg_size,
1390  const void *arg_value);
1391 
1404  pi_kernel_exec_info value_name,
1405  size_t param_value_size,
1406  const void *param_value);
1407 
1418  pi_native_handle nativeHandle, pi_context context, pi_program program,
1419  bool pluginOwnsNativeHandle, pi_kernel *kernel);
1420 
1425 __SYCL_EXPORT pi_result
1427 
1428 //
1429 // Events
1430 //
1431 __SYCL_EXPORT pi_result piEventCreate(pi_context context, pi_event *ret_event);
1432 
1433 __SYCL_EXPORT pi_result piEventGetInfo(pi_event event, pi_event_info param_name,
1434  size_t param_value_size,
1435  void *param_value,
1436  size_t *param_value_size_ret);
1437 
1439  pi_profiling_info param_name,
1440  size_t param_value_size,
1441  void *param_value,
1442  size_t *param_value_size_ret);
1443 
1444 __SYCL_EXPORT pi_result piEventsWait(pi_uint32 num_events,
1445  const pi_event *event_list);
1446 
1447 __SYCL_EXPORT pi_result piEventSetCallback(
1448  pi_event event, pi_int32 command_exec_callback_type,
1450  void *user_data),
1451  void *user_data);
1452 
1454  pi_int32 execution_status);
1455 
1456 __SYCL_EXPORT pi_result piEventRetain(pi_event event);
1457 
1458 __SYCL_EXPORT pi_result piEventRelease(pi_event event);
1459 
1464 __SYCL_EXPORT pi_result
1466 
1476  pi_native_handle nativeHandle, pi_context context, bool ownNativeHandle,
1477  pi_event *event);
1478 
1479 //
1480 // Sampler
1481 //
1482 __SYCL_EXPORT pi_result piSamplerCreate(
1483  pi_context context, const pi_sampler_properties *sampler_properties,
1484  pi_sampler *result_sampler);
1485 
1486 __SYCL_EXPORT pi_result piSamplerGetInfo(pi_sampler sampler,
1487  pi_sampler_info param_name,
1488  size_t param_value_size,
1489  void *param_value,
1490  size_t *param_value_size_ret);
1491 
1492 __SYCL_EXPORT pi_result piSamplerRetain(pi_sampler sampler);
1493 
1494 __SYCL_EXPORT pi_result piSamplerRelease(pi_sampler sampler);
1495 
1496 //
1497 // Queue Commands
1498 //
1499 __SYCL_EXPORT pi_result piEnqueueKernelLaunch(
1501  const size_t *global_work_offset, const size_t *global_work_size,
1502  const size_t *local_work_size, pi_uint32 num_events_in_wait_list,
1503  const pi_event *event_wait_list, pi_event *event);
1504 
1505 __SYCL_EXPORT pi_result piEnqueueNativeKernel(
1506  pi_queue queue, void (*user_func)(void *), void *args, size_t cb_args,
1507  pi_uint32 num_mem_objects, const pi_mem *mem_list,
1508  const void **args_mem_loc, pi_uint32 num_events_in_wait_list,
1509  const pi_event *event_wait_list, pi_event *event);
1510 
1511 __SYCL_EXPORT pi_result piEnqueueEventsWait(pi_queue command_queue,
1512  pi_uint32 num_events_in_wait_list,
1513  const pi_event *event_wait_list,
1514  pi_event *event);
1515 
1517  pi_queue command_queue, pi_uint32 num_events_in_wait_list,
1518  const pi_event *event_wait_list, pi_event *event);
1519 
1520 __SYCL_EXPORT pi_result piEnqueueMemBufferRead(
1521  pi_queue queue, pi_mem buffer, pi_bool blocking_read, size_t offset,
1522  size_t size, void *ptr, pi_uint32 num_events_in_wait_list,
1523  const pi_event *event_wait_list, pi_event *event);
1524 
1526  pi_queue command_queue, pi_mem buffer, pi_bool blocking_read,
1527  pi_buff_rect_offset buffer_offset, pi_buff_rect_offset host_offset,
1528  pi_buff_rect_region region, size_t buffer_row_pitch,
1529  size_t buffer_slice_pitch, size_t host_row_pitch, size_t host_slice_pitch,
1530  void *ptr, pi_uint32 num_events_in_wait_list,
1531  const pi_event *event_wait_list, pi_event *event);
1532 
1533 __SYCL_EXPORT pi_result
1534 piEnqueueMemBufferWrite(pi_queue command_queue, pi_mem buffer,
1535  pi_bool blocking_write, size_t offset, size_t size,
1536  const void *ptr, pi_uint32 num_events_in_wait_list,
1537  const pi_event *event_wait_list, pi_event *event);
1538 
1540  pi_queue command_queue, pi_mem buffer, pi_bool blocking_write,
1541  pi_buff_rect_offset buffer_offset, pi_buff_rect_offset host_offset,
1542  pi_buff_rect_region region, size_t buffer_row_pitch,
1543  size_t buffer_slice_pitch, size_t host_row_pitch, size_t host_slice_pitch,
1544  const void *ptr, pi_uint32 num_events_in_wait_list,
1545  const pi_event *event_wait_list, pi_event *event);
1546 
1547 __SYCL_EXPORT pi_result
1548 piEnqueueMemBufferCopy(pi_queue command_queue, pi_mem src_buffer,
1549  pi_mem dst_buffer, size_t src_offset, size_t dst_offset,
1550  size_t size, pi_uint32 num_events_in_wait_list,
1551  const pi_event *event_wait_list, pi_event *event);
1552 
1554  pi_queue command_queue, pi_mem src_buffer, pi_mem dst_buffer,
1555  pi_buff_rect_offset src_origin, pi_buff_rect_offset dst_origin,
1556  pi_buff_rect_region region, size_t src_row_pitch, size_t src_slice_pitch,
1557  size_t dst_row_pitch, size_t dst_slice_pitch,
1558  pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list,
1559  pi_event *event);
1560 
1561 __SYCL_EXPORT pi_result
1562 piEnqueueMemBufferFill(pi_queue command_queue, pi_mem buffer,
1563  const void *pattern, size_t pattern_size, size_t offset,
1564  size_t size, pi_uint32 num_events_in_wait_list,
1565  const pi_event *event_wait_list, pi_event *event);
1566 
1567 __SYCL_EXPORT pi_result piEnqueueMemImageRead(
1568  pi_queue command_queue, pi_mem image, pi_bool blocking_read,
1569  pi_image_offset origin, pi_image_region region, size_t row_pitch,
1570  size_t slice_pitch, void *ptr, pi_uint32 num_events_in_wait_list,
1571  const pi_event *event_wait_list, pi_event *event);
1572 
1573 __SYCL_EXPORT pi_result piEnqueueMemImageWrite(
1574  pi_queue command_queue, pi_mem image, pi_bool blocking_write,
1575  pi_image_offset origin, pi_image_region region, size_t input_row_pitch,
1576  size_t input_slice_pitch, const void *ptr,
1577  pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list,
1578  pi_event *event);
1579 
1580 __SYCL_EXPORT pi_result piEnqueueMemImageCopy(
1581  pi_queue command_queue, pi_mem src_image, pi_mem dst_image,
1582  pi_image_offset src_origin, pi_image_offset dst_origin,
1583  pi_image_region region, pi_uint32 num_events_in_wait_list,
1584  const pi_event *event_wait_list, pi_event *event);
1585 
1586 __SYCL_EXPORT pi_result
1587 piEnqueueMemImageFill(pi_queue command_queue, pi_mem image,
1588  const void *fill_color, const size_t *origin,
1589  const size_t *region, pi_uint32 num_events_in_wait_list,
1590  const pi_event *event_wait_list, pi_event *event);
1591 
1592 __SYCL_EXPORT pi_result piEnqueueMemBufferMap(
1593  pi_queue command_queue, pi_mem buffer, pi_bool blocking_map,
1594  pi_map_flags map_flags, size_t offset, size_t size,
1595  pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list,
1596  pi_event *event, void **ret_map);
1597 
1598 __SYCL_EXPORT pi_result piEnqueueMemUnmap(pi_queue command_queue, pi_mem memobj,
1599  void *mapped_ptr,
1600  pi_uint32 num_events_in_wait_list,
1601  const pi_event *event_wait_list,
1602  pi_event *event);
1603 
1604 // Extension to allow backends to process a PI memory object before adding it
1605 // as an argument for a kernel.
1606 // Note: This is needed by the CUDA backend to extract the device pointer to
1607 // the memory as the kernels uses it rather than the PI object itself.
1609  pi_uint32 arg_index,
1610  const pi_mem *arg_value);
1611 
1612 // Extension to allow backends to process a PI sampler object before adding it
1613 // as an argument for a kernel.
1614 // Note: This is needed by the CUDA backend to extract the properties of the
1615 // sampler as the kernels uses it rather than the PI object itself.
1617  pi_uint32 arg_index,
1618  const pi_sampler *arg_value);
1619 
1621 // USM
1623 typedef enum {
1624  PI_USM_HOST_SUPPORT = CL_DEVICE_HOST_MEM_CAPABILITIES_INTEL,
1625  PI_USM_DEVICE_SUPPORT = CL_DEVICE_DEVICE_MEM_CAPABILITIES_INTEL,
1627  CL_DEVICE_SINGLE_DEVICE_SHARED_MEM_CAPABILITIES_INTEL,
1629  CL_DEVICE_CROSS_DEVICE_SHARED_MEM_CAPABILITIES_INTEL,
1630  PI_USM_SYSTEM_SHARED_SUPPORT = CL_DEVICE_SHARED_SYSTEM_MEM_CAPABILITIES_INTEL
1632 
1633 typedef enum : pi_bitfield {
1634  PI_USM_ACCESS = CL_UNIFIED_SHARED_MEMORY_ACCESS_INTEL,
1635  PI_USM_ATOMIC_ACCESS = CL_UNIFIED_SHARED_MEMORY_ATOMIC_ACCESS_INTEL,
1636  PI_USM_CONCURRENT_ACCESS = CL_UNIFIED_SHARED_MEMORY_CONCURRENT_ACCESS_INTEL,
1638  CL_UNIFIED_SHARED_MEMORY_CONCURRENT_ATOMIC_ACCESS_INTEL
1640 
1641 typedef enum {
1642  PI_MEM_ALLOC_TYPE = CL_MEM_ALLOC_TYPE_INTEL,
1643  PI_MEM_ALLOC_BASE_PTR = CL_MEM_ALLOC_BASE_PTR_INTEL,
1644  PI_MEM_ALLOC_SIZE = CL_MEM_ALLOC_SIZE_INTEL,
1645  PI_MEM_ALLOC_DEVICE = CL_MEM_ALLOC_DEVICE_INTEL,
1647 
1648 typedef enum {
1649  PI_MEM_TYPE_UNKNOWN = CL_MEM_TYPE_UNKNOWN_INTEL,
1650  PI_MEM_TYPE_HOST = CL_MEM_TYPE_HOST_INTEL,
1651  PI_MEM_TYPE_DEVICE = CL_MEM_TYPE_DEVICE_INTEL,
1652  PI_MEM_TYPE_SHARED = CL_MEM_TYPE_SHARED_INTEL
1653 } _pi_usm_type;
1654 
1655 // Flag is used for piProgramUSMEnqueuePrefetch. PI_USM_MIGRATION_TBD0 is a
1656 // placeholder for future developments and should not change the behaviour of
1657 // piProgramUSMEnqueuePrefetch
1658 typedef enum : pi_bitfield {
1661 
1667 
1675 __SYCL_EXPORT pi_result piextUSMHostAlloc(void **result_ptr, pi_context context,
1676  pi_usm_mem_properties *properties,
1677  size_t size, pi_uint32 alignment);
1678 
1687 __SYCL_EXPORT pi_result piextUSMDeviceAlloc(void **result_ptr,
1689  pi_device device,
1690  pi_usm_mem_properties *properties,
1691  size_t size, pi_uint32 alignment);
1692 
1701 __SYCL_EXPORT pi_result piextUSMSharedAlloc(void **result_ptr,
1703  pi_device device,
1704  pi_usm_mem_properties *properties,
1705  size_t size, pi_uint32 alignment);
1706 
1713 __SYCL_EXPORT pi_result piextUSMFree(pi_context context, void *ptr);
1714 
1726 __SYCL_EXPORT pi_result piextUSMEnqueueMemset(pi_queue queue, void *ptr,
1727  pi_int32 value, size_t count,
1728  pi_uint32 num_events_in_waitlist,
1729  const pi_event *events_waitlist,
1730  pi_event *event);
1731 
1742 __SYCL_EXPORT pi_result piextUSMEnqueueMemcpy(pi_queue queue, pi_bool blocking,
1743  void *dst_ptr,
1744  const void *src_ptr, size_t size,
1745  pi_uint32 num_events_in_waitlist,
1746  const pi_event *events_waitlist,
1747  pi_event *event);
1748 
1758 __SYCL_EXPORT pi_result piextUSMEnqueuePrefetch(
1759  pi_queue queue, const void *ptr, size_t size, pi_usm_migration_flags flags,
1760  pi_uint32 num_events_in_waitlist, const pi_event *events_waitlist,
1761  pi_event *event);
1762 
1770 // USM memadvise API to govern behavior of automatic migration mechanisms
1772  const void *ptr, size_t length,
1773  pi_mem_advice advice,
1774  pi_event *event);
1775 
1792 __SYCL_EXPORT pi_result piextUSMGetMemAllocInfo(
1793  pi_context context, const void *ptr, pi_mem_alloc_info param_name,
1794  size_t param_value_size, void *param_value, size_t *param_value_size_ret);
1795 
1802 __SYCL_EXPORT pi_result piextPluginGetOpaqueData(void *opaque_data_param,
1803  void **opaque_data_return);
1804 
1808 __SYCL_EXPORT pi_result piTearDown(void *PluginParameter);
1809 
1820 __SYCL_EXPORT pi_result piPluginGetLastError(char **message);
1821 
1822 struct _pi_plugin {
1823  // PI version supported by host passed to the plugin. The Plugin
1824  // checks and writes the appropriate Function Pointers in
1825  // PiFunctionTable.
1826  // TODO: Work on version fields and their handshaking mechanism.
1827  // Some choices are:
1828  // - Use of integers to keep major and minor version.
1829  // - Keeping char* Versions.
1830  char PiVersion[10];
1831  // Plugin edits this.
1832  char PluginVersion[10];
1833  char *Targets;
1835 #define _PI_API(api) decltype(::api) *api;
1836 #include <CL/sycl/detail/pi.def>
1837  } PiFunctionTable;
1838 };
1839 
1840 #ifdef __cplusplus
1841 } // extern "C"
1842 #endif // __cplusplus
1843 
1844 #endif // _PI_H_
PI_COMMAND_TYPE_USER
@ PI_COMMAND_TYPE_USER
Definition: pi.h:427
PI_IMAGE_FORMAT_NOT_SUPPORTED
@ PI_IMAGE_FORMAT_NOT_SUPPORTED
Definition: pi.h:118
PI_PROFILING_INFO_COMMAND_START
@ PI_PROFILING_INFO_COMMAND_START
Definition: pi.h:574
piEventGetProfilingInfo
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_esimd_emulator.cpp:1391
PI_DEVICE_INFO_HOST_UNIFIED_MEMORY
@ PI_DEVICE_INFO_HOST_UNIFIED_MEMORY
Definition: pi.h:259
_pi_image_desc::num_samples
pi_uint32 num_samples
Definition: pi.h:945
PI_IMAGE_INFO_ROW_PITCH
@ PI_IMAGE_INFO_ROW_PITCH
Definition: pi.h:394
PI_DEVICE_BINARY_TYPE_NONE
static constexpr pi_device_binary_type PI_DEVICE_BINARY_TYPE_NONE
Definition: pi.h:722
piKernelCreate
pi_result piKernelCreate(pi_program program, const char *kernel_name, pi_kernel *ret_kernel)
Definition: pi_esimd_emulator.cpp:1349
PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_CHAR
@ PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_CHAR
Definition: pi.h:209
PI_FP_ROUND_TO_ZERO
@ PI_FP_ROUND_TO_ZERO
Definition: pi.h:384
PI_DEVICE_INFO_OPENCL_C_VERSION
@ PI_DEVICE_INFO_OPENCL_C_VERSION
Definition: pi.h:279
pi_image_region_struct::height
size_t height
Definition: pi.h:884
_pi_mem
PI Mem mapping to CUDA memory allocations, both data and texture/surface.
Definition: pi_cuda.hpp:207
PI_DEVICE_PARTITION_EQUALLY
static constexpr pi_device_partition_property PI_DEVICE_PARTITION_EQUALLY
Definition: pi.h:664
PI_SAMPLER_ADDRESSING_MODE_MIRRORED_REPEAT
@ PI_SAMPLER_ADDRESSING_MODE_MIRRORED_REPEAT
Definition: pi.h:529
pi_buff_rect_region_struct::depth_scalar
size_t depth_scalar
Definition: pi.h:867
piEventRelease
pi_result piEventRelease(pi_event event)
Definition: pi_esimd_emulator.cpp:1442
PI_MAP_WRITE
constexpr pi_map_flags PI_MAP_WRITE
Definition: pi.h:594
_pi_fp_capabilities
_pi_fp_capabilities
Definition: pi.h:381
PI_USM_ACCESS
@ PI_USM_ACCESS
Definition: pi.h:1634
PI_DEVICE_INFO_PROFILE
@ PI_DEVICE_INFO_PROFILE
Definition: pi.h:277
PI_INVALID_KERNEL
@ PI_INVALID_KERNEL
Definition: pi.h:89
piEnqueueKernelLaunch
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_esimd_emulator.cpp:1759
piMemGetInfo
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_esimd_emulator.cpp:1081
_pi_mem_type
_pi_mem_type
Definition: pi.h:449
_pi_image_desc::image_array_size
size_t image_array_size
Definition: pi.h:941
_pi_offload_entry_struct
Definition: pi.h:679
PI_KERNEL_INFO_REFERENCE_COUNT
@ PI_KERNEL_INFO_REFERENCE_COUNT
Definition: pi.h:362
PI_DEVICE_INFO_IMAGE3D_MAX_WIDTH
@ PI_DEVICE_INFO_IMAGE3D_MAX_WIDTH
Definition: pi.h:241
PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_CHAR
@ PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_CHAR
Definition: pi.h:223
PI_SUCCESS
@ PI_SUCCESS
Definition: pi.h:86
PI_DEVICE_INFO_DOUBLE_FP_CONFIG
@ PI_DEVICE_INFO_DOUBLE_FP_CONFIG
Definition: pi.h:207
_pi_context_info
_pi_context_info
Definition: pi.h:340
pi_buff_rect_region_struct::height_scalar
size_t height_scalar
Definition: pi.h:866
PI_MEM_TYPE_IMAGE1D
@ PI_MEM_TYPE_IMAGE1D
Definition: pi.h:454
pi_buff_rect_offset_struct
Definition: pi.h:855
PI_LINK_PROGRAM_FAILURE
@ PI_LINK_PROGRAM_FAILURE
Definition: pi.h:120
_pi_offload_entry_struct::reserved
int32_t reserved
Definition: pi.h:684
piextUSMFree
pi_result piextUSMFree(pi_context context, void *ptr)
Indicates that the allocated USM memory is no longer needed on the runtime side.
Definition: pi_esimd_emulator.cpp:1889
piKernelSetArg
pi_result piKernelSetArg(pi_kernel kernel, pi_uint32 arg_index, size_t arg_size, const void *arg_value)
Definition: pi_esimd_emulator.cpp:1353
PI_KERNEL_INFO_ATTRIBUTES
@ PI_KERNEL_INFO_ATTRIBUTES
Definition: pi.h:365
PI_DEVICE_BINARY_VERSION
static const uint16_t PI_DEVICE_BINARY_VERSION
Definition: pi.h:732
PI_DEVICE_INFO_DRIVER_VERSION
@ PI_DEVICE_INFO_DRIVER_VERSION
Definition: pi.h:276
_pi_usm_capabilities
_pi_usm_capabilities
Definition: pi.h:1633
PI_DEVICE_INFO_GPU_EU_COUNT
@ PI_DEVICE_INFO_GPU_EU_COUNT
Definition: pi.h:307
PI_IMAGE_CHANNEL_ORDER_A
@ PI_IMAGE_CHANNEL_ORDER_A
Definition: pi.h:475
_pi_device_binary_property_struct::Name
char * Name
Definition: pi.h:702
pi_bool
pi_uint32 pi_bool
Definition: pi.h:74
PI_IMAGE_CHANNEL_TYPE_UNORM_SHORT_565
@ PI_IMAGE_CHANNEL_TYPE_UNORM_SHORT_565
Definition: pi.h:497
PI_IMAGE_CHANNEL_TYPE_HALF_FLOAT
@ PI_IMAGE_CHANNEL_TYPE_HALF_FLOAT
Definition: pi.h:506
PI_DEVICE_INFO_PREFERRED_INTEROP_USER_SYNC
@ PI_DEVICE_INFO_PREFERRED_INTEROP_USER_SYNC
Definition: pi.h:282
_pi_image_format::image_channel_data_type
pi_image_channel_type image_channel_data_type
Definition: pi.h:933
cl::sycl::info::device
device
Definition: info_desc.hpp:53
piPluginGetLastError
pi_result piPluginGetLastError(char **message)
API to get Plugin specific warning and error messages.
Definition: pi_esimd_emulator.cpp:158
PI_QUEUE_INFO_CONTEXT
@ PI_QUEUE_INFO_CONTEXT
Definition: pi.h:351
pi_device_binaries_struct::DeviceBinaries
pi_device_binary DeviceBinaries
Device binaries data.
Definition: pi.h:903
PI_INVALID_OPERATION
@ PI_INVALID_OPERATION
Definition: pi.h:88
PI_DEVICE_BINARY_TYPE_SPIRV
static constexpr pi_device_binary_type PI_DEVICE_BINARY_TYPE_SPIRV
Definition: pi.h:727
PI_DEVICE_INFO_NAME
@ PI_DEVICE_INFO_NAME
Definition: pi.h:274
pi_device_binaries_struct::Version
uint16_t Version
version of this structure - for backward compatibility; all modifications which change order/type/off...
Definition: pi.h:899
_pi_device_binary_property_set_struct
Definition: pi.h:711
piextKernelGetNativeHandle
pi_result piextKernelGetNativeHandle(pi_kernel kernel, pi_native_handle *nativeHandle)
Gets the native handle of a PI kernel object.
Definition: pi_esimd_emulator.cpp:1825
PI_DEVICE_INFO_IL_VERSION
@ PI_DEVICE_INFO_IL_VERSION
Definition: pi.h:273
PI_DEVICE_EXEC_CAPABILITIES_NATIVE_KERNEL
constexpr pi_device_exec_capabilities PI_DEVICE_EXEC_CAPABILITIES_NATIVE_KERNEL
Definition: pi.h:547
pi_device_binary_struct::DeviceTargetSpec
const char * DeviceTargetSpec
null-terminated string representation of the device's target architecture which holds one of: __SYCL_...
Definition: pi.h:818
PI_FP_ROUND_TO_NEAREST
@ PI_FP_ROUND_TO_NEAREST
Definition: pi.h:383
piProgramLink
pi_result piProgramLink(pi_context context, pi_uint32 num_devices, const pi_device *device_list, const char *options, pi_uint32 num_input_programs, const pi_program *input_programs, void(*pfn_notify)(pi_program program, void *user_data), void *user_data, pi_program *ret_program)
Definition: pi_opencl.cpp:794
PI_IMAGE_CHANNEL_TYPE_UNORM_INT8
@ PI_IMAGE_CHANNEL_TYPE_UNORM_INT8
Definition: pi.h:495
PI_COMPILER_NOT_AVAILABLE
@ PI_COMPILER_NOT_AVAILABLE
Definition: pi.h:109
PI_PROFILING_INFO_COMMAND_SUBMIT
@ PI_PROFILING_INFO_COMMAND_SUBMIT
Definition: pi.h:573
PI_MEMORY_ORDER_ACQUIRE
constexpr pi_memory_order_capabilities PI_MEMORY_ORDER_ACQUIRE
Definition: pi.h:559
PI_PROGRAM_INFO_BINARY_SIZES
@ PI_PROGRAM_INFO_BINARY_SIZES
Definition: pi.h:334
PI_DEVICE_BINARY_TYPE_LLVMIR_BITCODE
static constexpr pi_device_binary_type PI_DEVICE_BINARY_TYPE_LLVMIR_BITCODE
Definition: pi.h:729
PI_INVALID_BUFFER_SIZE
@ PI_INVALID_BUFFER_SIZE
Definition: pi.h:101
_pi_plugin::FunctionPointers
Definition: pi.h:1834
PI_IMAGE_CHANNEL_ORDER_INTENSITY
@ PI_IMAGE_CHANNEL_ORDER_INTENSITY
Definition: pi.h:484
PI_MEM_FLAGS_HOST_PTR_COPY
constexpr pi_mem_flags PI_MEM_FLAGS_HOST_PTR_COPY
Definition: pi.h:588
PI_SAMPLER_ADDRESSING_MODE_REPEAT
@ PI_SAMPLER_ADDRESSING_MODE_REPEAT
Definition: pi.h:530
_pi_usm_type
_pi_usm_type
Definition: pi.h:1648
PI_SAMPLER_INFO_LOD_MIN
@ PI_SAMPLER_INFO_LOD_MIN
Definition: pi.h:524
_pi_image_format::image_channel_order
pi_image_channel_order image_channel_order
Definition: pi.h:932
PI_PROPERTY_TYPE_STRING
@ PI_PROPERTY_TYPE_STRING
Definition: pi.h:694
PI_MEM_ALLOC_SIZE
@ PI_MEM_ALLOC_SIZE
Definition: pi.h:1644
PI_DEVICE_INFO_PARTITION_AFFINITY_DOMAIN
@ PI_DEVICE_INFO_PARTITION_AFFINITY_DOMAIN
Definition: pi.h:288
piextProgramGetNativeHandle
pi_result piextProgramGetNativeHandle(pi_program program, pi_native_handle *nativeHandle)
Gets the native handle of a PI program object.
Definition: pi_esimd_emulator.cpp:1340
PI_DEVICE_INFO_IMAGE_SRGB
@ PI_DEVICE_INFO_IMAGE_SRGB
Definition: pi.h:313
_pi_image_desc::image_type
pi_mem_type image_type
Definition: pi.h:937
piProgramRetain
pi_result piProgramRetain(pi_program program)
Definition: pi_esimd_emulator.cpp:1336
_pi_plugin
Definition: pi.h:1822
_pi_offload_entry_struct::addr
void * addr
Definition: pi.h:680
PI_PROGRAM_INFO_SOURCE
@ PI_PROGRAM_INFO_SOURCE
Definition: pi.h:333
PI_IMAGE_INFO_FORMAT
@ PI_IMAGE_INFO_FORMAT
Definition: pi.h:392
PI_INVALID_MEM_OBJECT
@ PI_INVALID_MEM_OBJECT
Definition: pi.h:102
_pi_device_local_mem_type
_pi_device_local_mem_type
Definition: pi.h:193
PI_DEVICE_INFO_GLOBAL_MEM_CACHE_TYPE
@ PI_DEVICE_INFO_GLOBAL_MEM_CACHE_TYPE
Definition: pi.h:249
piDevicePartition
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_esimd_emulator.cpp:813
PI_KERNEL_COMPILE_NUM_SUB_GROUPS
@ PI_KERNEL_COMPILE_NUM_SUB_GROUPS
Definition: pi.h:404
_pi_device_mem_cache_type
_pi_device_mem_cache_type
Definition: pi.h:187
_pi_mem_advice
_pi_mem_advice
Definition: pi.h:459
PI_COMMAND_TYPE_SVM_UNMAP
@ PI_COMMAND_TYPE_SVM_UNMAP
Definition: pi.h:446
PI_DEVICE_INFO_MAX_WORK_ITEM_SIZES
@ PI_DEVICE_INFO_MAX_WORK_ITEM_SIZES
Definition: pi.h:203
piEnqueueMemBufferCopy
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_esimd_emulator.cpp:1570
_pi_device_binary_property_set_struct::Name
char * Name
Definition: pi.h:712
PI_DEVICE_INFO_MAX_COMPUTE_UNITS
@ PI_DEVICE_INFO_MAX_COMPUTE_UNITS
Definition: pi.h:201
_pi_device_binary_property_struct::Type
uint32_t Type
Definition: pi.h:704
PI_MEM_ADVICE_CUDA_UNSET_PREFERRED_LOCATION
@ PI_MEM_ADVICE_CUDA_UNSET_PREFERRED_LOCATION
Definition: pi.h:465
pi_device_binary_struct::PropertySetsEnd
pi_device_binary_property_set PropertySetsEnd
Definition: pi.h:839
PI_EVENT_INFO_CONTEXT
@ PI_EVENT_INFO_CONTEXT
Definition: pi.h:411
PI_DEVICE_INFO_GPU_HW_THREADS_PER_EU
@ PI_DEVICE_INFO_GPU_HW_THREADS_PER_EU
Definition: pi.h:319
pi_device_binary_struct::BinaryStart
const unsigned char * BinaryStart
Pointer to the target code start.
Definition: pi.h:830
_pi_result
_pi_result
Definition: pi.h:85
PI_MEM_ADVICE_CUDA_UNSET_READ_MOSTLY
@ PI_MEM_ADVICE_CUDA_UNSET_READ_MOSTLY
Definition: pi.h:463
PI_PROFILING_INFO_COMMAND_QUEUED
@ PI_PROFILING_INFO_COMMAND_QUEUED
Definition: pi.h:572
pi_device_binary_struct::ManifestStart
const char * ManifestStart
Pointer to the manifest data start.
Definition: pi.h:826
piextQueueGetNativeHandle
pi_result piextQueueGetNativeHandle(pi_queue queue, pi_native_handle *nativeHandle)
Gets the native handle of a PI queue object.
Definition: pi_esimd_emulator.cpp:998
piTearDown
pi_result piTearDown(void *PluginParameter)
API to notify that the plugin should clean up its resources.
Definition: pi_esimd_emulator.cpp:1974
PI_MEM_ADVICE_CUDA_UNSET_ACCESSED_BY_HOST
@ PI_MEM_ADVICE_CUDA_UNSET_ACCESSED_BY_HOST
Definition: pi.h:471
PI_MEM_ALLOC_INITIAL_PLACEMENT_DEVICE
constexpr pi_usm_mem_properties PI_MEM_ALLOC_INITIAL_PLACEMENT_DEVICE
Definition: pi.h:611
pi_context_properties
intptr_t pi_context_properties
Definition: pi.h:541
piEnqueueMemUnmap
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_esimd_emulator.cpp:1636
PI_PROGRAM_BUILD_STATUS_IN_PROGRESS
@ PI_PROGRAM_BUILD_STATUS_IN_PROGRESS
Definition: pi.h:160
PI_SAMPLER_INFO_FILTER_MODE
@ PI_SAMPLER_INFO_FILTER_MODE
Definition: pi.h:522
PI_KERNEL_GROUP_INFO_WORK_GROUP_SIZE
@ PI_KERNEL_GROUP_INFO_WORK_GROUP_SIZE
Definition: pi.h:370
PI_IMAGE_CHANNEL_TYPE_SIGNED_INT8
@ PI_IMAGE_CHANNEL_TYPE_SIGNED_INT8
Definition: pi.h:500
PI_FP_INF_NAN
@ PI_FP_INF_NAN
Definition: pi.h:386
PI_PROFILING_INFO_NOT_AVAILABLE
@ PI_PROFILING_INFO_NOT_AVAILABLE
Definition: pi.h:110
piPluginInit
pi_result piPluginInit(pi_plugin *plugin_info)
Definition: pi_cuda.cpp:5069
PI_MEM_ADVICE_CUDA_SET_PREFERRED_LOCATION_HOST
@ PI_MEM_ADVICE_CUDA_SET_PREFERRED_LOCATION_HOST
Definition: pi.h:468
piSamplerGetInfo
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_esimd_emulator.cpp:1476
PI_INVALID_EVENT_WAIT_LIST
@ PI_INVALID_EVENT_WAIT_LIST
Definition: pi.h:105
PI_CONTEXT_INFO_ATOMIC_MEMORY_ORDER_CAPABILITIES
@ PI_CONTEXT_INFO_ATOMIC_MEMORY_ORDER_CAPABILITIES
Definition: pi.h:346
piPlatformGetInfo
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_esimd_emulator.cpp:439
PI_DEVICE_INFO_GPU_SLICES
@ PI_DEVICE_INFO_GPU_SLICES
Definition: pi.h:309
PI_IMAGE_CHANNEL_ORDER_RG
@ PI_IMAGE_CHANNEL_ORDER_RG
Definition: pi.h:477
piDeviceRetain
pi_result piDeviceRetain(pi_device device)
Definition: pi_esimd_emulator.cpp:571
PI_IMAGE_INFO_SLICE_PITCH
@ PI_IMAGE_INFO_SLICE_PITCH
Definition: pi.h:395
PI_DEVICE_INFO_MAX_MEM_ALLOC_SIZE
@ PI_DEVICE_INFO_MAX_MEM_ALLOC_SIZE
Definition: pi.h:235
piProgramCompile
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_device_type
_pi_device_type
Definition: pi.h:174
cl::sycl::info::device_type
device_type
Definition: info_desc.hpp:180
piContextGetInfo
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_esimd_emulator.cpp:858
piQueueRelease
pi_result piQueueRelease(pi_queue command_queue)
Definition: pi_esimd_emulator.cpp:970
cl::sycl::info::kernel
kernel
Definition: info_desc.hpp:236
PI_DEVICE_INFO_REFERENCE_COUNT
@ PI_DEVICE_INFO_REFERENCE_COUNT
Definition: pi.h:272
PI_MEMORY_SCOPE_WORK_ITEM
constexpr pi_memory_scope_capabilities PI_MEMORY_SCOPE_WORK_ITEM
Definition: pi.h:565
PI_MEM_ADVICE_UNKNOWN
@ PI_MEM_ADVICE_UNKNOWN
Definition: pi.h:461
PI_DEVICE_INFO_USM_CROSS_SHARED_SUPPORT
@ PI_DEVICE_INFO_USM_CROSS_SHARED_SUPPORT
Definition: pi.h:299
pi_device_binaries_struct
This struct is a record of all the device code that may be offloaded.
Definition: pi.h:895
pi_device_binary_struct::BinaryEnd
const unsigned char * BinaryEnd
Pointer to the target code end.
Definition: pi.h:832
PI_DEVICE_INFO_PLATFORM
@ PI_DEVICE_INFO_PLATFORM
Definition: pi.h:271
PI_COMMAND_TYPE_SVM_MAP
@ PI_COMMAND_TYPE_SVM_MAP
Definition: pi.h:445
PI_DEVICE_INFO_GPU_EU_COUNT_PER_SUBSLICE
@ PI_DEVICE_INFO_GPU_EU_COUNT_PER_SUBSLICE
Definition: pi.h:311
PI_MEM_SIZE
@ PI_MEM_SIZE
Definition: pi.h:954
PI_PROPERTY_TYPE_UNKNOWN
@ PI_PROPERTY_TYPE_UNKNOWN
Definition: pi.h:691
PI_IMAGE_CHANNEL_ORDER_RGBx
@ PI_IMAGE_CHANNEL_ORDER_RGBx
Definition: pi.h:488
PI_DEVICE_LOCAL_MEM_TYPE_LOCAL
@ PI_DEVICE_LOCAL_MEM_TYPE_LOCAL
Definition: pi.h:194
PI_PROGRAM_BUILD_INFO_OPTIONS
@ PI_PROGRAM_BUILD_INFO_OPTIONS
Definition: pi.h:151
PI_PROGRAM_BUILD_STATUS_SUCCESS
@ PI_PROGRAM_BUILD_STATUS_SUCCESS
Definition: pi.h:159
PI_COMMAND_TYPE_NATIVE_KERNEL
@ PI_COMMAND_TYPE_NATIVE_KERNEL
Definition: pi.h:432
piextDeviceCreateWithNativeHandle
pi_result piextDeviceCreateWithNativeHandle(pi_native_handle nativeHandle, pi_platform platform, pi_device *device)
Creates PI device object from a native handle.
Definition: pi_esimd_emulator.cpp:822
piKernelGetSubGroupInfo
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_esimd_emulator.cpp:1375
PI_USM_INDIRECT_ACCESS
@ PI_USM_INDIRECT_ACCESS
indicates that the kernel might access data through USM ptrs
Definition: pi.h:1327
PI_IMAGE_CHANNEL_TYPE_SNORM_INT16
@ PI_IMAGE_CHANNEL_TYPE_SNORM_INT16
Definition: pi.h:494
PI_DEVICE_INFO_ADDRESS_BITS
@ PI_DEVICE_INFO_ADDRESS_BITS
Definition: pi.h:234
PI_EVENT_RUNNING
@ PI_EVENT_RUNNING
Definition: pi.h:136
PI_INVALID_PROGRAM_EXECUTABLE
@ PI_INVALID_PROGRAM_EXECUTABLE
Definition: pi.h:99
_pi_image_desc::image_height
size_t image_height
Definition: pi.h:939
_pi_platform
A PI platform stores all known PI devices, in the CUDA plugin this is just a vector of available devi...
Definition: pi_cuda.hpp:63
PI_CONTEXT_INFO_NUM_DEVICES
@ PI_CONTEXT_INFO_NUM_DEVICES
Definition: pi.h:342
PI_DEVICE_TYPE_DEFAULT
@ PI_DEVICE_TYPE_DEFAULT
The default device available in the PI plugin.
Definition: pi.h:175
PI_IMAGE_CHANNEL_ORDER_BGRA
@ PI_IMAGE_CHANNEL_ORDER_BGRA
Definition: pi.h:481
PI_KERNEL_GROUP_INFO_PREFERRED_WORK_GROUP_SIZE_MULTIPLE
@ PI_KERNEL_GROUP_INFO_PREFERRED_WORK_GROUP_SIZE_MULTIPLE
Definition: pi.h:374
PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_DOUBLE
@ PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_DOUBLE
Definition: pi.h:219
PI_DEVICE_INFO_MAX_SAMPLERS
@ PI_DEVICE_INFO_MAX_SAMPLERS
Definition: pi.h:246
pi_image_offset_struct::y
size_t y
Definition: pi.h:875
PI_KERNEL_GROUP_INFO_LOCAL_MEM_SIZE
@ PI_KERNEL_GROUP_INFO_LOCAL_MEM_SIZE
Definition: pi.h:373
piEnqueueMemImageFill
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_esimd_emulator.cpp:1747
PI_DEVICE_INFO_MAX_NUM_SUB_GROUPS
@ PI_DEVICE_INFO_MAX_NUM_SUB_GROUPS
Definition: pi.h:291
_pi_usm_capability_query
_pi_usm_capability_query
Definition: pi.h:1623
PI_DEVICE_INFO_MEM_BASE_ADDR_ALIGN
@ PI_DEVICE_INFO_MEM_BASE_ADDR_ALIGN
Definition: pi.h:248
piSamplerCreate
pi_result piSamplerCreate(pi_context context, const pi_sampler_properties *sampler_properties, pi_sampler *result_sampler)
Definition: pi_esimd_emulator.cpp:1471
PI_QUEUE_ON_DEVICE_DEFAULT
constexpr pi_queue_properties PI_QUEUE_ON_DEVICE_DEFAULT
Definition: pi.h:629
piextEventCreateWithNativeHandle
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_esimd_emulator.cpp:1467
PI_DEVICE_INFO_BUILT_IN_KERNELS
@ PI_DEVICE_INFO_BUILT_IN_KERNELS
Definition: pi.h:270
_pi_offload_entry_struct::size
size_t size
Definition: pi.h:682
_pi_sampler_addressing_mode
_pi_sampler_addressing_mode
Definition: pi.h:528
piKernelRelease
pi_result piKernelRelease(pi_kernel kernel)
Definition: pi_esimd_emulator.cpp:1383
PI_DEVICE_INFO_USM_DEVICE_SUPPORT
@ PI_DEVICE_INFO_USM_DEVICE_SUPPORT
Definition: pi.h:296
PI_KERNEL_INFO_PROGRAM
@ PI_KERNEL_INFO_PROGRAM
Definition: pi.h:364
PI_COMMAND_TYPE_MAP_IMAGE
@ PI_COMMAND_TYPE_MAP_IMAGE
Definition: pi.h:435
PI_COMMAND_EXECUTION_FAILURE
@ PI_COMMAND_EXECUTION_FAILURE
PI_COMMAND_EXECUTION_FAILURE indicates an error occurred during command enqueue or execution.
Definition: pi.h:124
PI_PLATFORM_INFO_NAME
@ PI_PLATFORM_INFO_NAME
Definition: pi.h:143
piextUSMSharedAlloc
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_esimd_emulator.cpp:1850
PI_DEVICE_INFO_IMAGE_MAX_ARRAY_SIZE
@ PI_DEVICE_INFO_IMAGE_MAX_ARRAY_SIZE
Definition: pi.h:245
_pi_image_desc::image_slice_pitch
size_t image_slice_pitch
Definition: pi.h:943
PI_FP_ROUND_TO_INF
@ PI_FP_ROUND_TO_INF
Definition: pi.h:385
_pi_device_info
_pi_device_info
Definition: pi.h:198
PI_MEM_TYPE_DEVICE
@ PI_MEM_TYPE_DEVICE
Definition: pi.h:1651
PI_USM_ATOMIC_ACCESS
@ PI_USM_ATOMIC_ACCESS
Definition: pi.h:1635
pi_image_region_struct::width
size_t width
Definition: pi.h:883
PI_DEVICE_INFO_MAX_CONSTANT_BUFFER_SIZE
@ PI_DEVICE_INFO_MAX_CONSTANT_BUFFER_SIZE
Definition: pi.h:254
pi_image_offset_struct::x
size_t x
Definition: pi.h:874
_pi_image_info
_pi_image_info
Definition: pi.h:391
cl::sycl::info::queue
queue
Definition: info_desc.hpp:229
piEventSetStatus
pi_result piEventSetStatus(pi_event event, pi_int32 execution_status)
Definition: pi_esimd_emulator.cpp:1430
piextUSMDeviceAlloc
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_esimd_emulator.cpp:1845
PI_SAMPLER_PROPERTIES_ADDRESSING_MODE
constexpr pi_sampler_properties PI_SAMPLER_PROPERTIES_ADDRESSING_MODE
Definition: pi.h:552
PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_INT
@ PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_INT
Definition: pi.h:213
PI_SAMPLER_FILTER_MODE_NEAREST
@ PI_SAMPLER_FILTER_MODE_NEAREST
Definition: pi.h:537
_pi_kernel
Implementation of a PI Kernel for CUDA.
Definition: pi_cuda.hpp:626
PI_DEVICE_INFO_ERROR_CORRECTION_SUPPORT
@ PI_DEVICE_INFO_ERROR_CORRECTION_SUPPORT
Definition: pi.h:258
PI_DEVICE_MEM_CACHE_TYPE_NONE
@ PI_DEVICE_MEM_CACHE_TYPE_NONE
Definition: pi.h:188
piextDeviceGetNativeHandle
pi_result piextDeviceGetNativeHandle(pi_device device, pi_native_handle *nativeHandle)
Gets the native handle of a PI device object.
Definition: pi_esimd_emulator.cpp:818
PI_DEVICE_INFO_IMAGE2D_MAX_HEIGHT
@ PI_DEVICE_INFO_IMAGE2D_MAX_HEIGHT
Definition: pi.h:240
PI_INVALID_EVENT
@ PI_INVALID_EVENT
Definition: pi.h:104
PI_PROGRAM_BINARY_TYPE_NONE
@ PI_PROGRAM_BINARY_TYPE_NONE
Definition: pi.h:164
pi_buff_rect_offset_struct::y_scalar
size_t y_scalar
Definition: pi.h:857
PI_EVENT_INFO_COMMAND_TYPE
@ PI_EVENT_INFO_COMMAND_TYPE
Definition: pi.h:412
PI_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE
constexpr pi_queue_properties PI_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE
Definition: pi.h:624
piextContextCreateWithNativeHandle
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_esimd_emulator.cpp:872
piProgramGetInfo
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_esimd_emulator.cpp:1308
PI_DEVICE_INFO_GLOBAL_MEM_CACHE_SIZE
@ PI_DEVICE_INFO_GLOBAL_MEM_CACHE_SIZE
Definition: pi.h:252
PI_DEVICE_EXEC_CAPABILITIES_KERNEL
constexpr pi_device_exec_capabilities PI_DEVICE_EXEC_CAPABILITIES_KERNEL
Definition: pi.h:544
PI_COMMAND_TYPE_BARRIER
@ PI_COMMAND_TYPE_BARRIER
Definition: pi.h:439
PI_CONTEXT_INFO_DEVICES
@ PI_CONTEXT_INFO_DEVICES
Definition: pi.h:341
_pi_device_binary_property_set_struct::PropertiesBegin
pi_device_binary_property PropertiesBegin
Definition: pi.h:713
_pi_sampler_filter_mode
_pi_sampler_filter_mode
Definition: pi.h:536
_pi_queue_info
_pi_queue_info
Definition: pi.h:350
pi_buff_rect_region_struct::width_bytes
size_t width_bytes
Definition: pi.h:865
_pi_buffer_create_type
_pi_buffer_create_type
Definition: pi.h:510
PI_ERROR_UNKNOWN
@ PI_ERROR_UNKNOWN
Definition: pi.h:131
PI_MEM_ACCESS_READ_ONLY
constexpr pi_mem_flags PI_MEM_ACCESS_READ_ONLY
Definition: pi.h:585
piextUSMEnqueueMemcpy
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_esimd_emulator.cpp:1922
piMemBufferPartition
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_esimd_emulator.cpp:1753
PI_MEM_ALLOC_DEVICE_READ_ONLY
constexpr pi_usm_mem_properties PI_MEM_ALLOC_DEVICE_READ_ONLY
Definition: pi.h:616
PI_PROGRAM_BINARY_TYPE_EXECUTABLE
@ PI_PROGRAM_BINARY_TYPE_EXECUTABLE
Definition: pi.h:168
export.hpp
PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_HALF
@ PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_HALF
Definition: pi.h:232
piextUSMEnqueueMemAdvise
pi_result piextUSMEnqueueMemAdvise(pi_queue queue, const void *ptr, size_t length, pi_mem_advice advice, pi_event *event)
USM Memadvise API.
Definition: pi_esimd_emulator.cpp:1927
pi_device_binary_type
uint8_t pi_device_binary_type
Types of device binary.
Definition: pi.h:720
PI_DEVICE_BINARY_OFFLOAD_KIND_SYCL
static const uint8_t PI_DEVICE_BINARY_OFFLOAD_KIND_SYCL
Definition: pi.h:735
piQueueCreate
pi_result piQueueCreate(pi_context context, pi_device device, pi_queue_properties properties, pi_queue *queue)
Definition: pi_esimd_emulator.cpp:930
PI_DEVICE_INFO_IMAGE_MAX_BUFFER_SIZE
@ PI_DEVICE_INFO_IMAGE_MAX_BUFFER_SIZE
Definition: pi.h:244
PI_DEVICE_INFO_LOCAL_MEM_SIZE
@ PI_DEVICE_INFO_LOCAL_MEM_SIZE
Definition: pi.h:257
PI_MEMORY_ORDER_RELAXED
constexpr pi_memory_order_capabilities PI_MEMORY_ORDER_RELAXED
Definition: pi.h:558
PI_IMAGE_CHANNEL_ORDER_LUMINANCE
@ PI_IMAGE_CHANNEL_ORDER_LUMINANCE
Definition: pi.h:485
piextProgramCreateWithNativeHandle
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_esimd_emulator.cpp:1344
PI_DEVICE_LOCAL_MEM_TYPE_GLOBAL
@ PI_DEVICE_LOCAL_MEM_TYPE_GLOBAL
Definition: pi.h:195
cl::sycl::length
float length(T p) __NOEXC
Definition: builtins.hpp:1032
piEventsWait
pi_result piEventsWait(pi_uint32 num_events, const pi_event *event_list)
Definition: pi_esimd_emulator.cpp:1407
piContextRelease
pi_result piContextRelease(pi_context context)
Definition: pi_esimd_emulator.cpp:888
PI_USM_MIGRATION_TBD0
@ PI_USM_MIGRATION_TBD0
Definition: pi.h:1659
_pi_queue
PI queue mapping on to CUstream objects.
Definition: pi_cuda.hpp:378
PI_MEM_ADVICE_CUDA_SET_ACCESSED_BY
@ PI_MEM_ADVICE_CUDA_SET_ACCESSED_BY
Definition: pi.h:466
PI_BUILD_PROGRAM_FAILURE
@ PI_BUILD_PROGRAM_FAILURE
Definition: pi.h:107
PI_MEM_ALLOC_INITIAL_PLACEMENT_HOST
constexpr pi_usm_mem_properties PI_MEM_ALLOC_INITIAL_PLACEMENT_HOST
Definition: pi.h:613
piProgramRelease
pi_result piProgramRelease(pi_program program)
Definition: pi_esimd_emulator.cpp:1338
PI_MEM_ADVICE_CUDA_SET_PREFERRED_LOCATION
@ PI_MEM_ADVICE_CUDA_SET_PREFERRED_LOCATION
Definition: pi.h:464
PI_IMAGE_CHANNEL_TYPE_SIGNED_INT16
@ PI_IMAGE_CHANNEL_TYPE_SIGNED_INT16
Definition: pi.h:501
_pi_device_binary_property_struct::ValAddr
void * ValAddr
Definition: pi.h:703
PI_IMAGE_CHANNEL_TYPE_SIGNED_INT32
@ PI_IMAGE_CHANNEL_TYPE_SIGNED_INT32
Definition: pi.h:502
pi_image_region_struct::depth
size_t depth
Definition: pi.h:885
pi_device_binaries_struct::HostEntriesBegin
_pi_offload_entry * HostEntriesBegin
the offload entry table (not used, for compatibility with OpenMP)
Definition: pi.h:905
PI_FALSE
const pi_bool PI_FALSE
Definition: pi.h:515
PI_MAP_READ
constexpr pi_map_flags PI_MAP_READ
Definition: pi.h:593
PI_DEVICE_TYPE_GPU
@ PI_DEVICE_TYPE_GPU
A PI device that is a GPU.
Definition: pi.h:182
pi_uint32
uint32_t pi_uint32
Definition: pi.h:72
_pi_image_desc::image_depth
size_t image_depth
Definition: pi.h:940
PI_COMMAND_TYPE_MEM_BUFFER_READ_RECT
@ PI_COMMAND_TYPE_MEM_BUFFER_READ_RECT
Definition: pi.h:424
piEnqueueMemBufferReadRect
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_esimd_emulator.cpp:1548
cl::sycl::info::event_command_status
event_command_status
Definition: info_desc.hpp:294
pi_buff_rect_region_struct
Definition: pi.h:864
piMemRelease
pi_result piMemRelease(pi_mem mem)
Definition: pi_esimd_emulator.cpp:1093
pi_device_binary_struct
This struct is a record of the device binary information.
Definition: pi.h:798
piEnqueueMemBufferCopyRect
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_esimd_emulator.cpp:1576
piextContextSetExtendedDeleter
pi_result piextContextSetExtendedDeleter(pi_context context, pi_context_extended_deleter func, void *user_data)
Definition: pi_esimd_emulator.cpp:863
PI_DEVICE_INFO_LINKER_AVAILABLE
@ PI_DEVICE_INFO_LINKER_AVAILABLE
Definition: pi.h:265
piProgramGetBuildInfo
pi_result piProgramGetBuildInfo(pi_program program, pi_device device, cl_program_build_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret)
Definition: pi_esimd_emulator.cpp:1331
PI_DEVICE_INFO_EXECUTION_CAPABILITIES
@ PI_DEVICE_INFO_EXECUTION_CAPABILITIES
Definition: pi.h:266
cl.h
PI_DEVICE_INFO_PROFILING_TIMER_RESOLUTION
@ PI_DEVICE_INFO_PROFILING_TIMER_RESOLUTION
Definition: pi.h:260
pi_device_binary_struct::LinkOptions
const char * LinkOptions
a null-terminated string; target- and compiler-specific options which are suggested to use to "link" ...
Definition: pi.h:824
_pi_kernel_exec_info
_pi_kernel_exec_info
Definition: pi.h:1325
piclProgramCreateWithSource
pi_result piclProgramCreateWithSource(pi_context context, pi_uint32 count, const char **strings, const size_t *lengths, pi_program *ret_program)
Definition: pi_esimd_emulator.cpp:1303
PI_MEM_TYPE_IMAGE2D
@ PI_MEM_TYPE_IMAGE2D
Definition: pi.h:451
PI_COMMAND_TYPE_IMAGE_COPY
@ PI_COMMAND_TYPE_IMAGE_COPY
Definition: pi.h:431
PI_KERNEL_INFO_CONTEXT
@ PI_KERNEL_INFO_CONTEXT
Definition: pi.h:363
piEnqueueMemBufferWrite
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_esimd_emulator.cpp:1556
PI_PROGRAM_BUILD_INFO_STATUS
@ PI_PROGRAM_BUILD_INFO_STATUS
Definition: pi.h:150
PI_DEVICE_MEM_CACHE_TYPE_READ_ONLY_CACHE
@ PI_DEVICE_MEM_CACHE_TYPE_READ_ONLY_CACHE
Definition: pi.h:189
pi_device_binaries_struct::NumDeviceBinaries
uint16_t NumDeviceBinaries
Number of device binaries in this descriptor.
Definition: pi.h:901
piProgramCreateWithBinary
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_esimd_emulator.cpp:1290
piKernelSetExecInfo
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_esimd_emulator.cpp:1937
PI_DEVICE_INFO_HALF_FP_CONFIG
@ PI_DEVICE_INFO_HALF_FP_CONFIG
Definition: pi.h:206
PI_MISALIGNED_SUB_BUFFER_OFFSET
@ PI_MISALIGNED_SUB_BUFFER_OFFSET
Definition: pi.h:106
PI_MEMORY_SCOPE_DEVICE
constexpr pi_memory_scope_capabilities PI_MEMORY_SCOPE_DEVICE
Definition: pi.h:568
PI_DEVICE_BINARY_TYPE_NATIVE
static constexpr pi_device_binary_type PI_DEVICE_BINARY_TYPE_NATIVE
Definition: pi.h:724
PI_IMAGE_CHANNEL_ORDER_R
@ PI_IMAGE_CHANNEL_ORDER_R
Definition: pi.h:476
pi_mem_flags
pi_bitfield pi_mem_flags
Definition: pi.h:582
PI_MEMORY_SCOPE_SYSTEM
constexpr pi_memory_scope_capabilities PI_MEMORY_SCOPE_SYSTEM
Definition: pi.h:569
_pi_event_status
_pi_event_status
Definition: pi.h:134
piKernelGetGroupInfo
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_esimd_emulator.cpp:1370
_pi_image_channel_order
_pi_image_channel_order
Definition: pi.h:474
PI_IMAGE_CHANNEL_TYPE_FLOAT
@ PI_IMAGE_CHANNEL_TYPE_FLOAT
Definition: pi.h:507
piEnqueueMemImageRead
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_esimd_emulator.cpp:1678
PI_USM_CONCURRENT_ACCESS
@ PI_USM_CONCURRENT_ACCESS
Definition: pi.h:1636
PI_COMMAND_TYPE_SVM_MEMCPY
@ PI_COMMAND_TYPE_SVM_MEMCPY
Definition: pi.h:443
pi_property_type
pi_property_type
Definition: pi.h:690
PI_MEM_TYPE_SHARED
@ PI_MEM_TYPE_SHARED
Definition: pi.h:1652
PI_DEVICE_INFO_VENDOR
@ PI_DEVICE_INFO_VENDOR
Definition: pi.h:275
pi_context_extended_deleter
void(* pi_context_extended_deleter)(void *user_data)
Definition: pi.h:1091
PI_MEM_TYPE_IMAGE1D_ARRAY
@ PI_MEM_TYPE_IMAGE1D_ARRAY
Definition: pi.h:455
PI_INVALID_QUEUE_PROPERTIES
@ PI_INVALID_QUEUE_PROPERTIES
Definition: pi.h:90
pi_device_binary_struct::Format
uint8_t Format
format of the binary data - SPIR-V, LLVM IR bitcode,...
Definition: pi.h:806
PI_DEVICE_INFO_QUEUE_ON_DEVICE_PROPERTIES
@ PI_DEVICE_INFO_QUEUE_ON_DEVICE_PROPERTIES
Definition: pi.h:267
PI_PROPERTY_TYPE_BYTE_ARRAY
@ PI_PROPERTY_TYPE_BYTE_ARRAY
Definition: pi.h:693
cl::sycl::host_ptr
multi_ptr< ElementType, access::address_space::global_host_space > host_ptr
Definition: pointers.hpp:32
PI_DEVICE_TYPE_ACC
@ PI_DEVICE_TYPE_ACC
A PI device that is a dedicated accelerator.
Definition: pi.h:183
PI_KERNEL_GROUP_INFO_NUM_REGS
@ PI_KERNEL_GROUP_INFO_NUM_REGS
Definition: pi.h:378
PI_MEMORY_SCOPE_SUB_GROUP
constexpr pi_memory_scope_capabilities PI_MEMORY_SCOPE_SUB_GROUP
Definition: pi.h:566
PI_KERNEL_MAX_SUB_GROUP_SIZE
@ PI_KERNEL_MAX_SUB_GROUP_SIZE
Definition: pi.h:402
PI_IMAGE_INFO_DEPTH
@ PI_IMAGE_INFO_DEPTH
Definition: pi.h:398
piQueueRetain
pi_result piQueueRetain(pi_queue command_queue)
Definition: pi_esimd_emulator.cpp:962
PI_DEVICE_INFO_USM_SYSTEM_SHARED_SUPPORT
@ PI_DEVICE_INFO_USM_SYSTEM_SHARED_SUPPORT
Definition: pi.h:301
PI_DEVICE_NOT_FOUND
@ PI_DEVICE_NOT_FOUND
Definition: pi.h:111
PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_SHORT
@ PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_SHORT
Definition: pi.h:211
PI_MEMORY_ORDER_SEQ_CST
constexpr pi_memory_order_capabilities PI_MEMORY_ORDER_SEQ_CST
Definition: pi.h:562
PI_MEM_TYPE_BUFFER
@ PI_MEM_TYPE_BUFFER
Definition: pi.h:450
piEnqueueEventsWaitWithBarrier
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_esimd_emulator.cpp:1490
PI_SAMPLER_INFO_CONTEXT
@ PI_SAMPLER_INFO_CONTEXT
Definition: pi.h:519
_pi_program_binary_type
_pi_program_binary_type
Definition: pi.h:163
piKernelRetain
pi_result piKernelRetain(pi_kernel kernel)
Definition: pi_esimd_emulator.cpp:1381
piDeviceGetInfo
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_esimd_emulator.cpp:591
piEventSetCallback
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)
PI_DEVICE_INFO_GLOBAL_MEM_CACHELINE_SIZE
@ PI_DEVICE_INFO_GLOBAL_MEM_CACHELINE_SIZE
Definition: pi.h:250
PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG
@ PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG
Definition: pi.h:227
pi_device_binary_struct::Kind
uint8_t Kind
the type of offload model the binary employs; must be 4 for SYCL
Definition: pi.h:804
PI_MEMORY_ORDER_RELEASE
constexpr pi_memory_order_capabilities PI_MEMORY_ORDER_RELEASE
Definition: pi.h:560
piEnqueueMemBufferFill
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_esimd_emulator.cpp:1584
PI_DEVICE_INFO_USM_HOST_SUPPORT
@ PI_DEVICE_INFO_USM_HOST_SUPPORT
Definition: pi.h:295
piSamplerRetain
pi_result piSamplerRetain(pi_sampler sampler)
Definition: pi_esimd_emulator.cpp:1481
PI_INVALID_QUEUE
@ PI_INVALID_QUEUE
Definition: pi.h:96
piextPluginGetOpaqueData
pi_result piextPluginGetOpaqueData(void *opaque_data_param, void **opaque_data_return)
API to get Plugin internal data, opaque to SYCL RT.
Definition: pi_esimd_emulator.cpp:1969
piMemImageGetInfo
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_esimd_emulator.cpp:1674
pi_device_binary_property_set
_pi_device_binary_property_set_struct * pi_device_binary_property_set
Definition: pi.h:717
PI_MEM_ADVICE_CUDA_SET_READ_MOSTLY
@ PI_MEM_ADVICE_CUDA_SET_READ_MOSTLY
Definition: pi.h:462
PI_MEM_FLAGS_HOST_PTR_USE
constexpr pi_mem_flags PI_MEM_FLAGS_HOST_PTR_USE
Definition: pi.h:587
piextEventGetNativeHandle
pi_result piextEventGetNativeHandle(pi_event event, pi_native_handle *nativeHandle)
Gets the native handle of a PI event object.
Definition: pi_esimd_emulator.cpp:1463
PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_FLOAT
@ PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_FLOAT
Definition: pi.h:228
PI_PROGRAM_INFO_REFERENCE_COUNT
@ PI_PROGRAM_INFO_REFERENCE_COUNT
Definition: pi.h:329
PI_IMAGE_CHANNEL_ORDER_sRGBA
@ PI_IMAGE_CHANNEL_ORDER_sRGBA
Definition: pi.h:489
PI_DEVICE_PARTITION_BY_AFFINITY_DOMAIN
static constexpr pi_device_partition_property PI_DEVICE_PARTITION_BY_AFFINITY_DOMAIN
Definition: pi.h:667
piextPlatformCreateWithNativeHandle
pi_result piextPlatformCreateWithNativeHandle(pi_native_handle nativeHandle, pi_platform *platform)
Creates PI platform object from a native handle.
Definition: pi_esimd_emulator.cpp:475
PI_MEM_TYPE_UNKNOWN
@ PI_MEM_TYPE_UNKNOWN
Definition: pi.h:1649
PI_DEVICE_INFO_PARENT_DEVICE
@ PI_DEVICE_INFO_PARENT_DEVICE
Definition: pi.h:284
PI_PLATFORM_INFO_VERSION
@ PI_PLATFORM_INFO_VERSION
Definition: pi.h:146
_pi_image_desc::buffer
pi_mem buffer
Definition: pi.h:946
PI_IMAGE_CHANNEL_TYPE_UNSIGNED_INT16
@ PI_IMAGE_CHANNEL_TYPE_UNSIGNED_INT16
Definition: pi.h:504
pi_uint64
uint64_t pi_uint64
Definition: pi.h:73
PI_COMMAND_TYPE_MEM_BUFFER_WRITE
@ PI_COMMAND_TYPE_MEM_BUFFER_WRITE
Definition: pi.h:420
PI_DEVICE_INFO_PARTITION_TYPE
@ PI_DEVICE_INFO_PARTITION_TYPE
Definition: pi.h:290
PI_COMMAND_TYPE_MEM_BUFFER_COPY
@ PI_COMMAND_TYPE_MEM_BUFFER_COPY
Definition: pi.h:421
_pi_event_info
_pi_event_info
Definition: pi.h:409
PI_MEM_PROPERTIES_ALLOC_BUFFER_LOCATION
constexpr pi_mem_properties PI_MEM_PROPERTIES_ALLOC_BUFFER_LOCATION
Definition: pi.h:602
pi_memory_scope_capabilities
pi_bitfield pi_memory_scope_capabilities
Definition: pi.h:564
piextUSMHostAlloc
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_esimd_emulator.cpp:1840
PI_IMAGE_INFO_WIDTH
@ PI_IMAGE_INFO_WIDTH
Definition: pi.h:396
_pi_sampler_info
_pi_sampler_info
Definition: pi.h:517
_pi_device_binary_property_struct
Definition: pi.h:701
pi_mem_properties
pi_bitfield pi_mem_properties
Definition: pi.h:600
_pi_program
Implementation of PI Program on CUDA Module object.
Definition: pi_cuda.hpp:571
PI_INVALID_KERNEL_NAME
@ PI_INVALID_KERNEL_NAME
Definition: pi.h:87
PI_CONTEXT_INFO_ATOMIC_MEMORY_SCOPE_CAPABILITIES
@ PI_CONTEXT_INFO_ATOMIC_MEMORY_SCOPE_CAPABILITIES
Definition: pi.h:347
PI_QUEUE_INFO_DEVICE
@ PI_QUEUE_INFO_DEVICE
Definition: pi.h:352
PI_FP_DENORM
@ PI_FP_DENORM
Definition: pi.h:387
PI_PROGRAM_BUILD_STATUS_ERROR
@ PI_PROGRAM_BUILD_STATUS_ERROR
Definition: pi.h:158
_pi_sampler
Implementation of samplers for CUDA.
Definition: pi_cuda.hpp:797
PI_DEVICE_INFO_PRINTF_BUFFER_SIZE
@ PI_DEVICE_INFO_PRINTF_BUFFER_SIZE
Definition: pi.h:281
PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_DOUBLE
@ PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_DOUBLE
Definition: pi.h:230
PI_INVALID_IMAGE_SIZE
@ PI_INVALID_IMAGE_SIZE
Definition: pi.h:115
PI_COMMAND_TYPE_IMAGE_READ
@ PI_COMMAND_TYPE_IMAGE_READ
Definition: pi.h:429
piextUSMGetMemAllocInfo
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_esimd_emulator.cpp:1932
pi_device_binary_struct::CompileOptions
const char * CompileOptions
a null-terminated string; target- and compiler-specific options which are suggested to use to "compil...
Definition: pi.h:821
PI_USM_PTRS
@ PI_USM_PTRS
provides an explicit list of pointers that the kernel will access
Definition: pi.h:1329
piDeviceRelease
pi_result piDeviceRelease(pi_device device)
Definition: pi_esimd_emulator.cpp:581
pi_device_exec_capabilities
pi_bitfield pi_device_exec_capabilities
Definition: pi.h:543
PI_DEVICE_INFO_UUID
@ PI_DEVICE_INFO_UUID
Definition: pi.h:304
PI_PLATFORM_INFO_PROFILE
@ PI_PLATFORM_INFO_PROFILE
Definition: pi.h:144
PI_MEM_ADVICE_CUDA_UNSET_PREFERRED_LOCATION_HOST
@ PI_MEM_ADVICE_CUDA_UNSET_PREFERRED_LOCATION_HOST
Definition: pi.h:469
PI_KERNEL_MAX_NUM_SUB_GROUPS
@ PI_KERNEL_MAX_NUM_SUB_GROUPS
Definition: pi.h:403
piextUSMEnqueueMemset
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_esimd_emulator.cpp:1917
_pi_device_binary_property_struct::ValSize
uint64_t ValSize
Definition: pi.h:705
PI_DEVICE_INFO_MAX_CONSTANT_ARGS
@ PI_DEVICE_INFO_MAX_CONSTANT_ARGS
Definition: pi.h:255
PI_DEVICE_INFO_PCI_ADDRESS
@ PI_DEVICE_INFO_PCI_ADDRESS
Definition: pi.h:306
PI_PROPERTY_TYPE_UINT32
@ PI_PROPERTY_TYPE_UINT32
Definition: pi.h:692
pi_native_handle
uintptr_t pi_native_handle
Definition: pi.h:76
PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_SHORT
@ PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_SHORT
Definition: pi.h:224
PI_DEVICE_INFO_GLOBAL_MEM_SIZE
@ PI_DEVICE_INFO_GLOBAL_MEM_SIZE
Definition: pi.h:253
piQueueFinish
pi_result piQueueFinish(pi_queue command_queue)
Definition: pi_esimd_emulator.cpp:984
piContextRetain
pi_result piContextRetain(pi_context context)
Definition: pi_esimd_emulator.cpp:878
pi_sampler_properties
pi_bitfield pi_sampler_properties
Definition: pi.h:549
piextKernelSetArgSampler
pi_result piextKernelSetArgSampler(pi_kernel kernel, pi_uint32 arg_index, const pi_sampler *arg_value)
Definition: pi_esimd_emulator.cpp:1362
PI_KERNEL_INFO_FUNCTION_NAME
@ PI_KERNEL_INFO_FUNCTION_NAME
Definition: pi.h:360
PI_DEVICE_MEM_CACHE_TYPE_READ_WRITE_CACHE
@ PI_DEVICE_MEM_CACHE_TYPE_READ_WRITE_CACHE
Definition: pi.h:190
PI_MEM_FLAGS_ACCESS_RW
constexpr pi_mem_flags PI_MEM_FLAGS_ACCESS_RW
Definition: pi.h:584
piextKernelSetArgMemObj
pi_result piextKernelSetArgMemObj(pi_kernel kernel, pi_uint32 arg_index, const pi_mem *arg_value)
Definition: pi_esimd_emulator.cpp:1357
PI_IMAGE_CHANNEL_ORDER_RGx
@ PI_IMAGE_CHANNEL_ORDER_RGx
Definition: pi.h:487
PI_QUEUE_INFO_DEVICE_DEFAULT
@ PI_QUEUE_INFO_DEVICE_DEFAULT
Definition: pi.h:353
piMemImageCreate
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_esimd_emulator.cpp:1158
_pi_image_format
Definition: pi.h:931
PI_EVENT_COMPLETE
@ PI_EVENT_COMPLETE
Definition: pi.h:135
PI_IMAGE_CHANNEL_TYPE_UNORM_INT_101010
@ PI_IMAGE_CHANNEL_TYPE_UNORM_INT_101010
Definition: pi.h:499
PI_COMMAND_TYPE_NDRANGE_KERNEL
@ PI_COMMAND_TYPE_NDRANGE_KERNEL
Definition: pi.h:418
_pi_plugin::Targets
char * Targets
Definition: pi.h:1833
PI_PLATFORM_INFO_VENDOR
@ PI_PLATFORM_INFO_VENDOR
Definition: pi.h:145
_pi_kernel_info
_pi_kernel_info
Definition: pi.h:359
PI_INVALID_CONTEXT
@ PI_INVALID_CONTEXT
Definition: pi.h:92
PI_MEM_ALLOC_FLAGS
constexpr pi_usm_mem_properties PI_MEM_ALLOC_FLAGS
Definition: pi.h:608
PI_FUNCTION_ADDRESS_IS_NOT_AVAILABLE
@ PI_FUNCTION_ADDRESS_IS_NOT_AVAILABLE
PI_FUNCTION_ADDRESS_IS_NOT_AVAILABLE indicates a fallback method determines the function exists but i...
Definition: pi.h:127
PI_DEVICE_INFO_USM_SINGLE_SHARED_SUPPORT
@ PI_DEVICE_INFO_USM_SINGLE_SHARED_SUPPORT
Definition: pi.h:297
piPlatformsGet
pi_result piPlatformsGet(pi_uint32 num_entries, pi_platform *platforms, pi_uint32 *num_platforms)
Definition: pi_esimd_emulator.cpp:394
PI_DEVICE_INFO_ATOMIC_MEMORY_SCOPE_CAPABILITIES
@ PI_DEVICE_INFO_ATOMIC_MEMORY_SCOPE_CAPABILITIES
Definition: pi.h:318
PI_IMAGE_CHANNEL_ORDER_RGBA
@ PI_IMAGE_CHANNEL_ORDER_RGBA
Definition: pi.h:480
PI_MEMORY_SCOPE_WORK_GROUP
constexpr pi_memory_scope_capabilities PI_MEMORY_SCOPE_WORK_GROUP
Definition: pi.h:567
PI_DEVICE_TYPE_CPU
@ PI_DEVICE_TYPE_CPU
A PI device that is the host processor.
Definition: pi.h:180
PI_MEM_ALLOC_BASE_PTR
@ PI_MEM_ALLOC_BASE_PTR
Definition: pi.h:1643
PI_DEVICE_INFO_QUEUE_PROPERTIES
@ PI_DEVICE_INFO_QUEUE_PROPERTIES
Definition: pi.h:208
PI_DEVICE_INFO_PARTITION_MAX_SUB_DEVICES
@ PI_DEVICE_INFO_PARTITION_MAX_SUB_DEVICES
Definition: pi.h:286
PI_SAMPLER_INFO_MIP_FILTER_MODE
@ PI_SAMPLER_INFO_MIP_FILTER_MODE
Definition: pi.h:523
PI_SAMPLER_ADDRESSING_MODE_CLAMP_TO_EDGE
@ PI_SAMPLER_ADDRESSING_MODE_CLAMP_TO_EDGE
Definition: pi.h:531
PI_EXT_ONEAPI_DEVICE_INFO_MAX_WORK_GROUPS_3D
@ PI_EXT_ONEAPI_DEVICE_INFO_MAX_WORK_GROUPS_3D
Definition: pi.h:324
PI_PROGRAM_INFO_KERNEL_NAMES
@ PI_PROGRAM_INFO_KERNEL_NAMES
Definition: pi.h:337
PI_KERNEL_GROUP_INFO_GLOBAL_WORK_SIZE
@ PI_KERNEL_GROUP_INFO_GLOBAL_WORK_SIZE
Definition: pi.h:369
PI_QUEUE_INFO_SIZE
@ PI_QUEUE_INFO_SIZE
Definition: pi.h:356
PI_MEM_TYPE_IMAGE1D_BUFFER
@ PI_MEM_TYPE_IMAGE1D_BUFFER
Definition: pi.h:456
PI_INVALID_IMAGE_FORMAT_DESCRIPTOR
@ PI_INVALID_IMAGE_FORMAT_DESCRIPTOR
Definition: pi.h:117
piEnqueueMemBufferMap
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_esimd_emulator.cpp:1590
PI_SAMPLER_ADDRESSING_MODE_NONE
@ PI_SAMPLER_ADDRESSING_MODE_NONE
Definition: pi.h:533
PI_IMAGE_CHANNEL_ORDER_ABGR
@ PI_IMAGE_CHANNEL_ORDER_ABGR
Definition: pi.h:483
PI_MEM_CONTEXT
@ PI_MEM_CONTEXT
Definition: pi.h:953
PI_EVENT_QUEUED
@ PI_EVENT_QUEUED
Definition: pi.h:138
PI_PROGRAM_BINARY_TYPE_COMPILED_OBJECT
@ PI_PROGRAM_BINARY_TYPE_COMPILED_OBJECT
Definition: pi.h:165
piextMemGetNativeHandle
pi_result piextMemGetNativeHandle(pi_mem mem, pi_native_handle *nativeHandle)
Gets the native handle of a PI mem object.
Definition: pi_esimd_emulator.cpp:1277
pi_buffer_region_struct::size
size_t size
Definition: pi.h:849
_pi_image_desc::image_width
size_t image_width
Definition: pi.h:938
PI_DEVICE_INFO_SINGLE_FP_CONFIG
@ PI_DEVICE_INFO_SINGLE_FP_CONFIG
Definition: pi.h:205
PI_COMMAND_TYPE_MEM_BUFFER_WRITE_RECT
@ PI_COMMAND_TYPE_MEM_BUFFER_WRITE_RECT
Definition: pi.h:425
PI_INVALID_KERNEL_ARGS
@ PI_INVALID_KERNEL_ARGS
Definition: pi.h:114
piEnqueueMemBufferRead
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_esimd_emulator.cpp:1495
PI_INVALID_VALUE
@ PI_INVALID_VALUE
Definition: pi.h:91
_pi_image_channel_type
_pi_image_channel_type
Definition: pi.h:492
PI_DEVICE_INFO_BUILD_ON_SUBDEVICE
@ PI_DEVICE_INFO_BUILD_ON_SUBDEVICE
Definition: pi.h:315
PI_USM_SYSTEM_SHARED_SUPPORT
@ PI_USM_SYSTEM_SHARED_SUPPORT
Definition: pi.h:1630
PI_DEVICE_INFO_MAX_WORK_ITEM_DIMENSIONS
@ PI_DEVICE_INFO_MAX_WORK_ITEM_DIMENSIONS
Definition: pi.h:202
piKernelGetInfo
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_esimd_emulator.cpp:1366
PI_DEVICE_INFO_LOCAL_MEM_TYPE
@ PI_DEVICE_INFO_LOCAL_MEM_TYPE
Definition: pi.h:256
PI_DEVICE_INFO_IMAGE3D_MAX_DEPTH
@ PI_DEVICE_INFO_IMAGE3D_MAX_DEPTH
Definition: pi.h:243
PI_DEVICE_INFO_COMPILER_AVAILABLE
@ PI_DEVICE_INFO_COMPILER_AVAILABLE
Definition: pi.h:264
PI_EXT_ONEAPI_DEVICE_INFO_CUDA_ASYNC_BARRIER
@ PI_EXT_ONEAPI_DEVICE_INFO_CUDA_ASYNC_BARRIER
Definition: pi.h:325
piEventGetInfo
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_esimd_emulator.cpp:1387
piEnqueueEventsWait
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_esimd_emulator.cpp:1485
piMemRetain
pi_result piMemRetain(pi_mem mem)
Definition: pi_esimd_emulator.cpp:1085
pi_image_offset_struct::z
size_t z
Definition: pi.h:876
PI_DEVICE_INFO_VERSION
@ PI_DEVICE_INFO_VERSION
Definition: pi.h:278
pi_buffer_region_struct::origin
size_t origin
Definition: pi.h:848
cl::sycl::info::event
event
Definition: info_desc.hpp:289
PI_DEVICE_INFO_MAX_MEM_BANDWIDTH
@ PI_DEVICE_INFO_MAX_MEM_BANDWIDTH
Definition: pi.h:312
PI_IMAGE_CHANNEL_TYPE_UNSIGNED_INT8
@ PI_IMAGE_CHANNEL_TYPE_UNSIGNED_INT8
Definition: pi.h:503
piextUSMEnqueuePrefetch
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_esimd_emulator.cpp:1963
PI_IMAGE_CHANNEL_TYPE_UNSIGNED_INT32
@ PI_IMAGE_CHANNEL_TYPE_UNSIGNED_INT32
Definition: pi.h:505
PI_MEMORY_ORDER_ACQ_REL
constexpr pi_memory_order_capabilities PI_MEMORY_ORDER_ACQ_REL
Definition: pi.h:561
pi_queue_properties
pi_bitfield pi_queue_properties
Definition: pi.h:623
PI_EXT_ONEAPI_DEVICE_INFO_MAX_WORK_GROUPS_2D
@ PI_EXT_ONEAPI_DEVICE_INFO_MAX_WORK_GROUPS_2D
Definition: pi.h:323
PI_DEVICE_INFO_ATOMIC_64
@ PI_DEVICE_INFO_ATOMIC_64
Definition: pi.h:316
_pi_image_desc::image_row_pitch
size_t image_row_pitch
Definition: pi.h:942
PI_DEVICE_INFO_MAX_WRITE_IMAGE_ARGS
@ PI_DEVICE_INFO_MAX_WRITE_IMAGE_ARGS
Definition: pi.h:238
_pi_platform_info
_pi_platform_info
Definition: pi.h:141
PI_DEVICE_AFFINITY_DOMAIN_NUMA
static constexpr pi_device_affinity_domain PI_DEVICE_AFFINITY_DOMAIN_NUMA
Definition: pi.h:672
PI_DEVICE_INFO_BACKEND_VERSION
@ PI_DEVICE_INFO_BACKEND_VERSION
Definition: pi.h:320
PI_MEM_FLAGS_HOST_PTR_ALLOC
constexpr pi_mem_flags PI_MEM_FLAGS_HOST_PTR_ALLOC
Definition: pi.h:589
piEventCreate
pi_result piEventCreate(pi_context context, pi_event *ret_event)
Definition: pi_esimd_emulator.cpp:1385
PI_INVALID_WORK_GROUP_SIZE
@ PI_INVALID_WORK_GROUP_SIZE
Definition: pi.h:108
PI_MEM_PROPERTIES_CHANNEL
constexpr pi_mem_properties PI_MEM_PROPERTIES_CHANNEL
Definition: pi.h:601
pi_buffer_region_struct
Definition: pi.h:847
PI_IMAGE_CHANNEL_TYPE_UNORM_SHORT_555
@ PI_IMAGE_CHANNEL_TYPE_UNORM_SHORT_555
Definition: pi.h:498
piContextCreate
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_IMAGE_CHANNEL_ORDER_ARGB
@ PI_IMAGE_CHANNEL_ORDER_ARGB
Definition: pi.h:482
piEventRetain
pi_result piEventRetain(pi_event event)
Definition: pi_esimd_emulator.cpp:1432
_pi_image_desc
Definition: pi.h:936
PI_COMMAND_TYPE_MEM_BUFFER_FILL
@ PI_COMMAND_TYPE_MEM_BUFFER_FILL
Definition: pi.h:428
piextPlatformGetNativeHandle
pi_result piextPlatformGetNativeHandle(pi_platform platform, pi_native_handle *nativeHandle)
Gets the native handle of a PI platform object.
Definition: pi_esimd_emulator.cpp:471
PI_DEVICE_INFO_ENDIAN_LITTLE
@ PI_DEVICE_INFO_ENDIAN_LITTLE
Definition: pi.h:262
PI_PROGRAM_BUILD_STATUS_NONE
@ PI_PROGRAM_BUILD_STATUS_NONE
Definition: pi.h:157
piQueueGetInfo
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_esimd_emulator.cpp:958
PI_USM_DEVICE_SUPPORT
@ PI_USM_DEVICE_SUPPORT
Definition: pi.h:1625
PI_INVALID_WORK_ITEM_SIZE
@ PI_INVALID_WORK_ITEM_SIZE
Definition: pi.h:112
_pi_event
PI Event mapping to CUevent.
Definition: pi_cuda.hpp:460
PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_INT
@ PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_INT
Definition: pi.h:226
PI_DEVICE_INFO_MAX_READ_IMAGE_ARGS
@ PI_DEVICE_INFO_MAX_READ_IMAGE_ARGS
Definition: pi.h:237
pi_device_binary_property
_pi_device_binary_property_struct * pi_device_binary_property
Definition: pi.h:708
PI_DEVICE_INFO_GPU_SUBSLICES_PER_SLICE
@ PI_DEVICE_INFO_GPU_SUBSLICES_PER_SLICE
Definition: pi.h:310
PI_COMMAND_TYPE_MIGRATE_MEM_OBJECTS
@ PI_COMMAND_TYPE_MIGRATE_MEM_OBJECTS
Definition: pi.h:440
PI_OUT_OF_RESOURCES
@ PI_OUT_OF_RESOURCES
Definition: pi.h:103
piMemBufferCreate
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_esimd_emulator.cpp:1007
PI_COMMAND_TYPE_RELEASE_GL_OBJECTS
@ PI_COMMAND_TYPE_RELEASE_GL_OBJECTS
Definition: pi.h:438
PI_MAP_WRITE_INVALIDATE_REGION
constexpr pi_map_flags PI_MAP_WRITE_INVALIDATE_REGION
Definition: pi.h:595
PI_SAMPLER_INFO_REFERENCE_COUNT
@ PI_SAMPLER_INFO_REFERENCE_COUNT
Definition: pi.h:518
PI_MEM_TYPE_IMAGE2D_ARRAY
@ PI_MEM_TYPE_IMAGE2D_ARRAY
Definition: pi.h:453
PI_BUFFER_CREATE_TYPE_REGION
@ PI_BUFFER_CREATE_TYPE_REGION
Definition: pi.h:511
piEnqueueMemBufferWriteRect
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_esimd_emulator.cpp:1562
piextGetDeviceFunctionPointer
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_esimd_emulator.cpp:1835
PI_EVENT_INFO_COMMAND_QUEUE
@ PI_EVENT_INFO_COMMAND_QUEUE
Definition: pi.h:410
piDevicesGet
pi_result piDevicesGet(pi_platform platform, pi_device_type device_type, pi_uint32 num_entries, pi_device *devices, pi_uint32 *num_devices)
Definition: pi_esimd_emulator.cpp:479
pi_device_binary_struct::Version
uint16_t Version
version of this structure - for backward compatibility; all modifications which change order/type/off...
Definition: pi.h:802
PI_IMAGE_CHANNEL_ORDER_RA
@ PI_IMAGE_CHANNEL_ORDER_RA
Definition: pi.h:478
PI_IMAGE_INFO_ELEMENT_SIZE
@ PI_IMAGE_INFO_ELEMENT_SIZE
Definition: pi.h:393
piProgramCreate
pi_result piProgramCreate(pi_context context, const void *il, size_t length, pi_program *res_program)
Definition: pi_esimd_emulator.cpp:1286
_pi_mem_info
_pi_mem_info
Definition: pi.h:952
pi_image_offset_struct
Definition: pi.h:873
PI_USM_CROSS_SHARED_SUPPORT
@ PI_USM_CROSS_SHARED_SUPPORT
Definition: pi.h:1628
_pi_plugin::PluginVersion
char PluginVersion[10]
Definition: pi.h:1832
pi_buff_rect_offset_struct::z_scalar
size_t z_scalar
Definition: pi.h:858
piextMemCreateWithNativeHandle
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_esimd_emulator.cpp:1281
PI_INVALID_PLATFORM
@ PI_INVALID_PLATFORM
Definition: pi.h:93
PI_EXT_ONEAPI_DEVICE_INFO_MAX_WORK_GROUPS_1D
@ PI_EXT_ONEAPI_DEVICE_INFO_MAX_WORK_GROUPS_1D
Definition: pi.h:322
PI_OUT_OF_HOST_MEMORY
@ PI_OUT_OF_HOST_MEMORY
Definition: pi.h:97
PI_COMMAND_TYPE_SVM_MEMFILL
@ PI_COMMAND_TYPE_SVM_MEMFILL
Definition: pi.h:444
PI_SAMPLER_PROPERTIES_FILTER_MODE
constexpr pi_sampler_properties PI_SAMPLER_PROPERTIES_FILTER_MODE
Definition: pi.h:554
PI_DEVICE_INFO_VENDOR_ID
@ PI_DEVICE_INFO_VENDOR_ID
Definition: pi.h:200
PI_MEM_ALLOC_DEVICE
@ PI_MEM_ALLOC_DEVICE
Definition: pi.h:1645
piextKernelSetArgPointer
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_esimd_emulator.cpp:1913
PI_COMMAND_TYPE_MARKER
@ PI_COMMAND_TYPE_MARKER
Definition: pi.h:436
PI_COMMAND_TYPE_MEM_BUFFER_READ
@ PI_COMMAND_TYPE_MEM_BUFFER_READ
Definition: pi.h:419
pi_image_region_struct
Definition: pi.h:882
PI_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT
@ PI_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT
Definition: pi.h:382
PI_DEVICE_INFO_EXTENSIONS
@ PI_DEVICE_INFO_EXTENSIONS
Definition: pi.h:280
PI_COMMAND_TYPE_SVM_FREE
@ PI_COMMAND_TYPE_SVM_FREE
Definition: pi.h:442
PI_COMMAND_TYPE_ACQUIRE_GL_OBJECTS
@ PI_COMMAND_TYPE_ACQUIRE_GL_OBJECTS
Definition: pi.h:437
PI_PLUGIN_SPECIFIC_ERROR
@ PI_PLUGIN_SPECIFIC_ERROR
PI_PLUGIN_SPECIFIC_ERROR indicates that an backend spcific error or warning has been emitted by the p...
Definition: pi.h:121
PI_COMMAND_TYPE_COPY_BUFFER_TO_IMAGE
@ PI_COMMAND_TYPE_COPY_BUFFER_TO_IMAGE
Definition: pi.h:433
PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_FLOAT
@ PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_FLOAT
Definition: pi.h:217
piQueueFlush
pi_result piQueueFlush(pi_queue command_queue)
Definition: pi_esimd_emulator.cpp:991
PI_DEVICE_TYPE_ALL
@ PI_DEVICE_TYPE_ALL
All devices available in the PI plugin.
Definition: pi.h:178
PI_SAMPLER_PROPERTIES_NORMALIZED_COORDS
constexpr pi_sampler_properties PI_SAMPLER_PROPERTIES_NORMALIZED_COORDS
Definition: pi.h:550
piextDeviceSelectBinary
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_esimd_emulator.cpp:1947
_pi_usm_migration_flags
_pi_usm_migration_flags
Definition: pi.h:1658
PI_CONTEXT_INFO_PROPERTIES
@ PI_CONTEXT_INFO_PROPERTIES
Definition: pi.h:343
PI_FP_FMA
@ PI_FP_FMA
Definition: pi.h:388
PI_IMAGE_CHANNEL_ORDER_RGB
@ PI_IMAGE_CHANNEL_ORDER_RGB
Definition: pi.h:479
_pi_device_binary_property_set_struct::PropertiesEnd
pi_device_binary_property PropertiesEnd
Definition: pi.h:714
_pi_program_build_status
_pi_program_build_status
Definition: pi.h:156
PI_DEVICE_INFO_QUEUE_ON_HOST_PROPERTIES
@ PI_DEVICE_INFO_QUEUE_ON_HOST_PROPERTIES
Definition: pi.h:269
piEnqueueNativeKernel
pi_result piEnqueueNativeKernel(pi_queue queue, void(*user_func)(void *), void *args, size_t cb_args, pi_uint32 num_mem_objects, const pi_mem *mem_list, const void **args_mem_loc, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event)
Definition: pi_esimd_emulator.cpp:1829
_pi_offload_entry_struct::flags
int32_t flags
Definition: pi.h:683
PI_PROGRAM_INFO_NUM_KERNELS
@ PI_PROGRAM_INFO_NUM_KERNELS
Definition: pi.h:336
cl::sycl::info::platform
platform
Definition: info_desc.hpp:31
piextContextGetNativeHandle
pi_result piextContextGetNativeHandle(pi_context context, pi_native_handle *nativeHandle)
Gets the native handle of a PI context object.
Definition: pi_esimd_emulator.cpp:868
PI_DEVICE_INFO_TYPE
@ PI_DEVICE_INFO_TYPE
Definition: pi.h:199
PI_DEVICE_INFO_MAX_WORK_GROUP_SIZE
@ PI_DEVICE_INFO_MAX_WORK_GROUP_SIZE
Definition: pi.h:204
PI_INVALID_ARG_VALUE
@ PI_INVALID_ARG_VALUE
Definition: pi.h:116
PI_CONTEXT_INFO_REFERENCE_COUNT
@ PI_CONTEXT_INFO_REFERENCE_COUNT
Definition: pi.h:344
_pi_program_info
_pi_program_info
Definition: pi.h:328
_pi_profiling_info
_pi_profiling_info
Definition: pi.h:571
_pi_plugin::PiFunctionTable
struct _pi_plugin::FunctionPointers PiFunctionTable
pi_device_affinity_domain
pi_bitfield pi_device_affinity_domain
Definition: pi.h:671
cl::sycl::info::context
context
Definition: info_desc.hpp:42
PI_DEVICE_INFO_IMAGE_SUPPORT
@ PI_DEVICE_INFO_IMAGE_SUPPORT
Definition: pi.h:236
PI_COMMAND_TYPE_COPY_IMAGE_TO_BUFFER
@ PI_COMMAND_TYPE_COPY_IMAGE_TO_BUFFER
Definition: pi.h:434
PI_MEM_ADVICE_CUDA_UNSET_ACCESSED_BY
@ PI_MEM_ADVICE_CUDA_UNSET_ACCESSED_BY
Definition: pi.h:467
pi_device_binary_struct::EntriesEnd
_pi_offload_entry EntriesEnd
Definition: pi.h:835
PI_QUEUE_ON_DEVICE
constexpr pi_queue_properties PI_QUEUE_ON_DEVICE
Definition: pi.h:628
PI_DEVICE_INFO_MAX_PARAMETER_SIZE
@ PI_DEVICE_INFO_MAX_PARAMETER_SIZE
Definition: pi.h:247
PI_MEM_ADVICE_CUDA_SET_ACCESSED_BY_HOST
@ PI_MEM_ADVICE_CUDA_SET_ACCESSED_BY_HOST
Definition: pi.h:470
PI_EVENT_INFO_COMMAND_EXECUTION_STATUS
@ PI_EVENT_INFO_COMMAND_EXECUTION_STATUS
Definition: pi.h:413
PI_MEM_OBJECT_ALLOCATION_FAILURE
@ PI_MEM_OBJECT_ALLOCATION_FAILURE
Definition: pi.h:119
PI_INVALID_SAMPLER
@ PI_INVALID_SAMPLER
Definition: pi.h:100
PI_PROGRAM_INFO_DEVICES
@ PI_PROGRAM_INFO_DEVICES
Definition: pi.h:332
PI_MEM_ALLOC_WRTITE_COMBINED
constexpr pi_usm_mem_properties PI_MEM_ALLOC_WRTITE_COMBINED
Definition: pi.h:609
PI_SAMPLER_FILTER_MODE_LINEAR
@ PI_SAMPLER_FILTER_MODE_LINEAR
Definition: pi.h:538
piEnqueueMemImageCopy
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_esimd_emulator.cpp:1741
_pi_kernel_group_info
_pi_kernel_group_info
Definition: pi.h:368
PI_DEVICE_INFO_SUB_GROUP_SIZES_INTEL
@ PI_DEVICE_INFO_SUB_GROUP_SIZES_INTEL
Definition: pi.h:294
PI_QUEUE_INFO_REFERENCE_COUNT
@ PI_QUEUE_INFO_REFERENCE_COUNT
Definition: pi.h:355
PI_PROGRAM_INFO_NUM_DEVICES
@ PI_PROGRAM_INFO_NUM_DEVICES
Definition: pi.h:331
PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_HALF
@ PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_HALF
Definition: pi.h:221
pfn_notify
void(* pfn_notify)(pi_event event, pi_int32 eventCommandStatus, void *userData)
Definition: pi_cuda.hpp:456
piextProgramSetSpecializationConstant
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_esimd_emulator.cpp:1942
pi_buff_rect_offset_struct::x_bytes
size_t x_bytes
Definition: pi.h:856
pi_device_binary_struct::ManifestEnd
const char * ManifestEnd
Pointer to the manifest data end.
Definition: pi.h:828
PI_PROGRAM_BINARY_TYPE_LIBRARY
@ PI_PROGRAM_BINARY_TYPE_LIBRARY
Definition: pi.h:167
PI_IMAGE_INFO_HEIGHT
@ PI_IMAGE_INFO_HEIGHT
Definition: pi.h:397
PI_MEM_TYPE_HOST
@ PI_MEM_TYPE_HOST
Definition: pi.h:1650
_pi_command_type
_pi_command_type
Definition: pi.h:417
piSamplerRelease
pi_result piSamplerRelease(pi_sampler sampler)
Definition: pi_esimd_emulator.cpp:1483
PI_INVALID_WORK_DIMENSION
@ PI_INVALID_WORK_DIMENSION
Definition: pi.h:113
piextKernelCreateWithNativeHandle
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_esimd_emulator.cpp:1820
PI_MEM_USM_ALLOC_BUFFER_LOCATION
constexpr pi_usm_mem_properties PI_MEM_USM_ALLOC_BUFFER_LOCATION
Definition: pi.h:618
pi_memory_order_capabilities
pi_bitfield pi_memory_order_capabilities
Definition: pi.h:557
_pi_offload_entry_struct::name
char * name
Definition: pi.h:681
PI_PROFILING_INFO_COMMAND_END
@ PI_PROFILING_INFO_COMMAND_END
Definition: pi.h:575
PI_SAMPLER_INFO_NORMALIZED_COORDS
@ PI_SAMPLER_INFO_NORMALIZED_COORDS
Definition: pi.h:520
_pi_mem_alloc_info
_pi_mem_alloc_info
Definition: pi.h:1641
PI_DEVICE_INFO_MAX_CLOCK_FREQUENCY
@ PI_DEVICE_INFO_MAX_CLOCK_FREQUENCY
Definition: pi.h:233
PI_DEVICE_INFO_IMAGE2D_MAX_WIDTH
@ PI_DEVICE_INFO_IMAGE2D_MAX_WIDTH
Definition: pi.h:239
PI_TRUE
const pi_bool PI_TRUE
Definition: pi.h:514
PI_DEVICE_INFO_AVAILABLE
@ PI_DEVICE_INFO_AVAILABLE
Definition: pi.h:263
piEnqueueMemImageWrite
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_esimd_emulator.cpp:1735
_pi_image_desc::num_mip_levels
pi_uint32 num_mip_levels
Definition: pi.h:944
PI_PROGRAM_INFO_CONTEXT
@ PI_PROGRAM_INFO_CONTEXT
Definition: pi.h:330
pi_usm_mem_properties
pi_bitfield pi_usm_mem_properties
Definition: pi.h:607
pi_map_flags
pi_bitfield pi_map_flags
Definition: pi.h:592
piProgramBuild
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)
pi_device_binaries_struct::HostEntriesEnd
_pi_offload_entry * HostEntriesEnd
Definition: pi.h:906
PI_DEVICE_INFO_IMAGE3D_MAX_HEIGHT
@ PI_DEVICE_INFO_IMAGE3D_MAX_HEIGHT
Definition: pi.h:242
PI_DEVICE_INFO_GPU_EU_SIMD_WIDTH
@ PI_DEVICE_INFO_GPU_EU_SIMD_WIDTH
Definition: pi.h:308
_pi_program_build_info
_pi_program_build_info
Definition: pi.h:149
PI_COMMAND_TYPE_FILL_IMAGE
@ PI_COMMAND_TYPE_FILL_IMAGE
Definition: pi.h:441
PI_MEM_TYPE_IMAGE3D
@ PI_MEM_TYPE_IMAGE3D
Definition: pi.h:452
pi_bitfield
pi_uint64 pi_bitfield
Definition: pi.h:75
PI_PROGRAM_BUILD_INFO_BINARY_TYPE
@ PI_PROGRAM_BUILD_INFO_BINARY_TYPE
Definition: pi.h:153
PI_USM_CONCURRENT_ATOMIC_ACCESS
@ PI_USM_CONCURRENT_ATOMIC_ACCESS
Definition: pi.h:1637
PI_EVENT_INFO_REFERENCE_COUNT
@ PI_EVENT_INFO_REFERENCE_COUNT
Definition: pi.h:414
PI_MEM_ALLOC_TYPE
@ PI_MEM_ALLOC_TYPE
Definition: pi.h:1642
PI_IMAGE_CHANNEL_TYPE_SNORM_INT8
@ PI_IMAGE_CHANNEL_TYPE_SNORM_INT8
Definition: pi.h:493
PI_INVALID_BINARY
@ PI_INVALID_BINARY
Definition: pi.h:95
PI_COMMAND_TYPE_MEM_BUFFER_MAP
@ PI_COMMAND_TYPE_MEM_BUFFER_MAP
Definition: pi.h:422
pi_device_partition_property
intptr_t pi_device_partition_property
Definition: pi.h:663
piextQueueCreateWithNativeHandle
pi_result piextQueueCreateWithNativeHandle(pi_native_handle nativeHandle, pi_context context, pi_device device, bool pluginOwnsNativeHandle, pi_queue *queue)
Creates PI queue object from a native handle.
Definition: pi_esimd_emulator.cpp:1002
PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_LONG
@ PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_LONG
Definition: pi.h:215
PI_PROGRAM_BUILD_INFO_LOG
@ PI_PROGRAM_BUILD_INFO_LOG
Definition: pi.h:152
PI_KERNEL_COMPILE_SUB_GROUP_SIZE_INTEL
@ PI_KERNEL_COMPILE_SUB_GROUP_SIZE_INTEL
Definition: pi.h:405
PI_INVALID_PROGRAM
@ PI_INVALID_PROGRAM
Definition: pi.h:98
PI_INVALID_DEVICE
@ PI_INVALID_DEVICE
Definition: pi.h:94
PI_COMMAND_TYPE_MEM_BUFFER_COPY_RECT
@ PI_COMMAND_TYPE_MEM_BUFFER_COPY_RECT
Definition: pi.h:426
PI_COMMAND_TYPE_IMAGE_WRITE
@ PI_COMMAND_TYPE_IMAGE_WRITE
Definition: pi.h:430
PI_QUEUE_PROFILING_ENABLE
constexpr pi_queue_properties PI_QUEUE_PROFILING_ENABLE
Definition: pi.h:626
PI_SAMPLER_INFO_LOD_MAX
@ PI_SAMPLER_INFO_LOD_MAX
Definition: pi.h:525
PI_EVENT_SUBMITTED
@ PI_EVENT_SUBMITTED
Definition: pi.h:137
PI_PROGRAM_INFO_BINARIES
@ PI_PROGRAM_INFO_BINARIES
Definition: pi.h:335
PI_KERNEL_GROUP_INFO_PRIVATE_MEM_SIZE
@ PI_KERNEL_GROUP_INFO_PRIVATE_MEM_SIZE
Definition: pi.h:376
PI_KERNEL_GROUP_INFO_COMPILE_WORK_GROUP_SIZE
@ PI_KERNEL_GROUP_INFO_COMPILE_WORK_GROUP_SIZE
Definition: pi.h:371
PI_USM_HOST_SUPPORT
@ PI_USM_HOST_SUPPORT
Definition: pi.h:1624
pi_int32
int32_t pi_int32
Definition: pi.h:71
_pi_context
PI context mapping to a CUDA context object.
Definition: pi_cuda.hpp:150
PI_DEVICE_BINARIES_VERSION
static const uint16_t PI_DEVICE_BINARIES_VERSION
Definition: pi.h:890
PI_IMAGE_CHANNEL_TYPE_UNORM_INT16
@ PI_IMAGE_CHANNEL_TYPE_UNORM_INT16
Definition: pi.h:496
PI_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE
static constexpr pi_device_affinity_domain PI_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE
Definition: pi.h:675
PI_QUEUE_INFO_PROPERTIES
@ PI_QUEUE_INFO_PROPERTIES
Definition: pi.h:354
_pi_device
PI device mapping to a CUdevice.
Definition: pi_cuda.hpp:73
_pi_plugin::PiVersion
char PiVersion[10]
Definition: pi.h:1830
PI_DEVICE_INFO_PARTITION_PROPERTIES
@ PI_DEVICE_INFO_PARTITION_PROPERTIES
Definition: pi.h:285
PI_IMAGE_CHANNEL_ORDER_Rx
@ PI_IMAGE_CHANNEL_ORDER_Rx
Definition: pi.h:486
PI_USM_SINGLE_SHARED_SUPPORT
@ PI_USM_SINGLE_SHARED_SUPPORT
Definition: pi.h:1626
_pi_kernel_sub_group_info
_pi_kernel_sub_group_info
Definition: pi.h:401
PI_PLATFORM_INFO_EXTENSIONS
@ PI_PLATFORM_INFO_EXTENSIONS
Definition: pi.h:142
PI_COMMAND_TYPE_MEM_BUFFER_UNMAP
@ PI_COMMAND_TYPE_MEM_BUFFER_UNMAP
Definition: pi.h:423
PI_KERNEL_INFO_NUM_ARGS
@ PI_KERNEL_INFO_NUM_ARGS
Definition: pi.h:361
PI_DEVICE_INFO_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS
@ PI_DEVICE_INFO_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS
Definition: pi.h:292
PI_SAMPLER_INFO_ADDRESSING_MODE
@ PI_SAMPLER_INFO_ADDRESSING_MODE
Definition: pi.h:521
PI_DEVICE_INFO_ATOMIC_MEMORY_ORDER_CAPABILITIES
@ PI_DEVICE_INFO_ATOMIC_MEMORY_ORDER_CAPABILITIES
Definition: pi.h:317
PI_SAMPLER_ADDRESSING_MODE_CLAMP
@ PI_SAMPLER_ADDRESSING_MODE_CLAMP
Definition: pi.h:532
pi_device_binary_struct::PropertySetsBegin
pi_device_binary_property_set PropertySetsBegin
Definition: pi.h:838
PI_EXT_ONEAPI_DEVICE_INFO_MAX_GLOBAL_WORK_GROUPS
@ PI_EXT_ONEAPI_DEVICE_INFO_MAX_GLOBAL_WORK_GROUPS
Definition: pi.h:321
pi_device_binary_struct::EntriesBegin
_pi_offload_entry EntriesBegin
the offload entry table
Definition: pi.h:834