DPC++ Runtime
Runtime libraries for oneAPI DPC++
pi_level_zero.cpp
Go to the documentation of this file.
1 //===-------- pi_level_zero.cpp - Level Zero Plugin --------------------==//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===------------------------------------------------------------------===//
8 
13 
14 #include "pi_level_zero.hpp"
15 #include "ur_bindings.hpp"
16 
17 // Defined in tracing.cpp
18 void enableZeTracing();
19 void disableZeTracing();
20 
21 extern "C" {
22 
23 // Forward declarations
25 
27  pi_uint32 *NumPlatforms) {
28  return pi2ur::piPlatformsGet(NumEntries, Platforms, NumPlatforms);
29 }
30 
32  size_t ParamValueSize, void *ParamValue,
33  size_t *ParamValueSizeRet) {
34  // To distinguish this L0 platform from Unified Runtime one.
35  if (ParamName == PI_PLATFORM_INFO_NAME) {
36  ReturnHelper ReturnValue(ParamValueSize, ParamValue, ParamValueSizeRet);
37  return ReturnValue("Intel(R) Level-Zero");
38  }
39  return pi2ur::piPlatformGetInfo(Platform, ParamName, ParamValueSize,
40  ParamValue, ParamValueSizeRet);
41 }
42 
44  pi_native_handle *NativeHandle) {
45 
46  return pi2ur::piextPlatformGetNativeHandle(Platform, NativeHandle);
47 }
48 
50  pi_platform *Platform) {
51 
52  return pi2ur::piextPlatformCreateWithNativeHandle(NativeHandle, Platform);
53 }
54 
56  return pi2ur::piPluginGetLastError(message);
57 }
58 
59 // Returns plugin specific backend option.
60 // Return '-ze-opt-disable' for frontend_option = -O0.
61 // Return '-ze-opt-level=2' for frontend_option = -O1, O2 or -O3.
62 // Return '-igc_opts 'PartitionUnit=1,SubroutineThreshold=50000'' for
63 // frontend_option = -ftarget-compile-fast.
65  const char *frontend_option,
66  const char **backend_option) {
67  return pi2ur::piPluginGetBackendOption(platform, frontend_option,
68  backend_option);
69 }
70 
72  pi_uint32 NumEntries, pi_device *Devices,
73  pi_uint32 *NumDevices) {
74  return pi2ur::piDevicesGet(Platform, DeviceType, NumEntries, Devices,
75  NumDevices);
76 }
77 
79  return pi2ur::piDeviceRetain(Device);
80 }
81 
83  return pi2ur::piDeviceRelease(Device);
84 }
85 
87  size_t ParamValueSize, void *ParamValue,
88  size_t *ParamValueSizeRet) {
89  return pi2ur::piDeviceGetInfo(Device, ParamName, ParamValueSize, ParamValue,
90  ParamValueSizeRet);
91 }
92 
94  const pi_device_partition_property *Properties,
95  pi_uint32 NumDevices, pi_device *OutDevices,
96  pi_uint32 *OutNumDevices) {
97  return pi2ur::piDevicePartition(Device, Properties, NumDevices, OutDevices,
98  OutNumDevices);
99 }
100 
101 pi_result
102 piextDeviceSelectBinary(pi_device Device, // TODO: does this need to be context?
103  pi_device_binary *Binaries, pi_uint32 NumBinaries,
104  pi_uint32 *SelectedBinaryInd) {
105  return pi2ur::piextDeviceSelectBinary(Device, Binaries, NumBinaries,
106  SelectedBinaryInd);
107 }
108 
110  pi_native_handle *NativeHandle) {
111 
112  return pi2ur::piextDeviceGetNativeHandle(Device, NativeHandle);
113 }
114 
116  pi_platform Platform,
117  pi_device *Device) {
118 
119  return pi2ur::piextDeviceCreateWithNativeHandle(NativeHandle, Platform,
120  Device);
121 }
122 
124  pi_uint32 NumDevices, const pi_device *Devices,
125  void (*PFnNotify)(const char *ErrInfo,
126  const void *PrivateInfo, size_t CB,
127  void *UserData),
128  void *UserData, pi_context *RetContext) {
129  return pi2ur::piContextCreate(Properties, NumDevices, Devices, PFnNotify,
130  UserData, RetContext);
131 }
132 
134  size_t ParamValueSize, void *ParamValue,
135  size_t *ParamValueSizeRet) {
136 
137  return pi2ur::piContextGetInfo(Context, ParamName, ParamValueSize, ParamValue,
138  ParamValueSizeRet);
139 }
140 
141 // FIXME: Dummy implementation to prevent link fail
144  void *UserData) {
145  return pi2ur::piextContextSetExtendedDeleter(Context, Function, UserData);
146 }
147 
149  pi_native_handle *NativeHandle) {
150  return pi2ur::piextContextGetNativeHandle(Context, NativeHandle);
151 }
152 
154  pi_uint32 NumDevices,
155  const pi_device *Devices,
156  bool OwnNativeHandle,
157  pi_context *RetContext) {
159  NativeHandle, NumDevices, Devices, OwnNativeHandle, RetContext);
160 }
161 
163 
164  return pi2ur::piContextRetain(Context);
165 }
166 
168  return pi2ur::piContextRelease(Context);
169 }
170 
172  pi_queue_properties Flags, pi_queue *Queue) {
173  pi_queue_properties Properties[] = {PI_QUEUE_FLAGS, Flags, 0};
174  return piextQueueCreate(Context, Device, Properties, Queue);
175 }
176 
178  pi_queue_properties *Properties, pi_queue *Queue) {
179  return pi2ur::piextQueueCreate(Context, Device, Properties, Queue);
180 }
181 
183  size_t ParamValueSize, void *ParamValue,
184  size_t *ParamValueSizeRet) {
185 
186  return pi2ur::piQueueGetInfo(Queue, ParamName, ParamValueSize, ParamValue,
187  ParamValueSizeRet);
188 }
189 
191 
193  return pi2ur::piQueueRelease(Queue);
194 }
195 
197 
199 
201  pi_native_handle *NativeHandle,
202  int32_t *NativeHandleDesc) {
203 
204  return pi2ur::piextQueueGetNativeHandle(Queue, NativeHandle,
205  NativeHandleDesc);
206 }
207 
209  int32_t NativeHandleDesc,
210  pi_context Context, pi_device Device,
211  bool OwnNativeHandle,
212  pi_queue_properties *Properties,
213  pi_queue *Queue) {
214 
216  NativeHandle, NativeHandleDesc, Context, Device, OwnNativeHandle,
217  Properties, Queue);
218 }
219 
221  void *HostPtr, pi_mem *RetMem,
222  const pi_mem_properties *properties) {
223  return pi2ur::piMemBufferCreate(Context, Flags, Size, HostPtr, RetMem,
224  properties);
225 }
226 
227 pi_result piMemGetInfo(pi_mem Mem, pi_mem_info ParamName, size_t ParamValueSize,
228  void *ParamValue, size_t *ParamValueSizeRet) {
229  return pi2ur::piMemGetInfo(Mem, ParamName, ParamValueSize, ParamValue,
230  ParamValueSizeRet);
231 }
232 
234 
236 
238  const pi_image_format *ImageFormat,
239  const pi_image_desc *ImageDesc, void *HostPtr,
240  pi_mem *RetImage) {
241 
242  return pi2ur::piMemImageCreate(Context, Flags, ImageFormat, ImageDesc,
243  HostPtr, RetImage);
244 }
245 
247  pi_native_handle *NativeHandle) {
248  return pi2ur::piextMemGetNativeHandle(Mem, Dev, NativeHandle);
249 }
250 
252  pi_context Context,
253  bool ownNativeHandle, pi_mem *Mem) {
254  return pi2ur::piextMemCreateWithNativeHandle(NativeHandle, Context,
255  ownNativeHandle, Mem);
256 }
257 
258 pi_result piProgramCreate(pi_context Context, const void *ILBytes,
259  size_t Length, pi_program *Program) {
260  return pi2ur::piProgramCreate(Context, ILBytes, Length, Program);
261 }
262 
264  pi_context Context, pi_uint32 NumDevices, const pi_device *DeviceList,
265  const size_t *Lengths, const unsigned char **Binaries,
266  size_t NumMetadataEntries, const pi_device_binary_property *Metadata,
267  pi_int32 *BinaryStatus, pi_program *Program) {
268 
269  return pi2ur::piProgramCreateWithBinary(Context, NumDevices, DeviceList,
270  Lengths, Binaries, NumMetadataEntries,
271  Metadata, BinaryStatus, Program);
272 }
273 
275  pi_native_handle NativeHandle, pi_context Context, bool OwnNativeHandle,
276  const pi_image_format *ImageFormat, const pi_image_desc *ImageDesc,
277  pi_mem *Img) {
279  NativeHandle, Context, OwnNativeHandle, ImageFormat, ImageDesc, Img);
280 }
281 
283  size_t ParamValueSize, void *ParamValue,
284  size_t *ParamValueSizeRet) {
285 
286  return pi2ur::piProgramGetInfo(Program, ParamName, ParamValueSize, ParamValue,
287  ParamValueSizeRet);
288 }
289 
291  const pi_device *DeviceList, const char *Options,
292  pi_uint32 NumInputPrograms,
293  const pi_program *InputPrograms,
294  void (*PFnNotify)(pi_program Program, void *UserData),
295  void *UserData, pi_program *RetProgram) {
296  return pi2ur::piProgramLink(Context, NumDevices, DeviceList, Options,
297  NumInputPrograms, InputPrograms, PFnNotify,
298  UserData, RetProgram);
299 }
300 
302  pi_program Program, pi_uint32 NumDevices, const pi_device *DeviceList,
303  const char *Options, pi_uint32 NumInputHeaders,
304  const pi_program *InputHeaders, const char **HeaderIncludeNames,
305  void (*PFnNotify)(pi_program Program, void *UserData), void *UserData) {
306 
307  return pi2ur::piProgramCompile(Program, NumDevices, DeviceList, Options,
308  NumInputHeaders, InputHeaders,
309  HeaderIncludeNames, PFnNotify, UserData);
310 }
311 
313  const pi_device *DeviceList, const char *Options,
314  void (*PFnNotify)(pi_program Program, void *UserData),
315  void *UserData) {
316  return pi2ur::piProgramBuild(Program, NumDevices, DeviceList, Options,
317  PFnNotify, UserData);
318 }
319 
321  pi_program_build_info ParamName,
322  size_t ParamValueSize, void *ParamValue,
323  size_t *ParamValueSizeRet) {
324 
325  return pi2ur::piProgramGetBuildInfo(Program, Device, ParamName,
326  ParamValueSize, ParamValue,
327  ParamValueSizeRet);
328 }
329 
331  return pi2ur::piProgramRetain(Program);
332 }
333 
335  return pi2ur::piProgramRelease(Program);
336 }
337 
339  pi_native_handle *NativeHandle) {
340  return pi2ur::piextProgramGetNativeHandle(Program, NativeHandle);
341 }
342 
344  pi_context Context,
345  bool OwnNativeHandle,
346  pi_program *Program) {
347  return pi2ur::piextProgramCreateWithNativeHandle(NativeHandle, Context,
348  OwnNativeHandle, Program);
349 }
350 
351 pi_result piKernelCreate(pi_program Program, const char *KernelName,
352  pi_kernel *RetKernel) {
353 
354  return pi2ur::piKernelCreate(Program, KernelName, RetKernel);
355 }
356 
357 pi_result piKernelSetArg(pi_kernel Kernel, pi_uint32 ArgIndex, size_t ArgSize,
358  const void *ArgValue) {
359 
360  return pi2ur::piKernelSetArg(Kernel, ArgIndex, ArgSize, ArgValue);
361 }
362 
363 // Special version of piKernelSetArg to accept pi_mem.
365  const pi_mem_obj_property *ArgProperties,
366  const pi_mem *ArgValue) {
367  return pi2ur::piextKernelSetArgMemObj(Kernel, ArgIndex, ArgProperties,
368  ArgValue);
369 }
370 
371 // Special version of piKernelSetArg to accept pi_sampler.
373  const pi_sampler *ArgValue) {
374 
375  return pi2ur::piextKernelSetArgSampler(Kernel, ArgIndex, ArgValue);
376 }
377 
379  size_t ParamValueSize, void *ParamValue,
380  size_t *ParamValueSizeRet) {
381 
382  return pi2ur::piKernelGetInfo(Kernel, ParamName, ParamValueSize, ParamValue,
383  ParamValueSizeRet);
384 }
385 
387  pi_device Device,
388  pi_image_format *ImageFormat,
389  pi_image_desc *ImageDesc,
390  pi_image_mem_handle *RetMem) {
391  return pi2ur::piextMemImageAllocate(Context, Device, ImageFormat, ImageDesc,
392  RetMem);
393 }
394 
396  pi_context Context, pi_device Device, pi_image_mem_handle ImgMem,
397  pi_image_format *ImageFormat, pi_image_desc *ImageDesc,
398  pi_image_handle *RetHandle) {
399  return pi2ur::piextMemUnsampledImageCreate(Context, Device, ImgMem,
400  ImageFormat, ImageDesc, RetHandle);
401 }
402 
404  pi_context Context, pi_device Device, pi_image_mem_handle ImgMem,
405  pi_image_format *ImageFormat, pi_image_desc *ImageDesc, pi_sampler Sampler,
406  pi_image_handle *RetHandle) {
407  return pi2ur::piextMemSampledImageCreate(Context, Device, ImgMem, ImageFormat,
408  ImageDesc, Sampler, RetHandle);
409 }
410 
412  pi_context Context, const pi_sampler_properties *SamplerProperties,
413  float MinMipmapLevelClamp, float MaxMipmapLevelClamp, float MaxAnisotropy,
414  pi_sampler *RetSampler) {
416  Context, SamplerProperties, MinMipmapLevelClamp, MaxMipmapLevelClamp,
417  MaxAnisotropy, RetSampler);
418 }
419 
421  pi_device Device,
422  pi_image_mem_handle MipMem,
423  unsigned int Level,
424  pi_image_mem_handle *RetMem) {
425  return pi2ur::piextMemMipmapGetLevel(Context, Device, MipMem, Level, RetMem);
426 }
427 
428 __SYCL_EXPORT pi_result piextMemImageFree(pi_context Context, pi_device Device,
429  pi_image_mem_handle MemoryHandle) {
430  return pi2ur::piextMemImageFree(Context, Device, MemoryHandle);
431 }
432 
433 __SYCL_EXPORT pi_result piextMemMipmapFree(pi_context Context, pi_device Device,
434  pi_image_mem_handle MemoryHandle) {
435  return pi2ur::piextMemMipmapFree(Context, Device, MemoryHandle);
436 }
437 
439  pi_queue Queue, void *DstPtr, void *SrcPtr,
440  const pi_image_format *ImageFormat, const pi_image_desc *ImageDesc,
441  const pi_image_copy_flags Flags, pi_image_offset SrcOffset,
442  pi_image_offset DstOffset, pi_image_region CopyExtent,
443  pi_image_region HostExtent, pi_uint32 NumEventsInWaitList,
444  const pi_event *EventWaitList, pi_event *Event) {
445  return pi2ur::piextMemImageCopy(Queue, DstPtr, SrcPtr, ImageFormat, ImageDesc,
446  Flags, SrcOffset, DstOffset, CopyExtent,
447  HostExtent, NumEventsInWaitList,
448  EventWaitList, Event);
449 }
450 
452  pi_context Context, pi_device Device, pi_image_handle Handle) {
453  return pi2ur::piextMemUnsampledImageHandleDestroy(Context, Device, Handle);
454 }
455 
457  pi_context Context, pi_device Device, pi_image_handle Handle) {
458  return pi2ur::piextMemSampledImageHandleDestroy(Context, Device, Handle);
459 }
460 
462  pi_image_info ParamName,
463  void *ParamValue,
464  size_t *ParamValueSizeRet) {
465  return pi2ur::piextMemImageGetInfo(MemHandle, ParamName, ParamValue,
466  ParamValueSizeRet);
467 }
468 
469 __SYCL_EXPORT_DEPRECATED("This function has been deprecated in favor of "
470  "`piextImportExternalMemory`")
472  size_t Size, int FileDescriptor,
473  pi_interop_mem_handle *RetHandle) {
474  return pi2ur::piextMemImportOpaqueFD(Context, Device, Size, FileDescriptor,
475  RetHandle);
476 }
477 
479  pi_context Context, pi_device Device, pi_external_mem_descriptor *MemDesc,
480  pi_interop_mem_handle *RetHandle) {
481  return pi2ur::piextImportExternalMemory(Context, Device, MemDesc, RetHandle);
482 }
483 
485  pi_context Context, pi_device Device, pi_image_format *ImageFormat,
486  pi_image_desc *ImageDesc, pi_interop_mem_handle MemHandle,
487  pi_image_mem_handle *RetMem) {
488  return pi2ur::piextMemMapExternalArray(Context, Device, ImageFormat,
489  ImageDesc, MemHandle, RetMem);
490 }
491 
493  pi_device Device,
494  pi_interop_mem_handle ExtMem) {
495  return pi2ur::piextMemReleaseInterop(Context, Device, ExtMem);
496 }
497 
498 __SYCL_EXPORT_DEPRECATED("This function has been deprecated in favor of "
499  "`piextImportExternalSemaphore`")
500 pi_result
502  int FileDescriptor,
503  pi_interop_semaphore_handle *RetHandle) {
504  return pi2ur::piextImportExternalSemaphoreOpaqueFD(Context, Device,
505  FileDescriptor, RetHandle);
506 }
507 
508 __SYCL_EXPORT pi_result
511  pi_interop_semaphore_handle *RetHandle) {
512  return pi2ur::piextImportExternalSemaphore(Context, Device, SemDesc,
513  RetHandle);
514 }
515 
516 __SYCL_EXPORT pi_result
518  pi_interop_semaphore_handle SemHandle) {
519  return pi2ur::piextDestroyExternalSemaphore(Context, Device, SemHandle);
520 }
521 
523  pi_queue Queue, pi_interop_semaphore_handle SemHandle, bool HasWaitValue,
524  pi_uint64 WaitValue, pi_uint32 NumEventsInWaitList,
525  const pi_event *EventWaitList, pi_event *Event) {
526  return pi2ur::piextWaitExternalSemaphore(Queue, SemHandle, HasWaitValue,
527  WaitValue, NumEventsInWaitList,
528  EventWaitList, Event);
529 }
530 
532  pi_queue Queue, pi_interop_semaphore_handle SemHandle, bool HasSignalValue,
533  pi_uint64 SignalValue, pi_uint32 NumEventsInWaitList,
534  const pi_event *EventWaitList, pi_event *Event) {
535  return pi2ur::piextSignalExternalSemaphore(Queue, SemHandle, HasSignalValue,
536  SignalValue, NumEventsInWaitList,
537  EventWaitList, Event);
538 }
539 
541  pi_kernel_group_info ParamName,
542  size_t ParamValueSize, void *ParamValue,
543  size_t *ParamValueSizeRet) {
544 
545  return pi2ur::piKernelGetGroupInfo(Kernel, Device, ParamName, ParamValueSize,
546  ParamValue, ParamValueSizeRet);
547 }
548 
550  pi_kernel_sub_group_info ParamName,
551  size_t InputValueSize, const void *InputValue,
552  size_t ParamValueSize, void *ParamValue,
553  size_t *ParamValueSizeRet) {
554 
556  Kernel, Device, ParamName, InputValueSize, InputValue, ParamValueSize,
557  ParamValue, ParamValueSizeRet);
558 }
559 
561 
562  return pi2ur::piKernelRetain(Kernel);
563 }
564 
566 
567  return pi2ur::piKernelRelease(Kernel);
568 }
569 
570 pi_result
572  const size_t *GlobalWorkOffset,
573  const size_t *GlobalWorkSize, const size_t *LocalWorkSize,
574  pi_uint32 NumEventsInWaitList,
575  const pi_event *EventWaitList, pi_event *OutEvent) {
577  Queue, Kernel, WorkDim, GlobalWorkOffset, GlobalWorkSize, LocalWorkSize,
578  NumEventsInWaitList, EventWaitList, OutEvent);
579 }
580 
582  pi_queue Queue, pi_kernel Kernel, pi_uint32 WorkDim,
583  const size_t *GlobalWorkOffset, const size_t *GlobalWorkSize,
584  const size_t *LocalWorkSize, pi_uint32 NumEventsInWaitList,
585  const pi_event *EventWaitList, pi_event *OutEvent) {
587  Queue, Kernel, WorkDim, GlobalWorkOffset, GlobalWorkSize, LocalWorkSize,
588  NumEventsInWaitList, EventWaitList, OutEvent);
589 }
590 
592  pi_context Context,
593  pi_program Program,
594  bool OwnNativeHandle,
595  pi_kernel *Kernel) {
596 
598  NativeHandle, Context, Program, OwnNativeHandle, Kernel);
599 }
600 
602  pi_native_handle *NativeHandle) {
603  return pi2ur::piextKernelGetNativeHandle(Kernel, NativeHandle);
604 }
605 
607  pi_kernel Kernel, size_t LocalWorkSize, size_t DynamicSharedMemorySize,
608  pi_uint32 *GroupCountRet) {
610  Kernel, LocalWorkSize, DynamicSharedMemorySize, GroupCountRet);
611 }
612 
613 //
614 // Events
615 //
616 
617 // External PI API entry
619  return pi2ur::piEventCreate(Context, RetEvent);
620 }
621 
623  size_t ParamValueSize, void *ParamValue,
624  size_t *ParamValueSizeRet) {
625  return pi2ur::piEventGetInfo(Event, ParamName, ParamValueSize, ParamValue,
626  ParamValueSizeRet);
627 }
628 
630  size_t ParamValueSize, void *ParamValue,
631  size_t *ParamValueSizeRet) {
632 
633  return pi2ur::piEventGetProfilingInfo(Event, ParamName, ParamValueSize,
634  ParamValue, ParamValueSizeRet);
635 }
636 
637 pi_result piEventsWait(pi_uint32 NumEvents, const pi_event *EventList) {
638  return pi2ur::piEventsWait(NumEvents, EventList);
639 }
640 
641 pi_result piEventSetCallback(pi_event Event, pi_int32 CommandExecCallbackType,
642  void (*PFnNotify)(pi_event Event,
643  pi_int32 EventCommandStatus,
644  void *UserData),
645  void *UserData) {
646  return pi2ur::piEventSetCallback(Event, CommandExecCallbackType, PFnNotify,
647  UserData);
648 }
649 
650 pi_result piEventSetStatus(pi_event Event, pi_int32 ExecutionStatus) {
651  return pi2ur::piEventSetStatus(Event, ExecutionStatus);
652 }
653 
655 
657  return pi2ur::piEventRelease(Event);
658 }
659 
661  pi_native_handle *NativeHandle) {
662 
663  return pi2ur::piextEventGetNativeHandle(Event, NativeHandle);
664 }
665 
667  pi_context Context,
668  bool OwnNativeHandle,
669  pi_event *Event) {
670  return pi2ur::piextEventCreateWithNativeHandle(NativeHandle, Context,
671  OwnNativeHandle, Event);
672 }
673 
675  pi_uint32 NumEventsInWaitList,
676  const pi_event *EventWaitList,
677  pi_event *Event) {
679  Queue, Blocking, NumEventsInWaitList, EventWaitList, Event);
680 }
681 
682 //
683 // Sampler
684 //
686  const pi_sampler_properties *SamplerProperties,
687  pi_sampler *RetSampler) {
688  return pi2ur::piSamplerCreate(Context, SamplerProperties, RetSampler);
689 }
690 
692  size_t ParamValueSize, void *ParamValue,
693  size_t *ParamValueSizeRet) {
694 
695  return pi2ur::piSamplerGetInfo(Sampler, ParamName, ParamValueSize, ParamValue,
696  ParamValueSizeRet);
697 }
698 
700  return pi2ur::piSamplerRetain(Sampler);
701 }
702 
704  return pi2ur::piSamplerRelease(Sampler);
705 }
706 
707 //
708 // Queue Commands
709 //
710 pi_result piEnqueueEventsWait(pi_queue Queue, pi_uint32 NumEventsInWaitList,
711  const pi_event *EventWaitList,
712  pi_event *OutEvent) {
713 
714  return pi2ur::piEnqueueEventsWait(Queue, NumEventsInWaitList, EventWaitList,
715  OutEvent);
716 }
717 
719  pi_uint32 NumEventsInWaitList,
720  const pi_event *EventWaitList,
721  pi_event *OutEvent) {
722 
723  return pi2ur::piEnqueueEventsWaitWithBarrier(Queue, NumEventsInWaitList,
724  EventWaitList, OutEvent);
725 }
726 
728  pi_bool BlockingRead, size_t Offset,
729  size_t Size, void *Dst,
730  pi_uint32 NumEventsInWaitList,
731  const pi_event *EventWaitList,
732  pi_event *Event) {
733 
734  return pi2ur::piEnqueueMemBufferRead(Queue, Src, BlockingRead, Offset, Size,
735  Dst, NumEventsInWaitList, EventWaitList,
736  Event);
737 }
738 
740  pi_queue Queue, pi_mem Buffer, pi_bool BlockingRead,
741  pi_buff_rect_offset BufferOffset, pi_buff_rect_offset HostOffset,
742  pi_buff_rect_region Region, size_t BufferRowPitch, size_t BufferSlicePitch,
743  size_t HostRowPitch, size_t HostSlicePitch, void *Ptr,
744  pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList,
745  pi_event *Event) {
746 
748  Queue, Buffer, BlockingRead, BufferOffset, HostOffset, Region,
749  BufferRowPitch, BufferSlicePitch, HostRowPitch, HostSlicePitch, Ptr,
750  NumEventsInWaitList, EventWaitList, Event);
751 }
752 
754  pi_bool BlockingWrite, size_t Offset,
755  size_t Size, const void *Ptr,
756  pi_uint32 NumEventsInWaitList,
757  const pi_event *EventWaitList,
758  pi_event *Event) {
759 
760  return pi2ur::piEnqueueMemBufferWrite(Queue, Buffer, BlockingWrite, Offset,
761  Size, Ptr, NumEventsInWaitList,
762  EventWaitList, Event);
763 }
764 
766  pi_queue Queue, pi_mem Buffer, pi_bool BlockingWrite,
767  pi_buff_rect_offset BufferOffset, pi_buff_rect_offset HostOffset,
768  pi_buff_rect_region Region, size_t BufferRowPitch, size_t BufferSlicePitch,
769  size_t HostRowPitch, size_t HostSlicePitch, const void *Ptr,
770  pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList,
771  pi_event *Event) {
772 
774  Queue, Buffer, BlockingWrite, BufferOffset, HostOffset, Region,
775  BufferRowPitch, BufferSlicePitch, HostRowPitch, HostSlicePitch, Ptr,
776  NumEventsInWaitList, EventWaitList, Event);
777 }
778 
780  size_t SrcOffset, size_t DstOffset,
781  size_t Size, pi_uint32 NumEventsInWaitList,
782  const pi_event *EventWaitList,
783  pi_event *Event) {
784 
785  return pi2ur::piEnqueueMemBufferCopy(Queue, SrcMem, DstMem, SrcOffset,
786  DstOffset, Size, NumEventsInWaitList,
787  EventWaitList, Event);
788 }
789 
791  pi_queue Queue, pi_mem SrcMem, pi_mem DstMem, pi_buff_rect_offset SrcOrigin,
792  pi_buff_rect_offset DstOrigin, pi_buff_rect_region Region,
793  size_t SrcRowPitch, size_t SrcSlicePitch, size_t DstRowPitch,
794  size_t DstSlicePitch, pi_uint32 NumEventsInWaitList,
795  const pi_event *EventWaitList, pi_event *Event) {
796 
798  Queue, SrcMem, DstMem, SrcOrigin, DstOrigin, Region, SrcRowPitch,
799  SrcSlicePitch, DstRowPitch, DstSlicePitch, NumEventsInWaitList,
800  EventWaitList, Event);
801 }
802 
804  const void *Pattern, size_t PatternSize,
805  size_t Offset, size_t Size,
806  pi_uint32 NumEventsInWaitList,
807  const pi_event *EventWaitList,
808  pi_event *Event) {
809 
810  return pi2ur::piEnqueueMemBufferFill(Queue, Buffer, Pattern, PatternSize,
811  Offset, Size, NumEventsInWaitList,
812  EventWaitList, Event);
813 }
814 
816  pi_map_flags MapFlags, size_t Offset,
817  size_t Size, pi_uint32 NumEventsInWaitList,
818  const pi_event *EventWaitList,
819  pi_event *OutEvent, void **RetMap) {
820 
821  return pi2ur::piEnqueueMemBufferMap(Queue, Mem, BlockingMap, MapFlags, Offset,
822  Size, NumEventsInWaitList, EventWaitList,
823  OutEvent, RetMap);
824 }
825 
826 pi_result piEnqueueMemUnmap(pi_queue Queue, pi_mem Mem, void *MappedPtr,
827  pi_uint32 NumEventsInWaitList,
828  const pi_event *EventWaitList, pi_event *OutEvent) {
829 
830  return pi2ur::piEnqueueMemUnmap(Queue, Mem, MappedPtr, NumEventsInWaitList,
831  EventWaitList, OutEvent);
832 }
833 
835  size_t ParamValueSize, void *ParamValue,
836  size_t *ParamValueSizeRet) {
837 
838  return pi2ur::piMemImageGetInfo(Image, ParamName, ParamValueSize, ParamValue,
839  ParamValueSizeRet);
840 }
841 
843  pi_bool BlockingRead, pi_image_offset Origin,
844  pi_image_region Region, size_t RowPitch,
845  size_t SlicePitch, void *Ptr,
846  pi_uint32 NumEventsInWaitList,
847  const pi_event *EventWaitList,
848  pi_event *Event) {
850  Queue, Image, BlockingRead, Origin, Region, RowPitch, SlicePitch, Ptr,
851  NumEventsInWaitList, EventWaitList, Event);
852 }
853 
855  pi_bool BlockingWrite, pi_image_offset Origin,
856  pi_image_region Region, size_t InputRowPitch,
857  size_t InputSlicePitch, const void *Ptr,
858  pi_uint32 NumEventsInWaitList,
859  const pi_event *EventWaitList,
860  pi_event *Event) {
861 
863  Queue, Image, BlockingWrite, Origin, Region, InputRowPitch,
864  InputSlicePitch, Ptr, NumEventsInWaitList, EventWaitList, Event);
865 }
866 
867 pi_result
868 piEnqueueMemImageCopy(pi_queue Queue, pi_mem SrcImage, pi_mem DstImage,
869  pi_image_offset SrcOrigin, pi_image_offset DstOrigin,
870  pi_image_region Region, pi_uint32 NumEventsInWaitList,
871  const pi_event *EventWaitList, pi_event *Event) {
872  return pi2ur::piEnqueueMemImageCopy(Queue, SrcImage, DstImage, SrcOrigin,
873  DstOrigin, Region, NumEventsInWaitList,
874  EventWaitList, Event);
875 }
876 
878  const void *FillColor, const size_t *Origin,
879  const size_t *Region,
880  pi_uint32 NumEventsInWaitList,
881  const pi_event *EventWaitList,
882  pi_event *Event) {
883 
884  return pi2ur::piEnqueueMemImageFill(Queue, Image, FillColor, Origin, Region,
885  NumEventsInWaitList, EventWaitList,
886  Event);
887 }
888 
890  pi_buffer_create_type BufferCreateType,
891  void *BufferCreateInfo, pi_mem *RetMem) {
892 
893  return pi2ur::piMemBufferPartition(Buffer, Flags, BufferCreateType,
894  BufferCreateInfo, RetMem);
895 }
896 
897 // TODO: Check if the function_pointer_ret type can be converted to void**.
899  const char *FunctionName,
900  pi_uint64 *FunctionPointerRet) {
901 
902  return pi2ur::piextGetDeviceFunctionPointer(Device, Program, FunctionName,
903  FunctionPointerRet);
904 }
905 
907  const char *GlobalVariableName,
908  size_t *GlobalVariableSize,
909  void **GlobalVariablePointerRet) {
911  Device, Program, GlobalVariableName, GlobalVariableSize,
912  GlobalVariablePointerRet);
913 }
914 
915 pi_result piextUSMDeviceAlloc(void **ResultPtr, pi_context Context,
916  pi_device Device,
917  pi_usm_mem_properties *Properties, size_t Size,
919 
920  return pi2ur::piextUSMDeviceAlloc(ResultPtr, Context, Device, Properties,
921  Size, Alignment);
922 }
923 
924 pi_result piextUSMSharedAlloc(void **ResultPtr, pi_context Context,
925  pi_device Device,
926  pi_usm_mem_properties *Properties, size_t Size,
928 
929  return pi2ur::piextUSMSharedAlloc(ResultPtr, Context, Device, Properties,
930  Size, Alignment);
931 }
932 
934  void **ResultPtr, size_t *ResultPitch, pi_context Context, pi_device Device,
935  pi_usm_mem_properties *Properties, size_t WidthInBytes, size_t Height,
936  unsigned int ElementSizeBytes) {
937 
938  return pi2ur::piextUSMPitchedAlloc(ResultPtr, ResultPitch, Context, Device,
939  Properties, WidthInBytes, Height,
940  ElementSizeBytes);
941 }
942 
943 pi_result piextUSMHostAlloc(void **ResultPtr, pi_context Context,
944  pi_usm_mem_properties *Properties, size_t Size,
946  return pi2ur::piextUSMHostAlloc(ResultPtr, Context, Properties, Size,
947  Alignment);
948 }
949 
950 pi_result piextUSMFree(pi_context Context, void *Ptr) {
951 
952  return pi2ur::piextUSMFree(Context, Ptr);
953 }
954 
956  size_t ArgSize, const void *ArgValue) {
957  return pi2ur::piextKernelSetArgPointer(Kernel, ArgIndex, ArgSize, ArgValue);
958 }
959 
972  size_t Count, pi_uint32 NumEventsInWaitlist,
973  const pi_event *EventsWaitlist,
974  pi_event *Event) {
976  Queue, Ptr, Value, Count, NumEventsInWaitlist, EventsWaitlist, Event);
977 }
978 
979 pi_result piextUSMEnqueueMemcpy(pi_queue Queue, pi_bool Blocking, void *DstPtr,
980  const void *SrcPtr, size_t Size,
981  pi_uint32 NumEventsInWaitlist,
982  const pi_event *EventsWaitlist,
983  pi_event *Event) {
984 
985  return pi2ur::piextUSMEnqueueMemcpy(Queue, Blocking, DstPtr, SrcPtr, Size,
986  NumEventsInWaitlist, EventsWaitlist,
987  Event);
988 }
989 
999 pi_result piextUSMEnqueuePrefetch(pi_queue Queue, const void *Ptr, size_t Size,
1000  pi_usm_migration_flags Flags,
1001  pi_uint32 NumEventsInWaitList,
1002  const pi_event *EventWaitList,
1003  pi_event *OutEvent) {
1004 
1006  Queue, Ptr, Size, Flags, NumEventsInWaitList, EventWaitList, OutEvent);
1007 }
1008 
1018  size_t Length, pi_mem_advice Advice,
1019  pi_event *OutEvent) {
1020 
1021  return pi2ur::piextUSMEnqueueMemAdvise(Queue, Ptr, Length, Advice, OutEvent);
1022 }
1023 
1036 __SYCL_EXPORT pi_result piextUSMEnqueueFill2D(pi_queue Queue, void *Ptr,
1037  size_t Pitch, size_t PatternSize,
1038  const void *Pattern, size_t Width,
1039  size_t Height,
1040  pi_uint32 NumEventsWaitList,
1041  const pi_event *EventsWaitList,
1042  pi_event *Event) {
1043 
1044  return pi2ur::piextUSMEnqueueFill2D(Queue, Ptr, Pitch, PatternSize, Pattern,
1045  Width, Height, NumEventsWaitList,
1046  EventsWaitList, Event);
1047 }
1048 
1061 __SYCL_EXPORT pi_result piextUSMEnqueueMemset2D(pi_queue Queue, void *Ptr,
1062  size_t Pitch, int Value,
1063  size_t Width, size_t Height,
1064  pi_uint32 NumEventsWaitList,
1065  const pi_event *EventsWaitlist,
1066  pi_event *Event) {
1067 
1068  return pi2ur::piextUSMEnqueueMemset2D(Queue, Ptr, Pitch, Value, Width, Height,
1069  NumEventsWaitList, EventsWaitlist,
1070  Event);
1071 }
1072 
1088  pi_queue Queue, pi_bool Blocking, void *DstPtr, size_t DstPitch,
1089  const void *SrcPtr, size_t SrcPitch, size_t Width, size_t Height,
1090  pi_uint32 NumEventsInWaitlist, const pi_event *EventWaitlist,
1091  pi_event *Event) {
1092 
1094  Queue, Blocking, DstPtr, DstPitch, SrcPtr, SrcPitch, Width, Height,
1095  NumEventsInWaitlist, EventWaitlist, Event);
1096 }
1097 
1115  pi_mem_alloc_info ParamName,
1116  size_t ParamValueSize, void *ParamValue,
1117  size_t *ParamValueSizeRet) {
1118  return pi2ur::piextUSMGetMemAllocInfo(Context, Ptr, ParamName, ParamValueSize,
1119  ParamValue, ParamValueSizeRet);
1120 }
1121 
1122 pi_result piextUSMImport(const void *HostPtr, size_t Size, pi_context Context) {
1123  return pi2ur::piextUSMImport(HostPtr, Size, Context);
1124 }
1125 
1126 pi_result piextUSMRelease(const void *HostPtr, pi_context Context) {
1127  return pi2ur::piextUSMRelease(HostPtr, Context);
1128 }
1129 
1144  pi_queue Queue, pi_program Program, const char *Name, pi_bool BlockingWrite,
1145  size_t Count, size_t Offset, const void *Src, pi_uint32 NumEventsInWaitList,
1146  const pi_event *EventsWaitList, pi_event *Event) {
1148  Queue, Program, Name, BlockingWrite, Count, Offset, Src,
1149  NumEventsInWaitList, EventsWaitList, Event);
1150 }
1151 
1166  pi_queue Queue, pi_program Program, const char *Name, pi_bool BlockingRead,
1167  size_t Count, size_t Offset, void *Dst, pi_uint32 NumEventsInWaitList,
1168  const pi_event *EventsWaitList, pi_event *Event) {
1169 
1171  Queue, Program, Name, BlockingRead, Count, Offset, Dst,
1172  NumEventsInWaitList, EventsWaitList, Event);
1173 
1174  return PI_SUCCESS;
1175 }
1188  const char *PipeSymbol, pi_bool Blocking,
1189  void *Ptr, size_t Size,
1190  pi_uint32 NumEventsInWaitList,
1191  const pi_event *EventsWaitList,
1192  pi_event *Event) {
1193  (void)Queue;
1194  (void)Program;
1195  (void)PipeSymbol;
1196  (void)Blocking;
1197  (void)Ptr;
1198  (void)Size;
1199  (void)NumEventsInWaitList;
1200  (void)EventsWaitList;
1201  (void)Event;
1202 
1203  PI_ASSERT(Queue, PI_ERROR_INVALID_QUEUE);
1204 
1205  die("piextEnqueueReadHostPipe: not implemented");
1206  return {};
1207 }
1208 
1221  const char *PipeSymbol, pi_bool Blocking,
1222  void *Ptr, size_t Size,
1223  pi_uint32 NumEventsInWaitList,
1224  const pi_event *EventsWaitList,
1225  pi_event *Event) {
1226  (void)Queue;
1227  (void)Program;
1228  (void)PipeSymbol;
1229  (void)Blocking;
1230  (void)Ptr;
1231  (void)Size;
1232  (void)NumEventsInWaitList;
1233  (void)EventsWaitList;
1234  (void)Event;
1235 
1236  PI_ASSERT(Queue, PI_ERROR_INVALID_QUEUE);
1237 
1238  die("piextEnqueueWriteHostPipe: not implemented");
1239  return {};
1240 }
1241 
1243  size_t ParamValueSize, const void *ParamValue) {
1244 
1245  return pi2ur::piKernelSetExecInfo(Kernel, ParamName, ParamValueSize,
1246  ParamValue);
1247 }
1248 
1250  pi_uint32 SpecID, size_t Size,
1251  const void *SpecValue) {
1252  return pi2ur::piextProgramSetSpecializationConstant(Prog, SpecID, Size,
1253  SpecValue);
1254 }
1255 
1256 // Command buffer extension
1258  const pi_ext_command_buffer_desc *Desc,
1259  pi_ext_command_buffer *RetCommandBuffer) {
1260  return pi2ur::piextCommandBufferCreate(Context, Device, Desc,
1261  RetCommandBuffer);
1262 }
1263 
1265  return pi2ur::piextCommandBufferRetain(CommandBuffer);
1266 }
1267 
1269  return pi2ur::piextCommandBufferRelease(CommandBuffer);
1270 }
1271 
1273  return pi2ur::piextCommandBufferFinalize(CommandBuffer);
1274 }
1275 
1277  pi_ext_command_buffer CommandBuffer, pi_kernel Kernel, pi_uint32 WorkDim,
1278  const size_t *GlobalWorkOffset, const size_t *GlobalWorkSize,
1279  const size_t *LocalWorkSize, pi_uint32 NumSyncPointsInWaitList,
1280  const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint,
1281  pi_ext_command_buffer_command *Command) {
1283  CommandBuffer, Kernel, WorkDim, GlobalWorkOffset, GlobalWorkSize,
1284  LocalWorkSize, NumSyncPointsInWaitList, SyncPointWaitList, SyncPoint,
1285  Command);
1286 }
1287 
1289  pi_ext_command_buffer CommandBuffer, void *DstPtr, const void *SrcPtr,
1290  size_t Size, pi_uint32 NumSyncPointsInWaitList,
1291  const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint) {
1292  return pi2ur::piextCommandBufferMemcpyUSM(CommandBuffer, DstPtr, SrcPtr, Size,
1293  NumSyncPointsInWaitList,
1294  SyncPointWaitList, SyncPoint);
1295 }
1296 
1298  pi_ext_command_buffer CommandBuffer, pi_mem SrcMem, pi_mem DstMem,
1299  size_t SrcOffset, size_t DstOffset, size_t Size,
1300  pi_uint32 NumSyncPointsInWaitList,
1301  const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint) {
1303  CommandBuffer, SrcMem, DstMem, SrcOffset, DstOffset, Size,
1304  NumSyncPointsInWaitList, SyncPointWaitList, SyncPoint);
1305 }
1306 
1308  pi_ext_command_buffer CommandBuffer, pi_mem SrcMem, pi_mem DstMem,
1309  pi_buff_rect_offset SrcOrigin, pi_buff_rect_offset DstOrigin,
1310  pi_buff_rect_region Region, size_t SrcRowPitch, size_t SrcSlicePitch,
1311  size_t DstRowPitch, size_t DstSlicePitch, pi_uint32 NumSyncPointsInWaitList,
1312  const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint) {
1314  CommandBuffer, SrcMem, DstMem, SrcOrigin, DstOrigin, Region, SrcRowPitch,
1315  SrcSlicePitch, DstRowPitch, DstSlicePitch, NumSyncPointsInWaitList,
1316  SyncPointWaitList, SyncPoint);
1317 }
1318 
1320  pi_ext_command_buffer CommandBuffer, pi_mem Buffer, size_t Offset,
1321  size_t Size, void *Dst, pi_uint32 NumSyncPointsInWaitList,
1322  const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint) {
1324  CommandBuffer, Buffer, Offset, Size, Dst, NumSyncPointsInWaitList,
1325  SyncPointWaitList, SyncPoint);
1326 }
1327 
1329  pi_ext_command_buffer CommandBuffer, pi_mem Buffer,
1330  pi_buff_rect_offset BufferOffset, pi_buff_rect_offset HostOffset,
1331  pi_buff_rect_region Region, size_t BufferRowPitch, size_t BufferSlicePitch,
1332  size_t HostRowPitch, size_t HostSlicePitch, void *Ptr,
1333  pi_uint32 NumSyncPointsInWaitList,
1334  const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint) {
1336  CommandBuffer, Buffer, BufferOffset, HostOffset, Region, BufferRowPitch,
1337  BufferSlicePitch, HostRowPitch, HostSlicePitch, Ptr,
1338  NumSyncPointsInWaitList, SyncPointWaitList, SyncPoint);
1339 }
1340 
1342  pi_ext_command_buffer CommandBuffer, pi_mem Buffer, size_t Offset,
1343  size_t Size, const void *Ptr, pi_uint32 NumSyncPointsInWaitList,
1344  const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint) {
1346  CommandBuffer, Buffer, Offset, Size, Ptr, NumSyncPointsInWaitList,
1347  SyncPointWaitList, SyncPoint);
1348 }
1349 
1351  pi_ext_command_buffer CommandBuffer, pi_mem Buffer,
1352  pi_buff_rect_offset BufferOffset, pi_buff_rect_offset HostOffset,
1353  pi_buff_rect_region Region, size_t BufferRowPitch, size_t BufferSlicePitch,
1354  size_t HostRowPitch, size_t HostSlicePitch, const void *Ptr,
1355  pi_uint32 NumSyncPointsInWaitList,
1356  const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint) {
1358  CommandBuffer, Buffer, BufferOffset, HostOffset, Region, BufferRowPitch,
1359  BufferSlicePitch, HostRowPitch, HostSlicePitch, Ptr,
1360  NumSyncPointsInWaitList, SyncPointWaitList, SyncPoint);
1361 }
1362 
1364  pi_ext_command_buffer CommandBuffer, pi_mem Buffer, const void *Pattern,
1365  size_t PatternSize, size_t Offset, size_t Size,
1366  pi_uint32 NumSyncPointsInWaitList,
1367  const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint) {
1369  CommandBuffer, Buffer, Pattern, PatternSize, Offset, Size,
1370  NumSyncPointsInWaitList, SyncPointWaitList, SyncPoint);
1371 }
1372 
1374  void *Ptr, const void *Pattern,
1375  size_t PatternSize, size_t Size,
1376  pi_uint32 NumSyncPointsInWaitList,
1377  const pi_ext_sync_point *SyncPointWaitList,
1378  pi_ext_sync_point *SyncPoint) {
1380  CommandBuffer, Ptr, Pattern, PatternSize, Size, NumSyncPointsInWaitList,
1381  SyncPointWaitList, SyncPoint);
1382 }
1383 
1385  pi_ext_command_buffer CommandBuffer, const void *Ptr, size_t Size,
1386  pi_usm_migration_flags Flags, pi_uint32 NumSyncPointsInWaitList,
1387  const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint) {
1388  return pi2ur::piextCommandBufferPrefetchUSM(CommandBuffer, Ptr, Size, Flags,
1389  NumSyncPointsInWaitList,
1390  SyncPointWaitList, SyncPoint);
1391 }
1392 
1394  pi_ext_command_buffer CommandBuffer, const void *Ptr, size_t Length,
1395  pi_mem_advice Advice, pi_uint32 NumSyncPointsInWaitList,
1396  const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint) {
1397  return pi2ur::piextCommandBufferAdviseUSM(CommandBuffer, Ptr, Length, Advice,
1398  NumSyncPointsInWaitList,
1399  SyncPointWaitList, SyncPoint);
1400 }
1401 
1403  pi_queue Queue,
1404  pi_uint32 NumEventsInWaitList,
1405  const pi_event *EventWaitList,
1406  pi_event *Event) {
1408  CommandBuffer, Queue, NumEventsInWaitList, EventWaitList, Event);
1409 }
1410 
1414  return pi2ur::piextCommandBufferUpdateKernelLaunch(Command, Desc);
1415 }
1416 
1417 pi_result
1420 }
1421 
1422 pi_result
1425 }
1426 
1428 
1429 pi_result piPluginInit(pi_plugin *PluginInit) { // missing
1430  PI_ASSERT(PluginInit, PI_ERROR_INVALID_VALUE);
1431 
1432  // Check that the major version matches in PiVersion and SupportedVersion
1434 
1435  // TODO: handle versioning/targets properly.
1436  size_t PluginVersionSize = sizeof(PluginInit->PluginVersion);
1437 
1438  PI_ASSERT(strlen(_PI_LEVEL_ZERO_PLUGIN_VERSION_STRING) < PluginVersionSize,
1439  PI_ERROR_INVALID_VALUE);
1440 
1441  strncpy(PluginInit->PluginVersion, SupportedVersion, PluginVersionSize);
1442 
1443 #define _PI_API(api) \
1444  (PluginInit->PiFunctionTable).api = (decltype(&::api))(&api);
1445 #include <sycl/detail/pi.def>
1446 
1447  enableZeTracing();
1448  return PI_SUCCESS;
1449 }
1450 
1451 pi_result piextPluginGetOpaqueData(void *opaque_data_param,
1452  void **opaque_data_return) {
1453  return pi2ur::piextPluginGetOpaqueData(opaque_data_param, opaque_data_return);
1454 }
1455 
1456 // SYCL RT calls this api to notify the end of plugin lifetime.
1457 // Windows: dynamically loaded plugins might have been unloaded already
1458 // when this is called. Sycl RT holds onto the PI plugin so it can be
1459 // called safely. But this is not transitive. If the PI plugin in turn
1460 // dynamically loaded a different DLL, that may have been unloaded.
1461 // It can include all the jobs to tear down resources before
1462 // the plugin is unloaded from memory.
1463 pi_result piTearDown(void *PluginParameter) {
1464  return pi2ur::piTearDown(PluginParameter);
1465 }
1466 
1467 pi_result piGetDeviceAndHostTimer(pi_device Device, uint64_t *DeviceTime,
1468  uint64_t *HostTime) {
1469  return pi2ur::piGetDeviceAndHostTimer(Device, DeviceTime, HostTime);
1470 }
1471 
1473  pi_device peer_device) {
1474 
1475  return pi2ur::piextEnablePeerAccess(command_device, peer_device);
1476 }
1477 
1479  pi_device peer_device) {
1480 
1481  return pi2ur::piextDisablePeerAccess(command_device, peer_device);
1482 }
1483 
1485  pi_device peer_device, pi_peer_attr attr,
1486  size_t ParamValueSize, void *ParamValue,
1487  size_t *ParamValueSizeRet) {
1488 
1489  return pi2ur::piextPeerAccessGetInfo(command_device, peer_device, attr,
1490  ParamValueSize, ParamValue,
1491  ParamValueSizeRet);
1492 }
1493 
1494 #ifdef _WIN32
1495 #define __SYCL_PLUGIN_DLL_NAME "pi_level_zero.dll"
1496 #include "../common_win_pi_trace/common_win_pi_trace.hpp"
1497 #undef __SYCL_PLUGIN_DLL_NAME
1498 #endif
1499 } // extern "C"
pi_result piextWaitExternalSemaphore(pi_queue Queue, pi_interop_semaphore_handle SemHandle, bool HasWaitValue, pi_uint64 WaitValue, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *Event)
Definition: pi2ur.hpp:5601
pi_result piextUSMEnqueueMemset(pi_queue Queue, void *Ptr, pi_int32 Value, size_t Count, pi_uint32 NumEventsInWaitList, const pi_event *EventsWaitList, pi_event *OutEvent)
Definition: pi2ur.hpp:3890
pi_result piEnqueueMemImageFill(pi_queue Queue, pi_mem Image, const void *FillColor, const size_t *Origin, const size_t *Region, pi_uint32 NumEventsInWaitList, const pi_event *EventsWaitList, pi_event *Event)
Definition: pi2ur.hpp:2160
pi_result piextCommandBufferMemBufferWriteRect(pi_ext_command_buffer CommandBuffer, pi_mem Buffer, pi_buff_rect_offset BufferOffset, pi_buff_rect_offset HostOffset, pi_buff_rect_region Region, size_t BufferRowPitch, size_t BufferSlicePitch, size_t HostRowPitch, size_t HostSlicePitch, const void *Ptr, pi_uint32 NumSyncPointsInWaitList, const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint)
Definition: pi2ur.hpp:4701
pi_result piProgramGetInfo(pi_program Program, pi_program_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
Definition: pi2ur.hpp:1967
pi_result piextUSMEnqueueFill2D(pi_queue Queue, void *Ptr, size_t Pitch, size_t PatternSize, const void *Pattern, size_t Width, size_t Height, pi_uint32 NumEventsWaitList, const pi_event *EventsWaitList, pi_event *Event)
USM 2D Fill API.
Definition: pi2ur.hpp:3514
pi_result piKernelSetExecInfo(pi_kernel Kernel, pi_kernel_exec_info ParamName, size_t ParamValueSize, const void *ParamValue)
Definition: pi2ur.hpp:2329
pi_result piPlatformGetInfo(pi_platform Platform, pi_platform_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
Definition: pi2ur.hpp:876
pi_result piextUSMEnqueuePrefetch(pi_queue Queue, const void *Ptr, size_t Size, pi_usm_migration_flags Flags, pi_uint32 NumEventsInWaitList, const pi_event *EventsWaitList, pi_event *OutEvent)
Hint to migrate memory to the device.
Definition: pi2ur.hpp:3415
pi_result piextUSMGetMemAllocInfo(pi_context Context, const void *Ptr, pi_mem_alloc_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
Definition: pi2ur.hpp:3552
pi_result piKernelGetGroupInfo(pi_kernel Kernel, pi_device Device, pi_kernel_group_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
Definition: pi2ur.hpp:2462
pi_result piQueueGetInfo(pi_queue Queue, pi_queue_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
Definition: pi2ur.hpp:1824
pi_result piMemRetain(pi_mem Mem)
Definition: pi2ur.hpp:3386
pi_result piPlatformsGet(pi_uint32 NumEntries, pi_platform *Platforms, pi_uint32 *NumPlatforms)
Definition: pi2ur.hpp:823
pi_result piEnqueueEventsWait(pi_queue Queue, pi_uint32 NumEventsInWaitList, const pi_event *EventsWaitList, pi_event *OutEvent)
Definition: pi2ur.hpp:4128
pi_result piextKernelSuggestMaxCooperativeGroupCount(pi_kernel Kernel, size_t LocalWorkSize, size_t DynamicSharedMemorySize, pi_uint32 *GroupCountRet)
Definition: pi2ur.hpp:2651
pi_result piextDestroyExternalSemaphore(pi_context Context, pi_device Device, pi_interop_semaphore_handle SemHandle)
Definition: pi2ur.hpp:5585
pi_result piEnqueueMemUnmap(pi_queue Queue, pi_mem Mem, void *MappedPtr, pi_uint32 NumEventsInWaitList, const pi_event *EventsWaitList, pi_event *OutEvent)
Definition: pi2ur.hpp:3846
pi_result piextDeviceGetNativeHandle(pi_device Device, pi_native_handle *NativeHandle)
Definition: pi2ur.hpp:1337
pi_result piextMemSampledImageCreate(pi_context Context, pi_device Device, pi_image_mem_handle ImgMem, pi_image_format *ImageFormat, pi_image_desc *ImageDesc, pi_sampler Sampler, pi_image_handle *RetHandle)
Definition: pi2ur.hpp:5048
pi_result piextCommandBufferUpdateKernelLaunch(pi_ext_command_buffer_command command, pi_ext_command_buffer_update_kernel_launch_desc *desc)
Definition: pi2ur.hpp:4865
pi_result piProgramRelease(pi_program Program)
Definition: pi2ur.hpp:2540
pi_result piextCommandBufferPrefetchUSM(pi_ext_command_buffer CommandBuffer, const void *Ptr, size_t Size, pi_usm_migration_flags Flags, pi_uint32 NumSyncPointsInWaitList, const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint)
Definition: pi2ur.hpp:4781
pi_result piEnqueueMemImageWrite(pi_queue Queue, pi_mem Image, pi_bool BlockingWrite, pi_image_offset Origin, pi_image_region Region, size_t InputRowPitch, size_t InputSlicePitch, const void *Ptr, pi_uint32 NumEventsInWaitList, const pi_event *EventsWaitList, pi_event *OutEvent)
Definition: pi2ur.hpp:3758
pi_result piPluginGetBackendOption(pi_platform Platform, const char *FrontendOption, const char **PlatformOption)
Definition: pi2ur.hpp:936
pi_result piextCommandBufferNDRangeKernel(pi_ext_command_buffer CommandBuffer, pi_kernel Kernel, pi_uint32 WorkDim, const size_t *GlobalWorkOffset, const size_t *GlobalWorkSize, const size_t *LocalWorkSize, pi_uint32 NumSyncPointsInWaitList, const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint, pi_ext_command_buffer_command *Command)
Definition: pi2ur.hpp:4573
pi_result piextPluginGetOpaqueData(void *opaque_data_param, void **opaque_data_return)
Definition: pi2ur.hpp:929
pi_result piKernelCreate(pi_program Program, const char *KernelName, pi_kernel *RetKernel)
Definition: pi2ur.hpp:2143
pi_result piextUSMImport(const void *HostPtr, size_t Size, pi_context Context)
Definition: pi2ur.hpp:3594
pi_result piEnqueueKernelLaunch(pi_queue Queue, pi_kernel Kernel, pi_uint32 WorkDim, const size_t *GlobalWorkOffset, const size_t *GlobalWorkSize, const size_t *LocalWorkSize, pi_uint32 NumEventsInWaitList, const pi_event *EventsWaitList, pi_event *OutEvent)
Definition: pi2ur.hpp:3709
pi_result piEventSetStatus(pi_event Event, pi_int32 ExecutionStatus)
Definition: pi2ur.hpp:4338
pi_result piEventSetCallback(pi_event Event, pi_int32 CommandExecCallbackType, void(*PFnNotify)(pi_event Event, pi_int32 EventCommandStatus, void *UserData), void *UserData)
Definition: pi2ur.hpp:4325
pi_result piSamplerCreate(pi_context Context, const pi_sampler_properties *SamplerProperties, pi_sampler *RetSampler)
Definition: pi2ur.hpp:4385
pi_result piSamplerGetInfo(pi_sampler Sampler, pi_sampler_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
Definition: pi2ur.hpp:4446
pi_result piextMemUnsampledImageHandleDestroy(pi_context Context, pi_device Device, pi_image_handle Handle)
Definition: pi2ur.hpp:5292
pi_result piextKernelSetArgSampler(pi_kernel Kernel, pi_uint32 ArgIndex, const pi_sampler *ArgValue)
Definition: pi2ur.hpp:4484
pi_result piextQueueCreateWithNativeHandle(pi_native_handle NativeHandle, int32_t NativeHandleDesc, pi_context Context, pi_device Device, bool OwnNativeHandle, pi_queue_properties *Properties, pi_queue *Queue)
Definition: pi2ur.hpp:1737
pi_result piMemImageGetInfo(pi_mem Image, pi_image_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
Definition: pi2ur.hpp:3617
pi_result piextCommandBufferMemBufferWrite(pi_ext_command_buffer CommandBuffer, pi_mem Buffer, size_t Offset, size_t Size, const void *Ptr, pi_uint32 NumSyncPointsInWaitList, const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint)
Definition: pi2ur.hpp:4732
pi_result piextMemMapExternalArray(pi_context Context, pi_device Device, pi_image_format *ImageFormat, pi_image_desc *ImageDesc, pi_interop_mem_handle MemHandle, pi_image_mem_handle *RetMem)
Definition: pi2ur.hpp:5457
pi_result piProgramCreateWithBinary(pi_context Context, pi_uint32 NumDevices, const pi_device *DeviceList, const size_t *Lengths, const unsigned char **Binaries, size_t NumMetadataEntries, const pi_device_binary_property *Metadata, pi_int32 *BinaryStatus, pi_program *Program)
Definition: pi2ur.hpp:1921
pi_result piextProgramGetNativeHandle(pi_program Program, pi_native_handle *NativeHandle)
Definition: pi2ur.hpp:2374
pi_result piKernelGetInfo(pi_kernel Kernel, pi_kernel_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
Definition: pi2ur.hpp:2410
pi_result piextEventGetNativeHandle(pi_event Event, pi_native_handle *NativeHandle)
Definition: pi2ur.hpp:4233
pi_result piEnqueueEventsWaitWithBarrier(pi_queue Queue, pi_uint32 NumEventsInWaitList, const pi_event *EventsWaitList, pi_event *OutEvent)
Definition: pi2ur.hpp:4109
pi_result piextMemMipmapFree(pi_context Context, pi_device Device, pi_image_mem_handle MemoryHandle)
Definition: pi2ur.hpp:5217
pi_result piextPlatformGetNativeHandle(pi_platform Platform, pi_native_handle *NativeHandle)
Definition: pi2ur.hpp:836
pi_result piSamplerRelease(pi_sampler Sampler)
Definition: pi2ur.hpp:4506
pi_result piMemBufferCreate(pi_context Context, pi_mem_flags Flags, size_t Size, void *HostPtr, pi_mem *RetMem, const pi_mem_properties *properties)
Definition: pi2ur.hpp:2736
pi_result piEnqueueMemBufferWrite(pi_queue Queue, pi_mem Buffer, pi_bool BlockingWrite, size_t Offset, size_t Size, const void *Ptr, pi_uint32 NumEventsInWaitList, const pi_event *EventsWaitList, pi_event *OutEvent)
Definition: pi2ur.hpp:4027
pi_result piextCommandBufferMemBufferReadRect(pi_ext_command_buffer CommandBuffer, pi_mem Buffer, pi_buff_rect_offset BufferOffset, pi_buff_rect_offset HostOffset, pi_buff_rect_region Region, size_t BufferRowPitch, size_t BufferSlicePitch, size_t HostRowPitch, size_t HostSlicePitch, void *Ptr, pi_uint32 NumSyncPointsInWaitList, const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint)
Definition: pi2ur.hpp:4654
pi_result piDevicesGet(pi_platform Platform, pi_device_type DeviceType, pi_uint32 NumEntries, pi_device *Devices, pi_uint32 *NumDevices)
Definition: pi2ur.hpp:952
pi_result piextEnqueueDeviceGlobalVariableWrite(pi_queue Queue, pi_program Program, const char *Name, pi_bool BlockingWrite, size_t Count, size_t Offset, const void *Src, pi_uint32 NumEventsInWaitList, const pi_event *EventsWaitList, pi_event *OutEvent)
API for writing data from host to a device global variable.
Definition: pi2ur.hpp:2677
pi_result piextEventCreateWithNativeHandle(pi_native_handle NativeHandle, pi_context Context, bool OwnNativeHandle, pi_event *Event)
Definition: pi2ur.hpp:4301
pi_result piEventGetProfilingInfo(pi_event Event, pi_profiling_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
Definition: pi2ur.hpp:4248
pi_result piKernelRetain(pi_kernel Kernel)
Definition: pi2ur.hpp:2518
pi_result piextKernelSetArgMemObj(pi_kernel Kernel, pi_uint32 ArgIndex, const pi_mem_obj_property *ArgProperties, const pi_mem *ArgValue)
Definition: pi2ur.hpp:2216
pi_result piextQueueGetNativeHandle(pi_queue Queue, pi_native_handle *NativeHandle, int32_t *NativeHandleDesc)
Definition: pi2ur.hpp:1783
pi_result piextBindlessImageSamplerCreate(pi_context Context, const pi_sampler_properties *SamplerProperties, float MinMipmapLevelClamp, float MaxMipmapLevelClamp, float MaxAnisotropy, pi_sampler *RetSampler)
Definition: pi2ur.hpp:5075
pi_result piextUSMDeviceAlloc(void **ResultPtr, pi_context Context, pi_device Device, pi_usm_mem_properties *Properties, size_t Size, pi_uint32 Alignment)
Definition: pi2ur.hpp:3260
pi_result piProgramGetBuildInfo(pi_program Program, pi_device Device, pi_program_build_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
Definition: pi2ur.hpp:2597
pi_result piQueueFlush(pi_queue Queue)
Definition: pi2ur.hpp:1885
pi_result piextKernelSetArgPointer(pi_kernel Kernel, pi_uint32 ArgIndex, size_t, const void *ArgValue)
Definition: pi2ur.hpp:2552
pi_result piEnqueueTimestampRecordingExp(pi_queue Queue, pi_bool Blocking, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *Event)
Definition: pi2ur.hpp:4363
pi_result piProgramLink(pi_context Context, pi_uint32 NumDevices, const pi_device *DeviceList, const char *Options, pi_uint32 NumInputPrograms, const pi_program *InputPrograms, void(*PFnNotify)(pi_program Program, void *UserData), void *UserData, pi_program *RetProgram)
Definition: pi2ur.hpp:2027
pi_result piSamplerRetain(pi_sampler Sampler)
Definition: pi2ur.hpp:4495
pi_result piextDeviceSelectBinary(pi_device Device, pi_device_binary *Binaries, pi_uint32 NumBinaries, pi_uint32 *SelectedBinaryInd)
Definition: pi2ur.hpp:1459
pi_result piextContextSetExtendedDeleter(pi_context Context, pi_context_extended_deleter Function, void *UserData)
Definition: pi2ur.hpp:1538
pi_result piextCommandBufferMemBufferRead(pi_ext_command_buffer CommandBuffer, pi_mem Src, size_t Offset, size_t Size, void *Dst, pi_uint32 NumSyncPointsInWaitList, const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint)
Definition: pi2ur.hpp:4684
pi_result piextGetDeviceFunctionPointer(pi_device Device, pi_program Program, const char *FunctionName, pi_uint64 *FunctionPointerRet)
Definition: pi2ur.hpp:2179
pi_result piEnqueueMemBufferCopyRect(pi_queue Queue, pi_mem SrcMem, pi_mem DstMem, pi_buff_rect_offset SrcOrigin, pi_buff_rect_offset DstOrigin, pi_buff_rect_region Region, size_t SrcRowPitch, size_t SrcSlicePitch, size_t DstRowPitch, size_t DstSlicePitch, pi_uint32 NumEventsInWaitList, const pi_event *EventsWaitList, pi_event *OutEvent)
Definition: pi2ur.hpp:3914
pi_result piextMemMipmapGetLevel(pi_context Context, pi_device Device, pi_image_mem_handle MipMem, unsigned int Level, pi_image_mem_handle *RetMem)
Definition: pi2ur.hpp:5182
pi_result piGetDeviceAndHostTimer(pi_device Device, uint64_t *DeviceTime, uint64_t *HostTime)
Definition: pi2ur.hpp:1451
pi_result piEventGetInfo(pi_event Event, pi_event_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
Definition: pi2ur.hpp:4204
pi_result piMemBufferPartition(pi_mem Buffer, pi_mem_flags Flags, pi_buffer_create_type BufferCreateType, void *BufferCreateInfo, pi_mem *RetMem)
Definition: pi2ur.hpp:3146
pi_result piEnqueueMemBufferCopy(pi_queue Queue, pi_mem SrcMem, pi_mem DstMem, size_t SrcOffset, size_t DstOffset, size_t Size, pi_uint32 NumEventsInWaitList, const pi_event *EventsWaitList, pi_event *OutEvent)
Definition: pi2ur.hpp:3948
pi_result piContextCreate(const pi_context_properties *Properties, pi_uint32 NumDevices, const pi_device *Devices, void(*PFnNotify)(const char *ErrInfo, const void *PrivateInfo, size_t CB, void *UserData), void *UserData, pi_context *RetContext)
Definition: pi2ur.hpp:1518
pi_result piextUSMPitchedAlloc(void **ResultPtr, size_t *ResultPitch, pi_context Context, pi_device Device, pi_usm_mem_properties *Properties, size_t WidthInBytes, size_t Height, unsigned int ElementSizeBytes)
Definition: pi2ur.hpp:3294
pi_result piextUSMRelease(const void *HostPtr, pi_context Context)
Definition: pi2ur.hpp:3606
pi_result piEventRelease(pi_event Event)
Definition: pi2ur.hpp:4354
pi_result piKernelGetSubGroupInfo(pi_kernel Kernel, pi_device Device, pi_kernel_sub_group_info ParamName, size_t InputValueSize, const void *InputValue, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
Definition: pi2ur.hpp:2560
pi_result piQueueRetain(pi_queue Queue)
Definition: pi2ur.hpp:1874
pi_result piextCommandBufferReleaseCommand(pi_ext_command_buffer_command command)
Definition: pi2ur.hpp:4931
pi_result piDeviceRelease(pi_device Device)
Definition: pi2ur.hpp:990
pi_result piContextRetain(pi_context Context)
Definition: pi2ur.hpp:1641
pi_result piextMemImageAllocate(pi_context Context, pi_device Device, pi_image_format *ImageFormat, pi_image_desc *ImageDesc, pi_image_mem_handle *RetMem)
Definition: pi2ur.hpp:4999
pi_result piextUSMHostAlloc(void **ResultPtr, pi_context Context, pi_usm_mem_properties *Properties, size_t Size, pi_uint32 Alignment)
Definition: pi2ur.hpp:2811
pi_result piextCommandBufferRetain(pi_ext_command_buffer CommandBuffer)
Definition: pi2ur.hpp:4544
pi_result piDeviceGetInfo(pi_device Device, pi_device_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
Definition: pi2ur.hpp:1015
pi_result piextImportExternalMemory(pi_context Context, pi_device Device, pi_external_mem_descriptor *MemDescriptor, pi_interop_mem_handle *RetHandle)
Definition: pi2ur.hpp:5401
pi_result piextCommandBufferAdviseUSM(pi_ext_command_buffer CommandBuffer, const void *Ptr, size_t Length, pi_mem_advice Advice, pi_uint32 NumSyncPointsInWaitList, const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint)
Definition: pi2ur.hpp:4802
pi_result piextKernelCreateWithNativeHandle(pi_native_handle NativeHandle, pi_context Context, pi_program Program, bool OwnNativeHandle, pi_kernel *Kernel)
Definition: pi2ur.hpp:2297
pi_result piextMemSampledImageHandleDestroy(pi_context Context, pi_device Device, pi_image_handle Handle)
Definition: pi2ur.hpp:5308
pi_result piEnqueueMemBufferFill(pi_queue Queue, pi_mem Buffer, const void *Pattern, size_t PatternSize, size_t Offset, size_t Size, pi_uint32 NumEventsInWaitList, const pi_event *EventsWaitList, pi_event *OutEvent)
Definition: pi2ur.hpp:3868
pi_result piextDeviceCreateWithNativeHandle(pi_native_handle NativeHandle, pi_platform Platform, pi_device *Device)
Definition: pi2ur.hpp:1351
pi_result piextUSMEnqueueMemcpy2D(pi_queue Queue, pi_bool Blocking, void *DstPtr, size_t DstPitch, const void *SrcPtr, size_t SrcPitch, size_t Width, size_t Height, pi_uint32 NumEventsInWaitList, const pi_event *EventsWaitList, pi_event *OutEvent)
USM 2D Memcpy API.
Definition: pi2ur.hpp:3676
pi_result piEnqueueMemBufferMap(pi_queue Queue, pi_mem Mem, pi_bool BlockingMap, pi_map_flags MapFlags, size_t Offset, size_t Size, pi_uint32 NumEventsInWaitList, const pi_event *EventsWaitList, pi_event *OutEvent, void **RetMap)
Definition: pi2ur.hpp:3813
pi_result piextCommandBufferRetainCommand(pi_ext_command_buffer_command command)
Definition: pi2ur.hpp:4923
pi_result piextEnqueueCommandBuffer(pi_ext_command_buffer CommandBuffer, pi_queue Queue, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *Event)
Definition: pi2ur.hpp:4845
pi_result piextCommandBufferCreate(pi_context Context, pi_device Device, const pi_ext_command_buffer_desc *Desc, pi_ext_command_buffer *RetCommandBuffer)
Definition: pi2ur.hpp:4524
pi_result piextEnqueueCooperativeKernelLaunch(pi_queue Queue, pi_kernel Kernel, pi_uint32 WorkDim, const size_t *GlobalWorkOffset, const size_t *GlobalWorkSize, const size_t *LocalWorkSize, pi_uint32 NumEventsInWaitList, const pi_event *EventsWaitList, pi_event *OutEvent)
Definition: pi2ur.hpp:3733
pi_result piextUSMEnqueueMemset2D(pi_queue Queue, void *Ptr, size_t Pitch, int Value, size_t Width, size_t Height, pi_uint32 NumEventsWaitList, const pi_event *EventsWaitList, pi_event *Event)
Definition: pi2ur.hpp:3533
pi_result piEnqueueMemImageCopy(pi_queue Queue, pi_mem SrcImage, pi_mem DstImage, pi_image_offset SrcOrigin, pi_image_offset DstOrigin, pi_image_region Region, pi_uint32 NumEventsInWaitList, const pi_event *EventsWaitList, pi_event *OutEvent)
Definition: pi2ur.hpp:3208
pi_result piextMemImageCreateWithNativeHandle(pi_native_handle NativeHandle, pi_context Context, bool OwnNativeHandle, const pi_image_format *ImageFormat, const pi_image_desc *ImageDesc, pi_mem *RetImage)
Definition: pi2ur.hpp:3117
pi_result piextQueueCreate(pi_context Context, pi_device Device, pi_queue_properties *Properties, pi_queue *Queue)
Definition: pi2ur.hpp:1660
pi_result piextProgramCreateWithNativeHandle(pi_native_handle NativeHandle, pi_context Context, bool OwnNativeHandle, pi_program *Program)
Definition: pi2ur.hpp:2390
pi_result piextImportExternalSemaphore(pi_context Context, pi_device Device, pi_external_semaphore_descriptor *SemDescriptor, pi_interop_semaphore_handle *RetHandle)
Definition: pi2ur.hpp:5527
pi_result piextUSMFree(pi_context Context, void *Ptr)
Definition: pi2ur.hpp:3379
pi_result piextEnqueueDeviceGlobalVariableRead(pi_queue Queue, pi_program Program, const char *Name, pi_bool BlockingRead, size_t Count, size_t Offset, void *Dst, pi_uint32 NumEventsInWaitList, const pi_event *EventsWaitList, pi_event *OutEvent)
API reading data from a device global variable to host.
Definition: pi2ur.hpp:2709
pi_result piEventCreate(pi_context Context, pi_event *RetEvent)
Definition: pi2ur.hpp:4286
pi_result piextKernelGetNativeHandle(pi_kernel Kernel, pi_native_handle *NativeHandle)
Definition: pi2ur.hpp:2637
pi_result piextMemImageGetInfo(pi_image_mem_handle MemHandle, pi_image_info ParamName, void *ParamValue, size_t *ParamValueSizeRet)
Definition: pi2ur.hpp:5345
pi_result piQueueFinish(pi_queue Queue)
Definition: pi2ur.hpp:1813
pi_result piextCommandBufferMemBufferFill(pi_ext_command_buffer CommandBuffer, pi_mem Buffer, const void *Pattern, size_t PatternSize, size_t Offset, size_t Size, pi_uint32 NumSyncPointsInWaitList, const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint)
Definition: pi2ur.hpp:4750
pi_result piContextRelease(pi_context Context)
Definition: pi2ur.hpp:1649
pi_result piextPlatformCreateWithNativeHandle(pi_native_handle NativeHandle, pi_platform *Platform)
Definition: pi2ur.hpp:853
pi_result piextMemReleaseInterop(pi_context Context, pi_device Device, pi_interop_mem_handle ExtMem)
Definition: pi2ur.hpp:5482
pi_result piKernelSetArg(pi_kernel Kernel, pi_uint32 ArgIndex, size_t ArgSize, const void *ArgValue)
Definition: pi2ur.hpp:2271
pi_result piEventRetain(pi_event Event)
Definition: pi2ur.hpp:4345
pi_result piextContextGetNativeHandle(pi_context Context, pi_native_handle *NativeHandle)
Definition: pi2ur.hpp:1547
pi_result piMemRelease(pi_mem Mem)
Definition: pi2ur.hpp:3396
pi_result piextUSMEnqueueMemcpy(pi_queue Queue, pi_bool Blocking, void *DstPtr, const void *SrcPtr, size_t Size, pi_uint32 NumEventsInWaitList, const pi_event *EventsWaitList, pi_event *OutEvent)
Definition: pi2ur.hpp:3973
pi_result piextCommandBufferFinalize(pi_ext_command_buffer CommandBuffer)
Definition: pi2ur.hpp:4564
pi_result piPluginGetLastError(char **Message)
Definition: pi2ur.hpp:998
pi_result piEnqueueMemImageRead(pi_queue Queue, pi_mem Image, pi_bool BlockingRead, pi_image_offset Origin, pi_image_region Region, size_t RowPitch, size_t SlicePitch, void *Ptr, pi_uint32 NumEventsInWaitList, const pi_event *EventsWaitList, pi_event *OutEvent)
Definition: pi2ur.hpp:3787
pi_result piKernelRelease(pi_kernel Kernel)
Definition: pi2ur.hpp:2529
pi_result piextMemImageFree(pi_context Context, pi_device Device, pi_image_mem_handle MemoryHandle)
Definition: pi2ur.hpp:5201
pi_result piextMemUnsampledImageCreate(pi_context Context, pi_device Device, pi_image_mem_handle ImgMem, pi_image_format *ImageFormat, pi_image_desc *ImageDesc, pi_image_handle *RetHandle)
Definition: pi2ur.hpp:5022
pi_result piextContextCreateWithNativeHandle(pi_native_handle NativeHandle, pi_uint32 NumDevices, const pi_device *Devices, bool OwnNativeHandle, pi_context *RetContext)
Definition: pi2ur.hpp:1558
pi_result piextPeerAccessGetInfo(pi_device command_device, pi_device peer_device, pi_peer_attr attr, size_t param_value_size, void *param_value, size_t *param_value_size_ret)
Definition: pi2ur.hpp:4965
pi_result piQueueRelease(pi_queue Queue)
Definition: pi2ur.hpp:1803
pi_result piextCommandBufferRelease(pi_ext_command_buffer CommandBuffer)
Definition: pi2ur.hpp:4554
pi_result piContextGetInfo(pi_context Context, pi_context_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
Definition: pi2ur.hpp:1586
pi_result piextCommandBufferMemBufferCopy(pi_ext_command_buffer CommandBuffer, pi_mem SrcMem, pi_mem DstMem, size_t SrcOffset, size_t DstOffset, size_t Size, pi_uint32 NumSyncPointsInWaitList, const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint)
Definition: pi2ur.hpp:4607
pi_result piextCommandBufferFillUSM(pi_ext_command_buffer CommandBuffer, void *Ptr, const void *Pattern, size_t PatternSize, size_t Size, pi_uint32 NumSyncPointsInWaitList, const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint)
Definition: pi2ur.hpp:4767
pi_result piextMemGetNativeHandle(pi_mem Mem, pi_device Dev, pi_native_handle *NativeHandle)
Definition: pi2ur.hpp:3193
pi_result piextGetGlobalVariablePointer(pi_device Device, pi_program Program, const char *GlobalVariableName, size_t *GlobalVariableSize, void **GlobalVariablePointerRet)
Definition: pi2ur.hpp:2198
pi_result piextSignalExternalSemaphore(pi_queue Queue, pi_interop_semaphore_handle SemHandle, bool HasSignalValue, pi_uint64 SignalValue, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *Event)
Definition: pi2ur.hpp:5621
pi_result piTearDown(void *PluginParameter)
Definition: pi2ur.hpp:783
pi_result piextMemImportOpaqueFD(pi_context Context, pi_device Device, size_t Size, int FileDescriptor, pi_interop_mem_handle *RetHandle)
Definition: pi2ur.hpp:5374
pi_result piextDisablePeerAccess(pi_device command_device, pi_device peer_device)
Definition: pi2ur.hpp:4954
pi_result piextCommandBufferMemBufferCopyRect(pi_ext_command_buffer CommandBuffer, pi_mem SrcMem, pi_mem DstMem, pi_buff_rect_offset SrcOrigin, pi_buff_rect_offset DstOrigin, pi_buff_rect_region Region, size_t SrcRowPitch, size_t SrcSlicePitch, size_t DstRowPitch, size_t DstSlicePitch, pi_uint32 NumSyncPointsInWaitList, const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint)
Definition: pi2ur.hpp:4625
pi_result piextEnablePeerAccess(pi_device command_device, pi_device peer_device)
Definition: pi2ur.hpp:4944
pi_result piDevicePartition(pi_device Device, const pi_device_partition_property *Properties, pi_uint32 NumEntries, pi_device *SubDevices, pi_uint32 *NumSubDevices)
Definition: pi2ur.hpp:1375
pi_result piEnqueueMemBufferReadRect(pi_queue Queue, pi_mem Buffer, pi_bool BlockingRead, pi_buff_rect_offset BufferOffset, pi_buff_rect_offset HostOffset, pi_buff_rect_region Region, size_t BufferRowPitch, size_t BufferSlicePitch, size_t HostRowPitch, size_t HostSlicePitch, void *Ptr, pi_uint32 NumEventsInWaitList, const pi_event *EventsWaitList, pi_event *OutEvent)
Definition: pi2ur.hpp:4051
pi_result piMemImageCreate(pi_context Context, pi_mem_flags Flags, const pi_image_format *ImageFormat, const pi_image_desc *ImageDesc, void *HostPtr, pi_mem *RetImage)
Definition: pi2ur.hpp:3075
pi_result piProgramBuild(pi_program Program, pi_uint32 NumDevices, const pi_device *DeviceList, const char *Options, void(*PFnNotify)(pi_program Program, void *UserData), void *UserData)
Definition: pi2ur.hpp:2097
pi_result piEnqueueMemBufferWriteRect(pi_queue Queue, pi_mem Buffer, pi_bool BlockingWrite, pi_buff_rect_offset BufferOffset, pi_buff_rect_offset HostOffset, pi_buff_rect_region Region, size_t BufferRowPitch, size_t BufferSlicePitch, size_t HostRowPitch, size_t HostSlicePitch, const void *Ptr, pi_uint32 NumEventsInWaitList, const pi_event *EventsWaitList, pi_event *OutEvent)
Definition: pi2ur.hpp:3993
pi_result piProgramRetain(pi_program Program)
Definition: pi2ur.hpp:2318
pi_result piextUSMEnqueueMemAdvise(pi_queue Queue, const void *Ptr, size_t Length, pi_mem_advice Advice, pi_event *OutEvent)
USM memadvise API to govern behavior of automatic migration mechanisms.
Definition: pi2ur.hpp:3452
pi_result piextProgramSetSpecializationConstant(pi_program Program, pi_uint32 SpecID, size_t Size, const void *SpecValue)
Definition: pi2ur.hpp:2126
pi_result piextUSMSharedAlloc(void **ResultPtr, pi_context Context, pi_device Device, pi_usm_mem_properties *Properties, size_t Size, pi_uint32 Alignment)
Definition: pi2ur.hpp:3315
pi_result piEnqueueMemBufferRead(pi_queue Queue, pi_mem Src, pi_bool BlockingRead, size_t Offset, size_t Size, void *Dst, pi_uint32 NumEventsInWaitList, const pi_event *EventsWaitList, pi_event *OutEvent)
Definition: pi2ur.hpp:4086
pi_result piProgramCreate(pi_context Context, const void *ILBytes, size_t Length, pi_program *Program)
Definition: pi2ur.hpp:1902
pi_result piEventsWait(pi_uint32 NumEvents, const pi_event *EventsWaitList)
Definition: pi2ur.hpp:4190
pi_result piDeviceRetain(pi_device Device)
Definition: pi2ur.hpp:983
pi_result piextImportExternalSemaphoreOpaqueFD(pi_context Context, pi_device Device, int FileDescriptor, pi_interop_semaphore_handle *RetHandle)
Definition: pi2ur.hpp:5500
pi_result piextCommandBufferMemcpyUSM(pi_ext_command_buffer CommandBuffer, void *DstPtr, const void *SrcPtr, size_t Size, pi_uint32 NumSyncPointsInWaitList, const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint)
Definition: pi2ur.hpp:4593
pi_result piextMemCreateWithNativeHandle(pi_native_handle NativeHandle, pi_context Context, bool OwnNativeHandle, pi_mem *Mem)
Definition: pi2ur.hpp:3239
pi_result piMemGetInfo(pi_mem Mem, pi_mem_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
Definition: pi2ur.hpp:2841
pi_result piProgramCompile(pi_program Program, pi_uint32 NumDevices, const pi_device *DeviceList, const char *Options, pi_uint32 NumInputHeaders, const pi_program *InputHeaders, const char **HeaderIncludeNames, void(*PFnNotify)(pi_program Program, void *UserData), void *UserData)
Definition: pi2ur.hpp:2059
pi_result piextMemImageCopy(pi_queue Queue, void *DstPtr, void *SrcPtr, const pi_image_format *ImageFormat, const pi_image_desc *ImageDesc, const pi_image_copy_flags Flags, pi_image_offset SrcOffset, pi_image_offset DstOffset, pi_image_region CopyExtent, pi_image_region HostExtent, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *Event)
Definition: pi2ur.hpp:5251
void die(const char *Message)
Definition: pi.cpp:526
#define PI_ASSERT(condition, error)
Definition: pi2ur.hpp:156
int32_t pi_int32
Definition: pi.h:238
uintptr_t pi_native_handle
Definition: pi.h:243
pi_bitfield pi_map_flags
Definition: pi.h:810
_pi_result
Definition: pi.h:250
pi_uint32 pi_bool
Definition: pi.h:241
pi_bitfield pi_usm_mem_properties
Definition: pi.h:822
_pi_device_info
Definition: pi.h:330
_pi_queue_info
Definition: pi.h:538
_pi_mem_advice
Definition: pi.h:641
_pi_kernel_sub_group_info
Definition: pi.h:580
pi_bitfield pi_mem_properties
Definition: pi.h:816
_pi_kernel_group_info
Definition: pi.h:559
pi_uint64 pi_image_handle
Definition: pi.h:1253
_pi_ext_command_buffer_command * pi_ext_command_buffer_command
Definition: pi.h:2451
_pi_kernel_exec_info
Definition: pi.h:1697
_pi_platform_info
Definition: pi.h:265
@ PI_PLATFORM_INFO_NAME
Definition: pi.h:267
_pi_image_info
Definition: pi.h:570
pi_uint32 pi_ext_sync_point
Definition: pi.h:2452
_pi_profiling_info
Definition: pi.h:789
_pi_usm_migration_flags
Definition: pi.h:2075
_pi_device_type
Definition: pi.h:298
uint64_t pi_uint64
Definition: pi.h:240
pi_bitfield pi_queue_properties
Definition: pi.h:835
_pi_image_copy_flags
Definition: pi.h:718
pi_bitfield pi_sampler_properties
Definition: pi.h:766
_pi_buffer_create_type
Definition: pi.h:724
uint32_t pi_uint32
Definition: pi.h:239
_pi_event_info
Definition: pi.h:587
intptr_t pi_context_properties
Definition: pi.h:758
pi_bitfield pi_mem_flags
Definition: pi.h:800
constexpr pi_queue_properties PI_QUEUE_FLAGS
Definition: pi.h:836
void(* pi_context_extended_deleter)(void *user_data)
Definition: pi.h:1437
_pi_sampler_info
Definition: pi.h:729
_pi_kernel_info
Definition: pi.h:550
_pi_mem_alloc_info
Definition: pi.h:2058
_pi_context_info
Definition: pi.h:521
void * pi_image_mem_handle
Definition: pi.h:1254
#define _PI_PLUGIN_VERSION_CHECK(PI_API_VERSION, PI_PLUGIN_VERSION)
Definition: pi.h:216
_pi_program_info
Definition: pi.h:509
intptr_t pi_device_partition_property
Definition: pi.h:895
_pi_mem_info
Definition: pi.h:1279
pi_uint64 pi_interop_semaphore_handle
Definition: pi.h:1256
_pi_peer_attr
Definition: pi.h:1281
pi_uint64 pi_interop_mem_handle
Definition: pi.h:1255
_pi_program_build_info
Definition: pi.h:274
pi_result piextContextSetExtendedDeleter(pi_context Context, pi_context_extended_deleter Function, void *UserData)
pi_result piextQueueCreateWithNativeHandle(pi_native_handle NativeHandle, int32_t NativeHandleDesc, pi_context Context, pi_device Device, bool OwnNativeHandle, pi_queue_properties *Properties, pi_queue *Queue)
Creates PI queue object from a native handle.
pi_result piextDisablePeerAccess(pi_device command_device, pi_device peer_device)
pi_result piDeviceGetInfo(pi_device Device, pi_device_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
Returns requested info for provided native device Return PI_DEVICE_INFO_EXTENSION_DEVICELIB_ASSERT fo...
pi_result piMemBufferCreate(pi_context Context, pi_mem_flags Flags, size_t Size, void *HostPtr, pi_mem *RetMem, const pi_mem_properties *properties)
pi_result piMemRelease(pi_mem Mem)
pi_result piEventSetStatus(pi_event Event, pi_int32 ExecutionStatus)
pi_result piextEnqueueCommandBuffer(pi_ext_command_buffer CommandBuffer, pi_queue Queue, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *Event)
API to submit the command-buffer to queue for execution, returns an error if the command-buffer is no...
pi_result piextEnablePeerAccess(pi_device command_device, pi_device peer_device)
pi_result piextEnqueueDeviceGlobalVariableWrite(pi_queue Queue, pi_program Program, const char *Name, pi_bool BlockingWrite, size_t Count, size_t Offset, const void *Src, pi_uint32 NumEventsInWaitList, const pi_event *EventsWaitList, pi_event *Event)
API for writing data from host to a device global variable.
pi_result piextCommandBufferMemBufferCopy(pi_ext_command_buffer CommandBuffer, pi_mem SrcMem, pi_mem DstMem, size_t SrcOffset, size_t DstOffset, size_t Size, pi_uint32 NumSyncPointsInWaitList, const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint)
API to append a mem buffer copy command to the command-buffer.
pi_result piProgramGetBuildInfo(pi_program Program, pi_device Device, pi_program_build_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
pi_result piKernelGetGroupInfo(pi_kernel Kernel, pi_device Device, pi_kernel_group_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
pi_result piextDeviceCreateWithNativeHandle(pi_native_handle NativeHandle, pi_platform Platform, pi_device *Device)
Creates PI device object from a native handle.
pi_result piEventSetCallback(pi_event Event, pi_int32 CommandExecCallbackType, void(*PFnNotify)(pi_event Event, pi_int32 EventCommandStatus, void *UserData), void *UserData)
pi_result piextCommandBufferFinalize(pi_ext_command_buffer CommandBuffer)
API to stop command-buffer recording such that no more commands can be appended, and makes the comman...
pi_result piKernelCreate(pi_program Program, const char *KernelName, pi_kernel *RetKernel)
pi_result piProgramCompile(pi_program Program, pi_uint32 NumDevices, const pi_device *DeviceList, const char *Options, pi_uint32 NumInputHeaders, const pi_program *InputHeaders, const char **HeaderIncludeNames, void(*PFnNotify)(pi_program Program, void *UserData), void *UserData)
pi_result piextCommandBufferPrefetchUSM(pi_ext_command_buffer CommandBuffer, const void *Ptr, size_t Size, pi_usm_migration_flags Flags, pi_uint32 NumSyncPointsInWaitList, const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint)
API to append a USM Prefetch command to the command-buffer.
pi_result piextDeviceGetNativeHandle(pi_device Device, pi_native_handle *NativeHandle)
Gets the native handle of a PI device object.
pi_result piextPlatformCreateWithNativeHandle(pi_native_handle NativeHandle, pi_platform *Platform)
Creates PI platform object from a native handle.
pi_result piQueueRetain(pi_queue Queue)
pi_result piQueueRelease(pi_queue Queue)
pi_result piextCommandBufferReleaseCommand(pi_ext_command_buffer_command Command)
API to decrement the reference count of a command-buffer command.
pi_result piextMemImageGetInfo(pi_image_mem_handle MemHandle, pi_image_info ParamName, void *ParamValue, size_t *ParamValueSizeRet)
API to query an image memory handle for specific properties.
pi_result piextPluginGetOpaqueData(void *opaque_data_param, void **opaque_data_return)
API to get Plugin internal data, opaque to SYCL RT.
pi_result piextCommandBufferNDRangeKernel(pi_ext_command_buffer CommandBuffer, pi_kernel Kernel, pi_uint32 WorkDim, const size_t *GlobalWorkOffset, const size_t *GlobalWorkSize, const size_t *LocalWorkSize, pi_uint32 NumSyncPointsInWaitList, const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint, pi_ext_command_buffer_command *Command)
API to append a kernel execution command to the command-buffer.
pi_result piextEventGetNativeHandle(pi_event Event, pi_native_handle *NativeHandle)
Gets the native handle of a PI event object.
pi_result piProgramRelease(pi_program Program)
pi_result piProgramCreateWithBinary(pi_context Context, pi_uint32 NumDevices, const pi_device *DeviceList, const size_t *Lengths, const unsigned char **Binaries, size_t NumMetadataEntries, const pi_device_binary_property *Metadata, pi_int32 *BinaryStatus, pi_program *Program)
Creates a PI program for a context and loads the given binary into it.
pi_result piextMemImageFree(pi_context Context, pi_device Device, pi_image_mem_handle MemoryHandle)
API to free memory for bindless images.
void disableZeTracing()
Definition: tracing.cpp:161
pi_result piEnqueueMemBufferRead(pi_queue Queue, pi_mem Src, pi_bool BlockingRead, size_t Offset, size_t Size, void *Dst, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *Event)
pi_result piKernelSetArg(pi_kernel Kernel, pi_uint32 ArgIndex, size_t ArgSize, const void *ArgValue)
pi_result piextDeviceSelectBinary(pi_device Device, pi_device_binary *Binaries, pi_uint32 NumBinaries, pi_uint32 *SelectedBinaryInd)
Selects the most appropriate device binary based on runtime information and the IR characteristics.
pi_result piextMemCreateWithNativeHandle(pi_native_handle NativeHandle, pi_context Context, bool ownNativeHandle, pi_mem *Mem)
Creates PI mem object from a native handle.
pi_result piSamplerRelease(pi_sampler Sampler)
pi_result piDeviceRelease(pi_device Device)
pi_result piextMemUnsampledImageHandleDestroy(pi_context Context, pi_device Device, pi_image_handle Handle)
API to destroy bindless unsampled image handles.
pi_result piEnqueueMemImageRead(pi_queue Queue, pi_mem Image, pi_bool BlockingRead, pi_image_offset Origin, pi_image_region Region, size_t RowPitch, size_t SlicePitch, void *Ptr, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *Event)
pi_result piextUSMFree(pi_context Context, void *Ptr)
Indicates that the allocated USM memory is no longer needed on the runtime side.
pi_result piQueueFlush(pi_queue Queue)
pi_result piMemRetain(pi_mem Mem)
pi_result piContextGetInfo(pi_context Context, pi_context_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
pi_result piEnqueueMemBufferCopyRect(pi_queue Queue, pi_mem SrcMem, pi_mem DstMem, pi_buff_rect_offset SrcOrigin, pi_buff_rect_offset DstOrigin, pi_buff_rect_region Region, size_t SrcRowPitch, size_t SrcSlicePitch, size_t DstRowPitch, size_t DstSlicePitch, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *Event)
pi_result piKernelSetExecInfo(pi_kernel Kernel, pi_kernel_exec_info ParamName, size_t ParamValueSize, const void *ParamValue)
API to set attributes controlling kernel execution.
pi_result piSamplerGetInfo(pi_sampler Sampler, pi_sampler_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
pi_result piextProgramSetSpecializationConstant(pi_program Prog, pi_uint32 SpecID, size_t Size, const void *SpecValue)
Sets a specialization constant to a specific value.
pi_result piextUSMEnqueueMemcpy(pi_queue Queue, pi_bool Blocking, void *DstPtr, const void *SrcPtr, size_t Size, pi_uint32 NumEventsInWaitlist, const pi_event *EventsWaitlist, pi_event *Event)
USM Memcpy API.
pi_result piextQueueCreate(pi_context Context, pi_device Device, pi_queue_properties *Properties, pi_queue *Queue)
pi_result piextCommandBufferMemBufferWrite(pi_ext_command_buffer CommandBuffer, pi_mem Buffer, size_t Offset, size_t Size, const void *Ptr, pi_uint32 NumSyncPointsInWaitList, const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint)
API to append a mem buffer write command to the command-buffer.
pi_result piextMemImportOpaqueFD(pi_context Context, pi_device Device, size_t Size, int FileDescriptor, pi_interop_mem_handle *RetHandle)
[DEPRECATED] This function is deprecated in favor of piextImportExternalMemory
pi_result piEnqueueMemBufferFill(pi_queue Queue, pi_mem Buffer, const void *Pattern, size_t PatternSize, size_t Offset, size_t Size, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *Event)
pi_result piextEnqueueCooperativeKernelLaunch(pi_queue Queue, pi_kernel Kernel, pi_uint32 WorkDim, const size_t *GlobalWorkOffset, const size_t *GlobalWorkSize, const size_t *LocalWorkSize, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *OutEvent)
pi_result piextPeerAccessGetInfo(pi_device command_device, pi_device peer_device, pi_peer_attr attr, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
pi_result piextCommandBufferMemcpyUSM(pi_ext_command_buffer CommandBuffer, void *DstPtr, const void *SrcPtr, size_t Size, pi_uint32 NumSyncPointsInWaitList, const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint)
API to append a USM memcpy command to the command-buffer.
pi_result piextCommandBufferMemBufferCopyRect(pi_ext_command_buffer CommandBuffer, pi_mem SrcMem, pi_mem DstMem, pi_buff_rect_offset SrcOrigin, pi_buff_rect_offset DstOrigin, pi_buff_rect_region Region, size_t SrcRowPitch, size_t SrcSlicePitch, size_t DstRowPitch, size_t DstSlicePitch, pi_uint32 NumSyncPointsInWaitList, const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint)
API to append a rectangular mem buffer copy command to the command-buffer.
pi_result piTearDown(void *PluginParameter)
API to notify that the plugin should clean up its resources.
pi_result piextMemUnsampledImageCreate(pi_context Context, pi_device Device, pi_image_mem_handle ImgMem, pi_image_format *ImageFormat, pi_image_desc *ImageDesc, pi_image_handle *RetHandle)
API to create bindless image handles.
pi_result piextKernelGetNativeHandle(pi_kernel Kernel, pi_native_handle *NativeHandle)
Gets the native handle of a PI kernel object.
pi_result piextUSMEnqueueMemcpy2D(pi_queue Queue, pi_bool Blocking, void *DstPtr, size_t DstPitch, const void *SrcPtr, size_t SrcPitch, size_t Width, size_t Height, pi_uint32 NumEventsInWaitlist, const pi_event *EventWaitlist, pi_event *Event)
USM 2D Memcpy API.
pi_result piSamplerRetain(pi_sampler Sampler)
pi_result piextMemImageCopy(pi_queue Queue, void *DstPtr, void *SrcPtr, const pi_image_format *ImageFormat, const pi_image_desc *ImageDesc, const pi_image_copy_flags Flags, pi_image_offset SrcOffset, pi_image_offset DstOffset, pi_image_region CopyExtent, pi_image_region HostExtent, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *Event)
API to copy image data Host to Device or Device to Host.
pi_result piEventRelease(pi_event Event)
pi_result piKernelRelease(pi_kernel Kernel)
pi_result piEventGetProfilingInfo(pi_event Event, pi_profiling_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
pi_result piMemGetInfo(pi_mem Mem, pi_mem_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
pi_result piextMemSampledImageCreate(pi_context Context, pi_device Device, pi_image_mem_handle ImgMem, pi_image_format *ImageFormat, pi_image_desc *ImageDesc, pi_sampler Sampler, pi_image_handle *RetHandle)
API to create sampled bindless image handles.
pi_result piEnqueueMemBufferMap(pi_queue Queue, pi_mem Mem, pi_bool BlockingMap, pi_map_flags MapFlags, size_t Offset, size_t Size, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *OutEvent, void **RetMap)
pi_result piEnqueueMemBufferWrite(pi_queue Queue, pi_mem Buffer, pi_bool BlockingWrite, size_t Offset, size_t Size, const void *Ptr, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *Event)
pi_result piKernelGetInfo(pi_kernel Kernel, pi_kernel_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
pi_result piextUSMImport(const void *HostPtr, size_t Size, pi_context Context)
Import host system memory into USM.
pi_result piextUSMEnqueueFill2D(pi_queue Queue, void *Ptr, size_t Pitch, size_t PatternSize, const void *Pattern, size_t Width, size_t Height, pi_uint32 NumEventsWaitList, const pi_event *EventsWaitList, pi_event *Event)
USM 2D Fill API.
pi_result piPluginInit(pi_plugin *PluginInit)
pi_result piPlatformGetInfo(pi_platform Platform, pi_platform_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
pi_result piextMemMipmapGetLevel(pi_context Context, pi_device Device, pi_image_mem_handle MipMem, unsigned int Level, pi_image_mem_handle *RetMem)
API to retrieve individual image from mipmap.
pi_result piextMemMipmapFree(pi_context Context, pi_device Device, pi_image_mem_handle MemoryHandle)
API to free mipmap memory for bindless images.
pi_result piextSignalExternalSemaphore(pi_queue Queue, pi_interop_semaphore_handle SemHandle, bool HasSignalValue, pi_uint64 SignalValue, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *Event)
API to instruct the queue to signal the external semaphore handle once all previous commands have com...
pi_result piextCommandBufferRetainCommand(pi_ext_command_buffer_command Command)
API to increment the reference count of a command-buffer command.
pi_result piextUSMSharedAlloc(void **ResultPtr, pi_context Context, pi_device Device, pi_usm_mem_properties *Properties, size_t Size, pi_uint32 Alignment)
Allocates memory accessible on both host and device.
pi_result piEnqueueMemBufferWriteRect(pi_queue Queue, pi_mem Buffer, pi_bool BlockingWrite, pi_buff_rect_offset BufferOffset, pi_buff_rect_offset HostOffset, pi_buff_rect_region Region, size_t BufferRowPitch, size_t BufferSlicePitch, size_t HostRowPitch, size_t HostSlicePitch, const void *Ptr, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *Event)
pi_result piextGetDeviceFunctionPointer(pi_device Device, pi_program Program, const char *FunctionName, pi_uint64 *FunctionPointerRet)
Retrieves a device function pointer to a user-defined function.
pi_result piextUSMEnqueueMemAdvise(pi_queue Queue, const void *Ptr, size_t Length, pi_mem_advice Advice, pi_event *OutEvent)
USM memadvise API to govern behavior of automatic migration mechanisms.
pi_result piextUSMHostAlloc(void **ResultPtr, pi_context Context, pi_usm_mem_properties *Properties, size_t Size, pi_uint32 Alignment)
Allocates host memory accessible by the device.
pi_result piProgramRetain(pi_program Program)
pi_result piQueueGetInfo(pi_queue Queue, pi_queue_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
pi_result piQueueCreate(pi_context Context, pi_device Device, pi_queue_properties Flags, pi_queue *Queue)
pi_result piextGetGlobalVariablePointer(pi_device Device, pi_program Program, const char *GlobalVariableName, size_t *GlobalVariableSize, void **GlobalVariablePointerRet)
const char SupportedVersion[]
pi_result piContextRelease(pi_context Context)
pi_result piextMemMapExternalArray(pi_context Context, pi_device Device, pi_image_format *ImageFormat, pi_image_desc *ImageDesc, pi_interop_mem_handle MemHandle, pi_image_mem_handle *RetMem)
API to map an interop memory handle to an image memory handle.
pi_result piEnqueueMemBufferCopy(pi_queue Queue, pi_mem SrcMem, pi_mem DstMem, size_t SrcOffset, size_t DstOffset, size_t Size, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *Event)
pi_result piEnqueueMemImageCopy(pi_queue Queue, pi_mem SrcImage, pi_mem DstImage, pi_image_offset SrcOrigin, pi_image_offset DstOrigin, pi_image_region Region, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *Event)
pi_result piextCommandBufferUpdateKernelLaunch(pi_ext_command_buffer_command Command, pi_ext_command_buffer_update_kernel_launch_desc *Desc)
API to update a kernel launch command inside of a command-buffer.
pi_result piEventGetInfo(pi_event Event, pi_event_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
pi_result piProgramGetInfo(pi_program Program, pi_program_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
pi_result piextImportExternalSemaphoreOpaqueFD(pi_context Context, pi_device Device, int FileDescriptor, pi_interop_semaphore_handle *RetHandle)
[DEPRECATED] This function is deprecated in favor of piextImportExternalSemaphore
pi_result piextUSMEnqueueMemset2D(pi_queue Queue, void *Ptr, size_t Pitch, int Value, size_t Width, size_t Height, pi_uint32 NumEventsWaitList, const pi_event *EventsWaitlist, pi_event *Event)
USM 2D Memset API.
pi_result piextCommandBufferMemBufferWriteRect(pi_ext_command_buffer CommandBuffer, pi_mem Buffer, pi_buff_rect_offset BufferOffset, pi_buff_rect_offset HostOffset, pi_buff_rect_region Region, size_t BufferRowPitch, size_t BufferSlicePitch, size_t HostRowPitch, size_t HostSlicePitch, const void *Ptr, pi_uint32 NumSyncPointsInWaitList, const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint)
API to append a rectangular mem buffer write command to the command-buffer.
pi_result piextMemReleaseInterop(pi_context Context, pi_device Device, pi_interop_mem_handle ExtMem)
API to destroy interop memory.
pi_result piextUSMRelease(const void *HostPtr, pi_context Context)
Release host system memory from USM.
pi_result piEventsWait(pi_uint32 NumEvents, const pi_event *EventList)
pi_result piextUSMEnqueueMemset(pi_queue Queue, void *Ptr, pi_int32 Value, size_t Count, pi_uint32 NumEventsInWaitlist, const pi_event *EventsWaitlist, pi_event *Event)
USM Memset API.
pi_result piextPlatformGetNativeHandle(pi_platform Platform, pi_native_handle *NativeHandle)
Gets the native handle of a PI platform object.
pi_result piEnqueueMemBufferReadRect(pi_queue Queue, pi_mem Buffer, pi_bool BlockingRead, pi_buff_rect_offset BufferOffset, pi_buff_rect_offset HostOffset, pi_buff_rect_region Region, size_t BufferRowPitch, size_t BufferSlicePitch, size_t HostRowPitch, size_t HostSlicePitch, void *Ptr, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *Event)
pi_result piMemBufferPartition(pi_mem Buffer, pi_mem_flags Flags, pi_buffer_create_type BufferCreateType, void *BufferCreateInfo, pi_mem *RetMem)
pi_result piextDestroyExternalSemaphore(pi_context Context, pi_device Device, pi_interop_semaphore_handle SemHandle)
API to destroy the external semaphore handle.
pi_result piPluginGetLastError(char **message)
API to get Plugin specific warning and error messages.
pi_result piextCommandBufferMemBufferRead(pi_ext_command_buffer CommandBuffer, pi_mem Buffer, size_t Offset, size_t Size, void *Dst, pi_uint32 NumSyncPointsInWaitList, const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint)
API to append a mem buffer read command to the command-buffer.
pi_result piEnqueueMemImageWrite(pi_queue Queue, pi_mem Image, pi_bool BlockingWrite, pi_image_offset Origin, pi_image_region Region, size_t InputRowPitch, size_t InputSlicePitch, const void *Ptr, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *Event)
pi_result piextContextGetNativeHandle(pi_context Context, pi_native_handle *NativeHandle)
Gets the native handle of a PI context object.
pi_result piMemImageCreate(pi_context Context, pi_mem_flags Flags, const pi_image_format *ImageFormat, const pi_image_desc *ImageDesc, void *HostPtr, pi_mem *RetImage)
pi_result piextUSMGetMemAllocInfo(pi_context Context, const void *Ptr, pi_mem_alloc_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
API to query information about USM allocated pointers.
pi_result piEnqueueTimestampRecordingExp(pi_queue Queue, pi_bool Blocking, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *Event)
pi_result piEnqueueEventsWaitWithBarrier(pi_queue Queue, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *OutEvent)
pi_result piextMemSampledImageHandleDestroy(pi_context Context, pi_device Device, pi_image_handle Handle)
API to destroy bindless sampled image handles.
pi_result piQueueFinish(pi_queue Queue)
pi_result piextWaitExternalSemaphore(pi_queue Queue, pi_interop_semaphore_handle SemHandle, bool HasWaitValue, pi_uint64 WaitValue, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *Event)
API to instruct the queue with a non-blocking wait on an external semaphore.
pi_result piextMemImageCreateWithNativeHandle(pi_native_handle NativeHandle, pi_context Context, bool OwnNativeHandle, const pi_image_format *ImageFormat, const pi_image_desc *ImageDesc, pi_mem *Img)
Creates PI image object from a native handle.
pi_result piSamplerCreate(pi_context Context, const pi_sampler_properties *SamplerProperties, pi_sampler *RetSampler)
pi_result piGetDeviceAndHostTimer(pi_device Device, uint64_t *DeviceTime, uint64_t *HostTime)
Queries device for it's global timestamp in nanoseconds, and updates HostTime with the value of the h...
pi_result piPlatformsGet(pi_uint32 NumEntries, pi_platform *Platforms, pi_uint32 *NumPlatforms)
pi_result piDevicesGet(pi_platform Platform, pi_device_type DeviceType, pi_uint32 NumEntries, pi_device *Devices, pi_uint32 *NumDevices)
pi_result piEnqueueMemImageFill(pi_queue Queue, pi_mem Image, const void *FillColor, const size_t *Origin, const size_t *Region, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *Event)
pi_result piextEnqueueWriteHostPipe(pi_queue Queue, pi_program Program, const char *PipeSymbol, pi_bool Blocking, void *Ptr, size_t Size, pi_uint32 NumEventsInWaitList, const pi_event *EventsWaitList, pi_event *Event)
API for write to pipe of a given name.
pi_result piextKernelSetArgMemObj(pi_kernel Kernel, pi_uint32 ArgIndex, const pi_mem_obj_property *ArgProperties, const pi_mem *ArgValue)
pi_result piDevicePartition(pi_device Device, const pi_device_partition_property *Properties, pi_uint32 NumDevices, pi_device *OutDevices, pi_uint32 *OutNumDevices)
pi_result piextEnqueueDeviceGlobalVariableRead(pi_queue Queue, pi_program Program, const char *Name, pi_bool BlockingRead, size_t Count, size_t Offset, void *Dst, pi_uint32 NumEventsInWaitList, const pi_event *EventsWaitList, pi_event *Event)
API reading data from a device global variable to host.
pi_result piContextCreate(const pi_context_properties *Properties, pi_uint32 NumDevices, const pi_device *Devices, void(*PFnNotify)(const char *ErrInfo, const void *PrivateInfo, size_t CB, void *UserData), void *UserData, pi_context *RetContext)
pi_result piextUSMDeviceAlloc(void **ResultPtr, pi_context Context, pi_device Device, pi_usm_mem_properties *Properties, size_t Size, pi_uint32 Alignment)
Allocates device memory.
pi_result piextKernelSetArgSampler(pi_kernel Kernel, pi_uint32 ArgIndex, const pi_sampler *ArgValue)
pi_result piextMemGetNativeHandle(pi_mem Mem, pi_device Dev, pi_native_handle *NativeHandle)
Gets the native handle of a PI mem object.
pi_result piextEnqueueReadHostPipe(pi_queue Queue, pi_program Program, const char *PipeSymbol, pi_bool Blocking, void *Ptr, size_t Size, pi_uint32 NumEventsInWaitList, const pi_event *EventsWaitList, pi_event *Event)
API for Read from host pipe.
pi_result piextUSMEnqueuePrefetch(pi_queue Queue, const void *Ptr, size_t Size, pi_usm_migration_flags Flags, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *OutEvent)
Hint to migrate memory to the device.
pi_result piEnqueueKernelLaunch(pi_queue Queue, pi_kernel Kernel, pi_uint32 WorkDim, const size_t *GlobalWorkOffset, const size_t *GlobalWorkSize, const size_t *LocalWorkSize, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *OutEvent)
pi_result piextCommandBufferFillUSM(pi_ext_command_buffer CommandBuffer, void *Ptr, const void *Pattern, size_t PatternSize, size_t Size, pi_uint32 NumSyncPointsInWaitList, const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint)
API to append a USM fill command to the command-buffer.
pi_result piextCommandBufferRetain(pi_ext_command_buffer CommandBuffer)
API to increment the reference count of the command-buffer.
void enableZeTracing()
Definition: tracing.cpp:43
pi_result piProgramBuild(pi_program Program, pi_uint32 NumDevices, const pi_device *DeviceList, const char *Options, void(*PFnNotify)(pi_program Program, void *UserData), void *UserData)
pi_result piextImportExternalMemory(pi_context Context, pi_device Device, pi_external_mem_descriptor *MemDesc, pi_interop_mem_handle *RetHandle)
API to import external memory.
pi_result piKernelRetain(pi_kernel Kernel)
pi_result piEventRetain(pi_event Event)
pi_result piextContextCreateWithNativeHandle(pi_native_handle NativeHandle, pi_uint32 NumDevices, const pi_device *Devices, bool OwnNativeHandle, pi_context *RetContext)
Creates PI context object from a native handle.
pi_result piextCommandBufferRelease(pi_ext_command_buffer CommandBuffer)
API to decrement the reference count of the command-buffer.
pi_result piPluginGetBackendOption(pi_platform platform, const char *frontend_option, const char **backend_option)
API to get backend specific option.
pi_result piextCommandBufferMemBufferFill(pi_ext_command_buffer CommandBuffer, pi_mem Buffer, const void *Pattern, size_t PatternSize, size_t Offset, size_t Size, pi_uint32 NumSyncPointsInWaitList, const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint)
API to append a mem buffer fill command to the command-buffer.
pi_result piProgramLink(pi_context Context, pi_uint32 NumDevices, const pi_device *DeviceList, const char *Options, pi_uint32 NumInputPrograms, const pi_program *InputPrograms, void(*PFnNotify)(pi_program Program, void *UserData), void *UserData, pi_program *RetProgram)
pi_result piextProgramCreateWithNativeHandle(pi_native_handle NativeHandle, pi_context Context, bool OwnNativeHandle, pi_program *Program)
Creates PI program object from a native handle.
pi_result piextCommandBufferAdviseUSM(pi_ext_command_buffer CommandBuffer, const void *Ptr, size_t Length, pi_mem_advice Advice, pi_uint32 NumSyncPointsInWaitList, const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint)
API to append a USM Advise command to the command-buffer.
pi_result piextEventCreateWithNativeHandle(pi_native_handle NativeHandle, pi_context Context, bool OwnNativeHandle, pi_event *Event)
Creates PI event object from a native handle.
pi_result piMemImageGetInfo(pi_mem Image, pi_image_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
pi_result piEnqueueEventsWait(pi_queue Queue, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *OutEvent)
pi_result piextImportExternalSemaphore(pi_context Context, pi_device Device, pi_external_semaphore_descriptor *SemDesc, pi_interop_semaphore_handle *RetHandle)
API to import an external semaphore.
pi_result piDeviceRetain(pi_device Device)
decltype(piEventCreate) piEventCreate
pi_result piextQueueGetNativeHandle(pi_queue Queue, pi_native_handle *NativeHandle, int32_t *NativeHandleDesc)
Gets the native handle of a PI queue object.
pi_result piextUSMPitchedAlloc(void **ResultPtr, size_t *ResultPitch, pi_context Context, pi_device Device, pi_usm_mem_properties *Properties, size_t WidthInBytes, size_t Height, unsigned int ElementSizeBytes)
Allocates memory accessible on device.
pi_result piextCommandBufferCreate(pi_context Context, pi_device Device, const pi_ext_command_buffer_desc *Desc, pi_ext_command_buffer *RetCommandBuffer)
API to create a command-buffer.
pi_result piextCommandBufferMemBufferReadRect(pi_ext_command_buffer CommandBuffer, pi_mem Buffer, pi_buff_rect_offset BufferOffset, pi_buff_rect_offset HostOffset, pi_buff_rect_region Region, size_t BufferRowPitch, size_t BufferSlicePitch, size_t HostRowPitch, size_t HostSlicePitch, void *Ptr, pi_uint32 NumSyncPointsInWaitList, const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint)
API to append a rectangular mem buffer read command to the command-buffer.
pi_result piContextRetain(pi_context Context)
pi_result piextKernelSetArgPointer(pi_kernel Kernel, pi_uint32 ArgIndex, size_t ArgSize, const void *ArgValue)
Sets up pointer arguments for CL kernels.
pi_result piextKernelSuggestMaxCooperativeGroupCount(pi_kernel Kernel, size_t LocalWorkSize, size_t DynamicSharedMemorySize, pi_uint32 *GroupCountRet)
Gets the max work group count for a cooperative kernel.
pi_result piKernelGetSubGroupInfo(pi_kernel Kernel, pi_device Device, pi_kernel_sub_group_info ParamName, size_t InputValueSize, const void *InputValue, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
API to query information from the sub-group from a kernel.
pi_result piextBindlessImageSamplerCreate(pi_context Context, const pi_sampler_properties *SamplerProperties, float MinMipmapLevelClamp, float MaxMipmapLevelClamp, float MaxAnisotropy, pi_sampler *RetSampler)
API to create samplers for bindless images.
pi_result piEnqueueMemUnmap(pi_queue Queue, pi_mem Mem, void *MappedPtr, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *OutEvent)
pi_result piextMemImageAllocate(pi_context Context, pi_device Device, pi_image_format *ImageFormat, pi_image_desc *ImageDesc, pi_image_mem_handle *RetMem)
API to allocate memory for bindless images.
pi_result piProgramCreate(pi_context Context, const void *ILBytes, size_t Length, pi_program *Program)
pi_result piextKernelCreateWithNativeHandle(pi_native_handle NativeHandle, pi_context Context, pi_program Program, bool OwnNativeHandle, pi_kernel *Kernel)
Creates PI kernel object from a native handle.
pi_result piextProgramGetNativeHandle(pi_program Program, pi_native_handle *NativeHandle)
Gets the native handle of a PI program object.
Declarations for Level Zero Plugin.
#define _PI_LEVEL_ZERO_PLUGIN_VERSION_STRING
char PluginVersion[20]
Definition: pi.h:3077
char PiVersion[20]
Definition: pi.h:3075
This struct is a record of the device binary information.
Definition: pi.h:1067