DPC++ Runtime
Runtime libraries for oneAPI DPC++
pi_cuda.cpp
Go to the documentation of this file.
1 //==---------- pi_cuda.cpp - CUDA 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_cuda.hpp>
16 #include <sycl/detail/defines.hpp>
17 #include <sycl/detail/pi.hpp>
18 
19 // Forward declarations
20 struct cuda_tracing_context_t_;
21 
22 void enableCUDATracing(cuda_tracing_context_t_ *ctx);
23 void disableCUDATracing(cuda_tracing_context_t_ *ctx);
24 cuda_tracing_context_t_ *createCUDATracingContext();
25 void freeCUDATracingContext(cuda_tracing_context_t_ *Ctx);
26 
27 //-- PI API implementation
28 extern "C" {
29 
31  pi_uint32 *NumPlatforms) {
32  return pi2ur::piPlatformsGet(NumEntries, Platforms, NumPlatforms);
33 }
34 
36  size_t ParamValueSize, void *ParamValue,
37  size_t *ParamValueSizeRet) {
38  return pi2ur::piPlatformGetInfo(Platform, ParamName, ParamValueSize,
39  ParamValue, ParamValueSizeRet);
40 }
41 
43  pi_native_handle *NativeHandle) {
44  return pi2ur::piextPlatformGetNativeHandle(Platform, NativeHandle);
45 }
46 
48  pi_platform *Platform) {
49  return pi2ur::piextPlatformCreateWithNativeHandle(NativeHandle, Platform);
50 }
51 
53  return pi2ur::piPluginGetLastError(message);
54 }
55 
57  const char *frontend_option,
58  const char **backend_option) {
59  return pi2ur::piPluginGetBackendOption(platform, frontend_option,
60  backend_option);
61 }
62 
64  pi_uint32 NumEntries, pi_device *Devices,
65  pi_uint32 *NumDevices) {
66  return pi2ur::piDevicesGet(Platform, DeviceType, NumEntries, Devices,
67  NumDevices);
68 }
69 
71  return pi2ur::piDeviceRetain(Device);
72 }
73 
75  return pi2ur::piDeviceRelease(Device);
76 }
77 
79  size_t ParamValueSize, void *ParamValue,
80  size_t *ParamValueSizeRet) {
81  return pi2ur::piDeviceGetInfo(Device, ParamName, ParamValueSize, ParamValue,
82  ParamValueSizeRet);
83 }
84 
86  const pi_device_partition_property *Properties,
87  pi_uint32 NumDevices, pi_device *OutDevices,
88  pi_uint32 *OutNumDevices) {
89  return pi2ur::piDevicePartition(Device, Properties, NumDevices, OutDevices,
90  OutNumDevices);
91 }
92 
94  pi_uint32 NumBinaries,
95  pi_uint32 *SelectedBinaryInd) {
96  return pi2ur::piextDeviceSelectBinary(Device, Binaries, NumBinaries,
97  SelectedBinaryInd);
98 }
99 
101  pi_native_handle *NativeHandle) {
102 
103  return pi2ur::piextDeviceGetNativeHandle(Device, NativeHandle);
104 }
105 
107  pi_platform Platform,
108  pi_device *Device) {
109 
110  return pi2ur::piextDeviceCreateWithNativeHandle(NativeHandle, Platform,
111  Device);
112 }
113 
115  pi_uint32 NumDevices, const pi_device *Devices,
116  void (*PFnNotify)(const char *ErrInfo,
117  const void *PrivateInfo, size_t CB,
118  void *UserData),
119  void *UserData, pi_context *RetContext) {
120  return pi2ur::piContextCreate(Properties, NumDevices, Devices, PFnNotify,
121  UserData, RetContext);
122 }
123 
125  size_t ParamValueSize, void *ParamValue,
126  size_t *ParamValueSizeRet) {
127 
128  return pi2ur::piContextGetInfo(Context, ParamName, ParamValueSize, ParamValue,
129  ParamValueSizeRet);
130 }
131 
134  void *UserData) {
135  return pi2ur::piextContextSetExtendedDeleter(Context, Function, UserData);
136 }
137 
139  pi_native_handle *NativeHandle) {
140  return pi2ur::piextContextGetNativeHandle(Context, NativeHandle);
141 }
142 
144  pi_uint32 NumDevices,
145  const pi_device *Devices,
146  bool OwnNativeHandle,
147  pi_context *RetContext) {
149  NativeHandle, NumDevices, Devices, OwnNativeHandle, RetContext);
150 }
151 
153 
154  return pi2ur::piContextRetain(Context);
155 }
156 
158  return pi2ur::piContextRelease(Context);
159 }
160 
162  pi_queue_properties Flags, pi_queue *Queue) {
163  pi_queue_properties Properties[] = {PI_QUEUE_FLAGS, Flags, 0};
164  return piextQueueCreate(Context, Device, Properties, Queue);
165 }
166 
168  pi_queue_properties *Properties, pi_queue *Queue) {
169  return pi2ur::piextQueueCreate(Context, Device, Properties, Queue);
170 }
171 
173  size_t ParamValueSize, void *ParamValue,
174  size_t *ParamValueSizeRet) {
175 
176  return pi2ur::piQueueGetInfo(Queue, ParamName, ParamValueSize, ParamValue,
177  ParamValueSizeRet);
178 }
179 
181 
183  return pi2ur::piQueueRelease(Queue);
184 }
185 
187 
189 
191  pi_native_handle *NativeHandle,
192  int32_t *NativeHandleDesc) {
193 
194  return pi2ur::piextQueueGetNativeHandle(Queue, NativeHandle,
195  NativeHandleDesc);
196 }
197 
199  int32_t NativeHandleDesc,
200  pi_context Context, pi_device Device,
201  bool OwnNativeHandle,
202  pi_queue_properties *Properties,
203  pi_queue *Queue) {
204 
206  NativeHandle, NativeHandleDesc, Context, Device, OwnNativeHandle,
207  Properties, Queue);
208 }
209 
211  void *HostPtr, pi_mem *RetMem,
212  const pi_mem_properties *properties) {
213  return pi2ur::piMemBufferCreate(Context, Flags, Size, HostPtr, RetMem,
214  properties);
215 }
216 
217 pi_result piMemGetInfo(pi_mem Mem, pi_mem_info ParamName, size_t ParamValueSize,
218  void *ParamValue, size_t *ParamValueSizeRet) {
219  return pi2ur::piMemGetInfo(Mem, ParamName, ParamValueSize, ParamValue,
220  ParamValueSizeRet);
221 }
222 
224 
226 
228  const pi_image_format *ImageFormat,
229  const pi_image_desc *ImageDesc, void *HostPtr,
230  pi_mem *RetImage) {
231 
232  return pi2ur::piMemImageCreate(Context, Flags, ImageFormat, ImageDesc,
233  HostPtr, RetImage);
234 }
235 
237  pi_native_handle *NativeHandle) {
238  return pi2ur::piextMemGetNativeHandle(Mem, Dev, NativeHandle);
239 }
240 
242  pi_context Context,
243  bool ownNativeHandle, pi_mem *Mem) {
244  return pi2ur::piextMemCreateWithNativeHandle(NativeHandle, Context,
245  ownNativeHandle, Mem);
246 }
247 
248 pi_result piProgramCreate(pi_context Context, const void *ILBytes,
249  size_t Length, pi_program *Program) {
250  return pi2ur::piProgramCreate(Context, ILBytes, Length, Program);
251 }
252 
254  pi_context Context, pi_uint32 NumDevices, const pi_device *DeviceList,
255  const size_t *Lengths, const unsigned char **Binaries,
256  size_t NumMetadataEntries, const pi_device_binary_property *Metadata,
257  pi_int32 *BinaryStatus, pi_program *Program) {
258 
259  return pi2ur::piProgramCreateWithBinary(Context, NumDevices, DeviceList,
260  Lengths, Binaries, NumMetadataEntries,
261  Metadata, BinaryStatus, Program);
262 }
263 
265  pi_native_handle NativeHandle, pi_context Context, bool OwnNativeHandle,
266  const pi_image_format *ImageFormat, const pi_image_desc *ImageDesc,
267  pi_mem *Img) {
269  NativeHandle, Context, OwnNativeHandle, ImageFormat, ImageDesc, Img);
270 }
271 
273  size_t ParamValueSize, void *ParamValue,
274  size_t *ParamValueSizeRet) {
275 
276  return pi2ur::piProgramGetInfo(Program, ParamName, ParamValueSize, ParamValue,
277  ParamValueSizeRet);
278 }
279 
281  const pi_device *DeviceList, const char *Options,
282  pi_uint32 NumInputPrograms,
283  const pi_program *InputPrograms,
284  void (*PFnNotify)(pi_program Program, void *UserData),
285  void *UserData, pi_program *RetProgram) {
286  return pi2ur::piProgramLink(Context, NumDevices, DeviceList, Options,
287  NumInputPrograms, InputPrograms, PFnNotify,
288  UserData, RetProgram);
289 }
290 
292  pi_program Program, pi_uint32 NumDevices, const pi_device *DeviceList,
293  const char *Options, pi_uint32 NumInputHeaders,
294  const pi_program *InputHeaders, const char **HeaderIncludeNames,
295  void (*PFnNotify)(pi_program Program, void *UserData), void *UserData) {
296 
297  return pi2ur::piProgramCompile(Program, NumDevices, DeviceList, Options,
298  NumInputHeaders, InputHeaders,
299  HeaderIncludeNames, PFnNotify, UserData);
300 }
301 
303  const pi_device *DeviceList, const char *Options,
304  void (*PFnNotify)(pi_program Program, void *UserData),
305  void *UserData) {
306  return pi2ur::piProgramBuild(Program, NumDevices, DeviceList, Options,
307  PFnNotify, UserData);
308 }
309 
311  pi_program_build_info ParamName,
312  size_t ParamValueSize, void *ParamValue,
313  size_t *ParamValueSizeRet) {
314 
315  return pi2ur::piProgramGetBuildInfo(Program, Device, ParamName,
316  ParamValueSize, ParamValue,
317  ParamValueSizeRet);
318 }
319 
321  return pi2ur::piProgramRetain(Program);
322 }
323 
325  return pi2ur::piProgramRelease(Program);
326 }
327 
329  pi_native_handle *NativeHandle) {
330  return pi2ur::piextProgramGetNativeHandle(Program, NativeHandle);
331 }
332 
334  pi_context Context,
335  bool OwnNativeHandle,
336  pi_program *Program) {
337  return pi2ur::piextProgramCreateWithNativeHandle(NativeHandle, Context,
338  OwnNativeHandle, Program);
339 }
340 
341 pi_result piKernelCreate(pi_program Program, const char *KernelName,
342  pi_kernel *RetKernel) {
343 
344  return pi2ur::piKernelCreate(Program, KernelName, RetKernel);
345 }
346 
347 pi_result piKernelSetArg(pi_kernel Kernel, pi_uint32 ArgIndex, size_t ArgSize,
348  const void *ArgValue) {
349 
350  return pi2ur::piKernelSetArg(Kernel, ArgIndex, ArgSize, ArgValue);
351 }
352 
354  const pi_mem_obj_property *ArgProperties,
355  const pi_mem *ArgValue) {
356  return pi2ur::piextKernelSetArgMemObj(Kernel, ArgIndex, ArgProperties,
357  ArgValue);
358 }
359 
361  const pi_sampler *ArgValue) {
362 
363  return pi2ur::piextKernelSetArgSampler(Kernel, ArgIndex, ArgValue);
364 }
365 
367  size_t ParamValueSize, void *ParamValue,
368  size_t *ParamValueSizeRet) {
369 
370  return pi2ur::piKernelGetInfo(Kernel, ParamName, ParamValueSize, ParamValue,
371  ParamValueSizeRet);
372 }
373 
375  pi_device Device,
376  pi_image_format *ImageFormat,
377  pi_image_desc *ImageDesc,
378  pi_image_mem_handle *RetMem) {
379  return pi2ur::piextMemImageAllocate(Context, Device, ImageFormat, ImageDesc,
380  RetMem);
381 }
382 
384  pi_context Context, pi_device Device, pi_image_mem_handle ImgMem,
385  pi_image_format *ImageFormat, pi_image_desc *ImageDesc, pi_mem *RetMem,
386  pi_image_handle *RetHandle) {
388  Context, Device, ImgMem, ImageFormat, ImageDesc, RetMem, RetHandle);
389 }
390 
392  pi_context Context, pi_device Device, pi_image_mem_handle ImgMem,
393  pi_image_format *ImageFormat, pi_image_desc *ImageDesc, pi_sampler Sampler,
394  pi_mem *RetMem, pi_image_handle *RetHandle) {
395  return pi2ur::piextMemSampledImageCreate(Context, Device, ImgMem, ImageFormat,
396  ImageDesc, Sampler, RetMem,
397  RetHandle);
398 }
399 
401  pi_context Context, const pi_sampler_properties *SamplerProperties,
402  float MinMipmapLevelClamp, float MaxMipmapLevelClamp, float MaxAnisotropy,
403  pi_sampler *RetSampler) {
405  Context, SamplerProperties, MinMipmapLevelClamp, MaxMipmapLevelClamp,
406  MaxAnisotropy, RetSampler);
407 }
408 
410  pi_device Device,
411  pi_image_mem_handle MipMem,
412  unsigned int Level,
413  pi_image_mem_handle *RetMem) {
414  return pi2ur::piextMemMipmapGetLevel(Context, Device, MipMem, Level, RetMem);
415 }
416 
417 __SYCL_EXPORT pi_result piextMemImageFree(pi_context Context, pi_device Device,
418  pi_image_mem_handle MemoryHandle) {
419  return pi2ur::piextMemImageFree(Context, Device, MemoryHandle);
420 }
421 
422 __SYCL_EXPORT pi_result piextMemMipmapFree(pi_context Context, pi_device Device,
423  pi_image_mem_handle MemoryHandle) {
424  return pi2ur::piextMemMipmapFree(Context, Device, MemoryHandle);
425 }
426 
428  pi_queue Queue, void *DstPtr, void *SrcPtr,
429  const pi_image_format *ImageFormat, const pi_image_desc *ImageDesc,
430  const pi_image_copy_flags Flags, pi_image_offset SrcOffset,
431  pi_image_offset DstOffset, pi_image_region CopyExtent,
432  pi_image_region HostExtent, pi_uint32 NumEventsInWaitList,
433  const pi_event *EventWaitList, pi_event *Event) {
434  return pi2ur::piextMemImageCopy(Queue, DstPtr, SrcPtr, ImageFormat, ImageDesc,
435  Flags, SrcOffset, DstOffset, CopyExtent,
436  HostExtent, NumEventsInWaitList,
437  EventWaitList, Event);
438 }
439 
441  pi_context Context, pi_device Device, pi_image_handle Handle) {
442  return pi2ur::piextMemUnsampledImageHandleDestroy(Context, Device, Handle);
443 }
444 
446  pi_context Context, pi_device Device, pi_image_handle Handle) {
447  return pi2ur::piextMemSampledImageHandleDestroy(Context, Device, Handle);
448 }
449 
451  pi_image_info ParamName,
452  void *ParamValue,
453  size_t *ParamValueSizeRet) {
454  return pi2ur::piextMemImageGetInfo(MemHandle, ParamName, ParamValue,
455  ParamValueSizeRet);
456 }
457 
458 __SYCL_EXPORT pi_result
459 piextMemImportOpaqueFD(pi_context Context, pi_device Device, size_t Size,
460  int FileDescriptor, pi_interop_mem_handle *RetHandle) {
461  return pi2ur::piextMemImportOpaqueFD(Context, Device, Size, FileDescriptor,
462  RetHandle);
463 }
464 
466  pi_context Context, pi_device Device, pi_image_format *ImageFormat,
467  pi_image_desc *ImageDesc, pi_interop_mem_handle MemHandle,
468  pi_image_mem_handle *RetMem) {
469  return pi2ur::piextMemMapExternalArray(Context, Device, ImageFormat,
470  ImageDesc, MemHandle, RetMem);
471 }
472 
474  pi_device Device,
475  pi_interop_mem_handle ExtMem) {
476  return pi2ur::piextMemReleaseInterop(Context, Device, ExtMem);
477 }
478 
480  pi_context Context, pi_device Device, int FileDescriptor,
481  pi_interop_semaphore_handle *RetHandle) {
482  return pi2ur::piextImportExternalSemaphoreOpaqueFD(Context, Device,
483  FileDescriptor, RetHandle);
484 }
485 
486 __SYCL_EXPORT pi_result
488  pi_interop_semaphore_handle SemHandle) {
489  return pi2ur::piextDestroyExternalSemaphore(Context, Device, SemHandle);
490 }
491 
493  pi_queue Queue, pi_interop_semaphore_handle SemHandle,
494  pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList,
495  pi_event *Event) {
497  Queue, SemHandle, NumEventsInWaitList, EventWaitList, Event);
498 }
499 
501  pi_queue Queue, pi_interop_semaphore_handle SemHandle,
502  pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList,
503  pi_event *Event) {
505  Queue, SemHandle, NumEventsInWaitList, EventWaitList, Event);
506 }
507 
509  pi_kernel_group_info ParamName,
510  size_t ParamValueSize, void *ParamValue,
511  size_t *ParamValueSizeRet) {
512  return pi2ur::piKernelGetGroupInfo(Kernel, Device, ParamName, ParamValueSize,
513  ParamValue, ParamValueSizeRet);
514 }
515 
517  pi_kernel_sub_group_info ParamName,
518  size_t InputValueSize, const void *InputValue,
519  size_t ParamValueSize, void *ParamValue,
520  size_t *ParamValueSizeRet) {
522  Kernel, Device, ParamName, InputValueSize, InputValue, ParamValueSize,
523  ParamValue, ParamValueSizeRet);
524 }
525 
527 
528  return pi2ur::piKernelRetain(Kernel);
529 }
530 
532 
533  return pi2ur::piKernelRelease(Kernel);
534 }
535 
536 pi_result
538  const size_t *GlobalWorkOffset,
539  const size_t *GlobalWorkSize, const size_t *LocalWorkSize,
540  pi_uint32 NumEventsInWaitList,
541  const pi_event *EventWaitList, pi_event *OutEvent) {
543  Queue, Kernel, WorkDim, GlobalWorkOffset, GlobalWorkSize, LocalWorkSize,
544  NumEventsInWaitList, EventWaitList, OutEvent);
545 }
546 
548  pi_context Context,
549  pi_program Program,
550  bool OwnNativeHandle,
551  pi_kernel *Kernel) {
552 
554  NativeHandle, Context, Program, OwnNativeHandle, Kernel);
555 }
556 
558  pi_native_handle *NativeHandle) {
559  return pi2ur::piextKernelGetNativeHandle(Kernel, NativeHandle);
560 }
561 
563  return pi2ur::piEventCreate(Context, RetEvent);
564 }
565 
567  size_t ParamValueSize, void *ParamValue,
568  size_t *ParamValueSizeRet) {
569  return pi2ur::piEventGetInfo(Event, ParamName, ParamValueSize, ParamValue,
570  ParamValueSizeRet);
571 }
572 
574  size_t ParamValueSize, void *ParamValue,
575  size_t *ParamValueSizeRet) {
576 
577  return pi2ur::piEventGetProfilingInfo(Event, ParamName, ParamValueSize,
578  ParamValue, ParamValueSizeRet);
579 }
580 
581 pi_result piEventsWait(pi_uint32 NumEvents, const pi_event *EventList) {
582  return pi2ur::piEventsWait(NumEvents, EventList);
583 }
584 
585 pi_result piEventSetCallback(pi_event Event, pi_int32 CommandExecCallbackType,
586  void (*PFnNotify)(pi_event Event,
587  pi_int32 EventCommandStatus,
588  void *UserData),
589  void *UserData) {
590  return pi2ur::piEventSetCallback(Event, CommandExecCallbackType, PFnNotify,
591  UserData);
592 }
593 
594 pi_result piEventSetStatus(pi_event Event, pi_int32 ExecutionStatus) {
595  return pi2ur::piEventSetStatus(Event, ExecutionStatus);
596 }
597 
599 
601  return pi2ur::piEventRelease(Event);
602 }
603 
605  pi_native_handle *NativeHandle) {
606 
607  return pi2ur::piextEventGetNativeHandle(Event, NativeHandle);
608 }
609 
611  pi_context Context,
612  bool OwnNativeHandle,
613  pi_event *Event) {
614  return pi2ur::piextEventCreateWithNativeHandle(NativeHandle, Context,
615  OwnNativeHandle, Event);
616 }
617 
619  const pi_sampler_properties *SamplerProperties,
620  pi_sampler *RetSampler) {
621  return pi2ur::piSamplerCreate(Context, SamplerProperties, RetSampler);
622 }
623 
625  size_t ParamValueSize, void *ParamValue,
626  size_t *ParamValueSizeRet) {
627 
628  return pi2ur::piSamplerGetInfo(Sampler, ParamName, ParamValueSize, ParamValue,
629  ParamValueSizeRet);
630 }
631 
633  return pi2ur::piSamplerRetain(Sampler);
634 }
635 
637  return pi2ur::piSamplerRelease(Sampler);
638 }
639 
640 pi_result piEnqueueEventsWait(pi_queue Queue, pi_uint32 NumEventsInWaitList,
641  const pi_event *EventWaitList,
642  pi_event *OutEvent) {
643 
644  return pi2ur::piEnqueueEventsWait(Queue, NumEventsInWaitList, EventWaitList,
645  OutEvent);
646 }
647 
649  pi_uint32 NumEventsInWaitList,
650  const pi_event *EventWaitList,
651  pi_event *OutEvent) {
652 
653  return pi2ur::piEnqueueEventsWaitWithBarrier(Queue, NumEventsInWaitList,
654  EventWaitList, OutEvent);
655 }
656 
658  pi_bool BlockingRead, size_t Offset,
659  size_t Size, void *Dst,
660  pi_uint32 NumEventsInWaitList,
661  const pi_event *EventWaitList,
662  pi_event *Event) {
663 
664  return pi2ur::piEnqueueMemBufferRead(Queue, Src, BlockingRead, Offset, Size,
665  Dst, NumEventsInWaitList, EventWaitList,
666  Event);
667 }
668 
670  pi_queue Queue, pi_mem Buffer, pi_bool BlockingRead,
671  pi_buff_rect_offset BufferOffset, pi_buff_rect_offset HostOffset,
672  pi_buff_rect_region Region, size_t BufferRowPitch, size_t BufferSlicePitch,
673  size_t HostRowPitch, size_t HostSlicePitch, void *Ptr,
674  pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList,
675  pi_event *Event) {
676 
678  Queue, Buffer, BlockingRead, BufferOffset, HostOffset, Region,
679  BufferRowPitch, BufferSlicePitch, HostRowPitch, HostSlicePitch, Ptr,
680  NumEventsInWaitList, EventWaitList, Event);
681 }
682 
684  pi_bool BlockingWrite, size_t Offset,
685  size_t Size, const void *Ptr,
686  pi_uint32 NumEventsInWaitList,
687  const pi_event *EventWaitList,
688  pi_event *Event) {
689 
690  return pi2ur::piEnqueueMemBufferWrite(Queue, Buffer, BlockingWrite, Offset,
691  Size, Ptr, NumEventsInWaitList,
692  EventWaitList, Event);
693 }
694 
696  pi_queue Queue, pi_mem Buffer, pi_bool BlockingWrite,
697  pi_buff_rect_offset BufferOffset, pi_buff_rect_offset HostOffset,
698  pi_buff_rect_region Region, size_t BufferRowPitch, size_t BufferSlicePitch,
699  size_t HostRowPitch, size_t HostSlicePitch, const void *Ptr,
700  pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList,
701  pi_event *Event) {
702 
704  Queue, Buffer, BlockingWrite, BufferOffset, HostOffset, Region,
705  BufferRowPitch, BufferSlicePitch, HostRowPitch, HostSlicePitch, Ptr,
706  NumEventsInWaitList, EventWaitList, Event);
707 }
708 
710  size_t SrcOffset, size_t DstOffset,
711  size_t Size, pi_uint32 NumEventsInWaitList,
712  const pi_event *EventWaitList,
713  pi_event *Event) {
714 
715  return pi2ur::piEnqueueMemBufferCopy(Queue, SrcMem, DstMem, SrcOffset,
716  DstOffset, Size, NumEventsInWaitList,
717  EventWaitList, Event);
718 }
719 
721  pi_queue Queue, pi_mem SrcMem, pi_mem DstMem, pi_buff_rect_offset SrcOrigin,
722  pi_buff_rect_offset DstOrigin, pi_buff_rect_region Region,
723  size_t SrcRowPitch, size_t SrcSlicePitch, size_t DstRowPitch,
724  size_t DstSlicePitch, pi_uint32 NumEventsInWaitList,
725  const pi_event *EventWaitList, pi_event *Event) {
726 
728  Queue, SrcMem, DstMem, SrcOrigin, DstOrigin, Region, SrcRowPitch,
729  SrcSlicePitch, DstRowPitch, DstSlicePitch, NumEventsInWaitList,
730  EventWaitList, Event);
731 }
732 
734  const void *Pattern, size_t PatternSize,
735  size_t Offset, size_t Size,
736  pi_uint32 NumEventsInWaitList,
737  const pi_event *EventWaitList,
738  pi_event *Event) {
739 
740  return pi2ur::piEnqueueMemBufferFill(Queue, Buffer, Pattern, PatternSize,
741  Offset, Size, NumEventsInWaitList,
742  EventWaitList, Event);
743 }
744 
746  pi_map_flags MapFlags, size_t Offset,
747  size_t Size, pi_uint32 NumEventsInWaitList,
748  const pi_event *EventWaitList,
749  pi_event *OutEvent, void **RetMap) {
750 
751  return pi2ur::piEnqueueMemBufferMap(Queue, Mem, BlockingMap, MapFlags, Offset,
752  Size, NumEventsInWaitList, EventWaitList,
753  OutEvent, RetMap);
754 }
755 
756 pi_result piEnqueueMemUnmap(pi_queue Queue, pi_mem Mem, void *MappedPtr,
757  pi_uint32 NumEventsInWaitList,
758  const pi_event *EventWaitList, pi_event *OutEvent) {
759 
760  return pi2ur::piEnqueueMemUnmap(Queue, Mem, MappedPtr, NumEventsInWaitList,
761  EventWaitList, OutEvent);
762 }
763 
765  size_t ParamValueSize, void *ParamValue,
766  size_t *ParamValueSizeRet) {
767 
768  return pi2ur::piMemImageGetInfo(Image, ParamName, ParamValueSize, ParamValue,
769  ParamValueSizeRet);
770 }
771 
773  pi_bool BlockingRead, pi_image_offset Origin,
774  pi_image_region Region, size_t RowPitch,
775  size_t SlicePitch, void *Ptr,
776  pi_uint32 NumEventsInWaitList,
777  const pi_event *EventWaitList,
778  pi_event *Event) {
780  Queue, Image, BlockingRead, Origin, Region, RowPitch, SlicePitch, Ptr,
781  NumEventsInWaitList, EventWaitList, Event);
782 }
783 
785  pi_bool BlockingWrite, pi_image_offset Origin,
786  pi_image_region Region, size_t InputRowPitch,
787  size_t InputSlicePitch, const void *Ptr,
788  pi_uint32 NumEventsInWaitList,
789  const pi_event *EventWaitList,
790  pi_event *Event) {
791 
793  Queue, Image, BlockingWrite, Origin, Region, InputRowPitch,
794  InputSlicePitch, Ptr, NumEventsInWaitList, EventWaitList, Event);
795 }
796 
797 pi_result
798 piEnqueueMemImageCopy(pi_queue Queue, pi_mem SrcImage, pi_mem DstImage,
799  pi_image_offset SrcOrigin, pi_image_offset DstOrigin,
800  pi_image_region Region, pi_uint32 NumEventsInWaitList,
801  const pi_event *EventWaitList, pi_event *Event) {
802  return pi2ur::piEnqueueMemImageCopy(Queue, SrcImage, DstImage, SrcOrigin,
803  DstOrigin, Region, NumEventsInWaitList,
804  EventWaitList, Event);
805 }
806 
808  const void *FillColor, const size_t *Origin,
809  const size_t *Region,
810  pi_uint32 NumEventsInWaitList,
811  const pi_event *EventWaitList,
812  pi_event *Event) {
813 
814  return pi2ur::piEnqueueMemImageFill(Queue, Image, FillColor, Origin, Region,
815  NumEventsInWaitList, EventWaitList,
816  Event);
817 }
818 
820  pi_buffer_create_type BufferCreateType,
821  void *BufferCreateInfo, pi_mem *RetMem) {
822 
823  return pi2ur::piMemBufferPartition(Buffer, Flags, BufferCreateType,
824  BufferCreateInfo, RetMem);
825 }
826 
828  const char *FunctionName,
829  pi_uint64 *FunctionPointerRet) {
830  return pi2ur::piextGetDeviceFunctionPointer(Device, Program, FunctionName,
831  FunctionPointerRet);
832 }
833 
834 pi_result piextUSMDeviceAlloc(void **ResultPtr, pi_context Context,
835  pi_device Device,
836  pi_usm_mem_properties *Properties, size_t Size,
838 
839  return pi2ur::piextUSMDeviceAlloc(ResultPtr, Context, Device, Properties,
840  Size, Alignment);
841 }
842 
843 pi_result piextUSMSharedAlloc(void **ResultPtr, pi_context Context,
844  pi_device Device,
845  pi_usm_mem_properties *Properties, size_t Size,
847 
848  return pi2ur::piextUSMSharedAlloc(ResultPtr, Context, Device, Properties,
849  Size, Alignment);
850 }
851 
853  void **ResultPtr, size_t *ResultPitch, pi_context Context, pi_device Device,
854  pi_usm_mem_properties *Properties, size_t WidthInBytes, size_t Height,
855  unsigned int ElementSizeBytes) {
856 
857  return pi2ur::piextUSMPitchedAlloc(ResultPtr, ResultPitch, Context, Device,
858  Properties, WidthInBytes, Height,
859  ElementSizeBytes);
860 }
861 
862 pi_result piextUSMHostAlloc(void **ResultPtr, pi_context Context,
863  pi_usm_mem_properties *Properties, size_t Size,
865  return pi2ur::piextUSMHostAlloc(ResultPtr, Context, Properties, Size,
866  Alignment);
867 }
868 
869 pi_result piextUSMFree(pi_context Context, void *Ptr) {
870 
871  return pi2ur::piextUSMFree(Context, Ptr);
872 }
873 
875  size_t ArgSize, const void *ArgValue) {
876  return pi2ur::piextKernelSetArgPointer(Kernel, ArgIndex, ArgSize, ArgValue);
877 }
878 
880  size_t Count, pi_uint32 NumEventsInWaitlist,
881  const pi_event *EventsWaitlist,
882  pi_event *Event) {
884  Queue, Ptr, Value, Count, NumEventsInWaitlist, EventsWaitlist, Event);
885 }
886 
887 pi_result piextUSMEnqueueMemcpy(pi_queue Queue, pi_bool Blocking, void *DstPtr,
888  const void *SrcPtr, size_t Size,
889  pi_uint32 NumEventsInWaitlist,
890  const pi_event *EventsWaitlist,
891  pi_event *Event) {
892 
893  return pi2ur::piextUSMEnqueueMemcpy(Queue, Blocking, DstPtr, SrcPtr, Size,
894  NumEventsInWaitlist, EventsWaitlist,
895  Event);
896 }
897 
898 pi_result piextUSMEnqueuePrefetch(pi_queue Queue, const void *Ptr, size_t Size,
900  pi_uint32 NumEventsInWaitList,
901  const pi_event *EventWaitList,
902  pi_event *OutEvent) {
903 
905  Queue, Ptr, Size, Flags, NumEventsInWaitList, EventWaitList, OutEvent);
906 }
907 
909  size_t Length, pi_mem_advice Advice,
910  pi_event *OutEvent) {
911 
912  return pi2ur::piextUSMEnqueueMemAdvise(Queue, Ptr, Length, Advice, OutEvent);
913 }
914 
915 __SYCL_EXPORT pi_result piextUSMEnqueueFill2D(pi_queue Queue, void *Ptr,
916  size_t Pitch, size_t PatternSize,
917  const void *Pattern, size_t Width,
918  size_t Height,
919  pi_uint32 NumEventsWaitList,
920  const pi_event *EventsWaitList,
921  pi_event *Event) {
922 
923  return pi2ur::piextUSMEnqueueFill2D(Queue, Ptr, Pitch, PatternSize, Pattern,
924  Width, Height, NumEventsWaitList,
925  EventsWaitList, Event);
926 }
927 
928 __SYCL_EXPORT pi_result piextUSMEnqueueMemset2D(pi_queue Queue, void *Ptr,
929  size_t Pitch, int Value,
930  size_t Width, size_t Height,
931  pi_uint32 NumEventsWaitList,
932  const pi_event *EventsWaitlist,
933  pi_event *Event) {
934 
935  return pi2ur::piextUSMEnqueueMemset2D(Queue, Ptr, Pitch, Value, Width, Height,
936  NumEventsWaitList, EventsWaitlist,
937  Event);
938 }
939 
941  pi_queue Queue, pi_bool Blocking, void *DstPtr, size_t DstPitch,
942  const void *SrcPtr, size_t SrcPitch, size_t Width, size_t Height,
943  pi_uint32 NumEventsInWaitlist, const pi_event *EventWaitlist,
944  pi_event *Event) {
945 
947  Queue, Blocking, DstPtr, DstPitch, SrcPtr, SrcPitch, Width, Height,
948  NumEventsInWaitlist, EventWaitlist, Event);
949 }
950 
952  pi_mem_alloc_info ParamName,
953  size_t ParamValueSize, void *ParamValue,
954  size_t *ParamValueSizeRet) {
955  return pi2ur::piextUSMGetMemAllocInfo(Context, Ptr, ParamName, ParamValueSize,
956  ParamValue, ParamValueSizeRet);
957 }
958 
959 pi_result piextUSMImport(const void *HostPtr, size_t Size, pi_context Context) {
960  return pi2ur::piextUSMImport(HostPtr, Size, Context);
961 }
962 
963 pi_result piextUSMRelease(const void *HostPtr, pi_context Context) {
964  return pi2ur::piextUSMRelease(HostPtr, Context);
965 }
966 
968  pi_queue Queue, pi_program Program, const char *Name, pi_bool BlockingWrite,
969  size_t Count, size_t Offset, const void *Src, pi_uint32 NumEventsInWaitList,
970  const pi_event *EventsWaitList, pi_event *Event) {
972  Queue, Program, Name, BlockingWrite, Count, Offset, Src,
973  NumEventsInWaitList, EventsWaitList, Event);
974 }
975 
977  pi_queue Queue, pi_program Program, const char *Name, pi_bool BlockingRead,
978  size_t Count, size_t Offset, void *Dst, pi_uint32 NumEventsInWaitList,
979  const pi_event *EventsWaitList, pi_event *Event) {
981  Queue, Program, Name, BlockingRead, Count, Offset, Dst,
982  NumEventsInWaitList, EventsWaitList, Event);
983 
984  return PI_SUCCESS;
985 }
986 
988  const char *PipeSymbol, pi_bool Blocking,
989  void *Ptr, size_t Size,
990  pi_uint32 NumEventsInWaitList,
991  const pi_event *EventsWaitList,
992  pi_event *Event) {
993  (void)Queue;
994  (void)Program;
995  (void)PipeSymbol;
996  (void)Blocking;
997  (void)Ptr;
998  (void)Size;
999  (void)NumEventsInWaitList;
1000  (void)EventsWaitList;
1001  (void)Event;
1002  PI_ASSERT(Queue, PI_ERROR_INVALID_QUEUE);
1003  die("piextEnqueueReadHostPipe: not implemented");
1004  return {};
1005 }
1006 
1008  const char *PipeSymbol, pi_bool Blocking,
1009  void *Ptr, size_t Size,
1010  pi_uint32 NumEventsInWaitList,
1011  const pi_event *EventsWaitList,
1012  pi_event *Event) {
1013  (void)Queue;
1014  (void)Program;
1015  (void)PipeSymbol;
1016  (void)Blocking;
1017  (void)Ptr;
1018  (void)Size;
1019  (void)NumEventsInWaitList;
1020  (void)EventsWaitList;
1021  (void)Event;
1022  PI_ASSERT(Queue, PI_ERROR_INVALID_QUEUE);
1023  die("piextEnqueueWriteHostPipe: not implemented");
1024  return {};
1025 }
1026 
1028  size_t ParamValueSize, const void *ParamValue) {
1029 
1030  return pi2ur::piKernelSetExecInfo(Kernel, ParamName, ParamValueSize,
1031  ParamValue);
1032 }
1033 
1035  pi_uint32 SpecID, size_t Size,
1036  const void *SpecValue) {
1037  return pi2ur::piextProgramSetSpecializationConstant(Prog, SpecID, Size,
1038  SpecValue);
1039 }
1040 
1041 // Command buffer extension
1043  const pi_ext_command_buffer_desc *Desc,
1044  pi_ext_command_buffer *RetCommandBuffer) {
1045  return pi2ur::piextCommandBufferCreate(Context, Device, Desc,
1046  RetCommandBuffer);
1047 }
1048 
1050  return pi2ur::piextCommandBufferRetain(CommandBuffer);
1051 }
1052 
1054  return pi2ur::piextCommandBufferRelease(CommandBuffer);
1055 }
1056 
1058  return pi2ur::piextCommandBufferFinalize(CommandBuffer);
1059 }
1060 
1062  pi_ext_command_buffer CommandBuffer, pi_kernel Kernel, pi_uint32 WorkDim,
1063  const size_t *GlobalWorkOffset, const size_t *GlobalWorkSize,
1064  const size_t *LocalWorkSize, pi_uint32 NumSyncPointsInWaitList,
1065  const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint) {
1067  CommandBuffer, Kernel, WorkDim, GlobalWorkOffset, GlobalWorkSize,
1068  LocalWorkSize, NumSyncPointsInWaitList, SyncPointWaitList, SyncPoint);
1069 }
1070 
1072  pi_ext_command_buffer CommandBuffer, void *DstPtr, const void *SrcPtr,
1073  size_t Size, pi_uint32 NumSyncPointsInWaitList,
1074  const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint) {
1075  return pi2ur::piextCommandBufferMemcpyUSM(CommandBuffer, DstPtr, SrcPtr, Size,
1076  NumSyncPointsInWaitList,
1077  SyncPointWaitList, SyncPoint);
1078 }
1079 
1081  pi_ext_command_buffer CommandBuffer, pi_mem SrcMem, pi_mem DstMem,
1082  size_t SrcOffset, size_t DstOffset, size_t Size,
1083  pi_uint32 NumSyncPointsInWaitList,
1084  const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint) {
1086  CommandBuffer, SrcMem, DstMem, SrcOffset, DstOffset, Size,
1087  NumSyncPointsInWaitList, SyncPointWaitList, SyncPoint);
1088 }
1089 
1091  pi_ext_command_buffer CommandBuffer, pi_mem SrcMem, pi_mem DstMem,
1092  pi_buff_rect_offset SrcOrigin, pi_buff_rect_offset DstOrigin,
1093  pi_buff_rect_region Region, size_t SrcRowPitch, size_t SrcSlicePitch,
1094  size_t DstRowPitch, size_t DstSlicePitch, pi_uint32 NumSyncPointsInWaitList,
1095  const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint) {
1097  CommandBuffer, SrcMem, DstMem, SrcOrigin, DstOrigin, Region, SrcRowPitch,
1098  SrcSlicePitch, DstRowPitch, DstSlicePitch, NumSyncPointsInWaitList,
1099  SyncPointWaitList, SyncPoint);
1100 }
1101 
1103  pi_ext_command_buffer CommandBuffer, pi_mem Buffer, size_t Offset,
1104  size_t Size, void *Dst, pi_uint32 NumSyncPointsInWaitList,
1105  const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint) {
1107  CommandBuffer, Buffer, Offset, Size, Dst, NumSyncPointsInWaitList,
1108  SyncPointWaitList, SyncPoint);
1109 }
1110 
1112  pi_ext_command_buffer CommandBuffer, pi_mem Buffer,
1113  pi_buff_rect_offset BufferOffset, pi_buff_rect_offset HostOffset,
1114  pi_buff_rect_region Region, size_t BufferRowPitch, size_t BufferSlicePitch,
1115  size_t HostRowPitch, size_t HostSlicePitch, void *Ptr,
1116  pi_uint32 NumSyncPointsInWaitList,
1117  const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint) {
1119  CommandBuffer, Buffer, BufferOffset, HostOffset, Region, BufferRowPitch,
1120  BufferSlicePitch, HostRowPitch, HostSlicePitch, Ptr,
1121  NumSyncPointsInWaitList, SyncPointWaitList, SyncPoint);
1122 }
1123 
1125  pi_ext_command_buffer CommandBuffer, pi_mem Buffer, size_t Offset,
1126  size_t Size, const void *Ptr, pi_uint32 NumSyncPointsInWaitList,
1127  const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint) {
1129  CommandBuffer, Buffer, Offset, Size, Ptr, NumSyncPointsInWaitList,
1130  SyncPointWaitList, SyncPoint);
1131 }
1132 
1134  pi_ext_command_buffer CommandBuffer, pi_mem Buffer,
1135  pi_buff_rect_offset BufferOffset, pi_buff_rect_offset HostOffset,
1136  pi_buff_rect_region Region, size_t BufferRowPitch, size_t BufferSlicePitch,
1137  size_t HostRowPitch, size_t HostSlicePitch, const void *Ptr,
1138  pi_uint32 NumSyncPointsInWaitList,
1139  const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint) {
1141  CommandBuffer, Buffer, BufferOffset, HostOffset, Region, BufferRowPitch,
1142  BufferSlicePitch, HostRowPitch, HostSlicePitch, Ptr,
1143  NumSyncPointsInWaitList, SyncPointWaitList, SyncPoint);
1144 }
1145 
1147  pi_ext_command_buffer CommandBuffer, pi_mem Buffer, const void *Pattern,
1148  size_t PatternSize, size_t Offset, size_t Size,
1149  pi_uint32 NumSyncPointsInWaitList,
1150  const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint) {
1152  CommandBuffer, Buffer, Pattern, PatternSize, Offset, Size,
1153  NumSyncPointsInWaitList, SyncPointWaitList, SyncPoint);
1154 }
1155 
1157  void *Ptr, const void *Pattern,
1158  size_t PatternSize, size_t Size,
1159  pi_uint32 NumSyncPointsInWaitList,
1160  const pi_ext_sync_point *SyncPointWaitList,
1161  pi_ext_sync_point *SyncPoint) {
1163  CommandBuffer, Ptr, Pattern, PatternSize, Size, NumSyncPointsInWaitList,
1164  SyncPointWaitList, SyncPoint);
1165 }
1166 
1168  pi_ext_command_buffer CommandBuffer, const void *Ptr, size_t Size,
1169  pi_usm_migration_flags Flags, pi_uint32 NumSyncPointsInWaitList,
1170  const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint) {
1171  return pi2ur::piextCommandBufferPrefetchUSM(CommandBuffer, Ptr, Size, Flags,
1172  NumSyncPointsInWaitList,
1173  SyncPointWaitList, SyncPoint);
1174 }
1175 
1177  pi_ext_command_buffer CommandBuffer, const void *Ptr, size_t Length,
1178  pi_mem_advice Advice, pi_uint32 NumSyncPointsInWaitList,
1179  const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint) {
1180  return pi2ur::piextCommandBufferAdviseUSM(CommandBuffer, Ptr, Length, Advice,
1181  NumSyncPointsInWaitList,
1182  SyncPointWaitList, SyncPoint);
1183 }
1184 
1186  pi_queue Queue,
1187  pi_uint32 NumEventsInWaitList,
1188  const pi_event *EventWaitList,
1189  pi_event *Event) {
1191  CommandBuffer, Queue, NumEventsInWaitList, EventWaitList, Event);
1192 }
1193 
1194 pi_result piextPluginGetOpaqueData(void *opaque_data_param,
1195  void **opaque_data_return) {
1196  return pi2ur::piextPluginGetOpaqueData(opaque_data_param, opaque_data_return);
1197 }
1198 
1199 pi_result piTearDown(void *PluginParameter) {
1200  return pi2ur::piTearDown(PluginParameter);
1201 }
1202 
1203 pi_result piGetDeviceAndHostTimer(pi_device Device, uint64_t *DeviceTime,
1204  uint64_t *HostTime) {
1205  return pi2ur::piGetDeviceAndHostTimer(Device, DeviceTime, HostTime);
1206 }
1207 
1209  pi_device peer_device) {
1210 
1211  return pi2ur::piextEnablePeerAccess(command_device, peer_device);
1212 }
1213 
1215  pi_device peer_device) {
1216 
1217  return pi2ur::piextDisablePeerAccess(command_device, peer_device);
1218 }
1219 
1221  pi_device peer_device, pi_peer_attr attr,
1222  size_t ParamValueSize, void *ParamValue,
1223  size_t *ParamValueSizeRet) {
1224  return pi2ur::piextPeerAccessGetInfo(command_device, peer_device, attr,
1225  ParamValueSize, ParamValue,
1226  ParamValueSizeRet);
1227 }
1228 
1230 
1232  // Check that the major version matches in PiVersion and SupportedVersion
1234 
1235  // PI interface supports higher version or the same version.
1236  size_t PluginVersionSize = sizeof(PluginInit->PluginVersion);
1237  if (strlen(SupportedVersion) >= PluginVersionSize)
1238  return PI_ERROR_INVALID_VALUE;
1239  strncpy(PluginInit->PluginVersion, SupportedVersion, PluginVersionSize);
1240 
1241  // Set whole function table to zero to make it easier to detect if
1242  // functions are not set up below.
1243  std::memset(&(PluginInit->PiFunctionTable), 0,
1244  sizeof(PluginInit->PiFunctionTable));
1245 
1246  cuda_tracing_context_t_ *Ctx = createCUDATracingContext();
1247  enableCUDATracing(Ctx);
1248 
1249 // Forward calls to CUDA RT.
1250 #define _PI_API(api) \
1251  (PluginInit->PiFunctionTable).api = (decltype(&::api))(&api);
1252 #include <sycl/detail/pi.def>
1253 #undef _PI_API
1254 
1255  return PI_SUCCESS;
1256 }
1257 
1258 #ifdef _WIN32
1259 #define __SYCL_PLUGIN_DLL_NAME "pi_cuda.dll"
1260 #include "../common_win_pi_trace/common_win_pi_trace.hpp"
1261 #undef __SYCL_PLUGIN_DLL_NAME
1262 #endif
1263 
1264 } // extern "C"
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:3805
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:2127
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:4594
pi_result piProgramGetInfo(pi_program Program, pi_program_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
Definition: pi2ur.hpp:1934
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:3453
pi_result piKernelSetExecInfo(pi_kernel Kernel, pi_kernel_exec_info ParamName, size_t ParamValueSize, const void *ParamValue)
Definition: pi2ur.hpp:2280
pi_result piPlatformGetInfo(pi_platform Platform, pi_platform_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
Definition: pi2ur.hpp:874
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:3354
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:3491
pi_result piextSignalExternalSemaphore(pi_queue Queue, pi_interop_semaphore_handle SemHandle, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *Event)
Definition: pi2ur.hpp:5306
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:2413
pi_result piQueueGetInfo(pi_queue Queue, pi_queue_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
Definition: pi2ur.hpp:1791
pi_result piMemRetain(pi_mem Mem)
Definition: pi2ur.hpp:3325
pi_result piPlatformsGet(pi_uint32 NumEntries, pi_platform *Platforms, pi_uint32 *NumPlatforms)
Definition: pi2ur.hpp:821
pi_result piEnqueueEventsWait(pi_queue Queue, pi_uint32 NumEventsInWaitList, const pi_event *EventsWaitList, pi_event *OutEvent)
Definition: pi2ur.hpp:4043
pi_result piextDestroyExternalSemaphore(pi_context Context, pi_device Device, pi_interop_semaphore_handle SemHandle)
Definition: pi2ur.hpp:5269
pi_result piEnqueueMemUnmap(pi_queue Queue, pi_mem Mem, void *MappedPtr, pi_uint32 NumEventsInWaitList, const pi_event *EventsWaitList, pi_event *OutEvent)
Definition: pi2ur.hpp:3761
pi_result piextDeviceGetNativeHandle(pi_device Device, pi_native_handle *NativeHandle)
Definition: pi2ur.hpp:1304
pi_result piProgramRelease(pi_program Program)
Definition: pi2ur.hpp:2491
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:4674
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:3673
pi_result piPluginGetBackendOption(pi_platform Platform, const char *FrontendOption, const char **PlatformOption)
Definition: pi2ur.hpp:934
pi_result piextPluginGetOpaqueData(void *opaque_data_param, void **opaque_data_return)
Definition: pi2ur.hpp:927
pi_result piKernelCreate(pi_program Program, const char *KernelName, pi_kernel *RetKernel)
Definition: pi2ur.hpp:2110
pi_result piextUSMImport(const void *HostPtr, size_t Size, pi_context Context)
Definition: pi2ur.hpp:3533
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:3648
pi_result piEventSetStatus(pi_event Event, pi_int32 ExecutionStatus)
Definition: pi2ur.hpp:4253
pi_result piEventSetCallback(pi_event Event, pi_int32 CommandExecCallbackType, void(*PFnNotify)(pi_event Event, pi_int32 EventCommandStatus, void *UserData), void *UserData)
Definition: pi2ur.hpp:4240
pi_result piSamplerCreate(pi_context Context, const pi_sampler_properties *SamplerProperties, pi_sampler *RetSampler)
Definition: pi2ur.hpp:4283
pi_result piSamplerGetInfo(pi_sampler Sampler, pi_sampler_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
Definition: pi2ur.hpp:4344
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_mem *RetMem, pi_image_handle *RetHandle)
Definition: pi2ur.hpp:4869
pi_result piextMemUnsampledImageHandleDestroy(pi_context Context, pi_device Device, pi_image_handle Handle)
Definition: pi2ur.hpp:5097
pi_result piextKernelSetArgSampler(pi_kernel Kernel, pi_uint32 ArgIndex, const pi_sampler *ArgValue)
Definition: pi2ur.hpp:4382
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:1704
pi_result piMemImageGetInfo(pi_mem Image, pi_image_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
Definition: pi2ur.hpp:3556
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:4625
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:5202
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:1888
pi_result piextProgramGetNativeHandle(pi_program Program, pi_native_handle *NativeHandle)
Definition: pi2ur.hpp:2325
pi_result piKernelGetInfo(pi_kernel Kernel, pi_kernel_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
Definition: pi2ur.hpp:2361
pi_result piextEventGetNativeHandle(pi_event Event, pi_native_handle *NativeHandle)
Definition: pi2ur.hpp:4148
pi_result piEnqueueEventsWaitWithBarrier(pi_queue Queue, pi_uint32 NumEventsInWaitList, const pi_event *EventsWaitList, pi_event *OutEvent)
Definition: pi2ur.hpp:4024
pi_result piextMemMipmapFree(pi_context Context, pi_device Device, pi_image_mem_handle MemoryHandle)
Definition: pi2ur.hpp:5022
pi_result piextPlatformGetNativeHandle(pi_platform Platform, pi_native_handle *NativeHandle)
Definition: pi2ur.hpp:834
pi_result piSamplerRelease(pi_sampler Sampler)
Definition: pi2ur.hpp:4404
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:2674
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:3942
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:4547
pi_result piDevicesGet(pi_platform Platform, pi_device_type DeviceType, pi_uint32 NumEntries, pi_device *Devices, pi_uint32 *NumDevices)
Definition: pi2ur.hpp:950
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:2615
pi_result piextEventCreateWithNativeHandle(pi_native_handle NativeHandle, pi_context Context, bool OwnNativeHandle, pi_event *Event)
Definition: pi2ur.hpp:4216
pi_result piEventGetProfilingInfo(pi_event Event, pi_profiling_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
Definition: pi2ur.hpp:4163
pi_result piKernelRetain(pi_kernel Kernel)
Definition: pi2ur.hpp:2469
pi_result piextKernelSetArgMemObj(pi_kernel Kernel, pi_uint32 ArgIndex, const pi_mem_obj_property *ArgProperties, const pi_mem *ArgValue)
Definition: pi2ur.hpp:2167
pi_result piextQueueGetNativeHandle(pi_queue Queue, pi_native_handle *NativeHandle, int32_t *NativeHandleDesc)
Definition: pi2ur.hpp:1750
pi_result piextBindlessImageSamplerCreate(pi_context Context, const pi_sampler_properties *SamplerProperties, float MinMipmapLevelClamp, float MaxMipmapLevelClamp, float MaxAnisotropy, pi_sampler *RetSampler)
Definition: pi2ur.hpp:4898
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:3199
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:2548
pi_result piQueueFlush(pi_queue Queue)
Definition: pi2ur.hpp:1852
pi_result piextKernelSetArgPointer(pi_kernel Kernel, pi_uint32 ArgIndex, size_t, const void *ArgValue)
Definition: pi2ur.hpp:2503
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:1994
pi_result piSamplerRetain(pi_sampler Sampler)
Definition: pi2ur.hpp:4393
pi_result piextDeviceSelectBinary(pi_device Device, pi_device_binary *Binaries, pi_uint32 NumBinaries, pi_uint32 *SelectedBinaryInd)
Definition: pi2ur.hpp:1426
pi_result piextContextSetExtendedDeleter(pi_context Context, pi_context_extended_deleter Function, void *UserData)
Definition: pi2ur.hpp:1505
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:4577
pi_result piextGetDeviceFunctionPointer(pi_device Device, pi_program Program, const char *FunctionName, pi_uint64 *FunctionPointerRet)
Definition: pi2ur.hpp:2146
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:3829
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:4987
pi_result piGetDeviceAndHostTimer(pi_device Device, uint64_t *DeviceTime, uint64_t *HostTime)
Definition: pi2ur.hpp:1418
pi_result piEventGetInfo(pi_event Event, pi_event_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
Definition: pi2ur.hpp:4119
pi_result piMemBufferPartition(pi_mem Buffer, pi_mem_flags Flags, pi_buffer_create_type BufferCreateType, void *BufferCreateInfo, pi_mem *RetMem)
Definition: pi2ur.hpp:3085
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:3863
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:1485
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:3233
pi_result piextUSMRelease(const void *HostPtr, pi_context Context)
Definition: pi2ur.hpp:3545
pi_result piEventRelease(pi_event Event)
Definition: pi2ur.hpp:4269
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:2511
pi_result piQueueRetain(pi_queue Queue)
Definition: pi2ur.hpp:1841
pi_result piDeviceRelease(pi_device Device)
Definition: pi2ur.hpp:988
pi_result piContextRetain(pi_context Context)
Definition: pi2ur.hpp:1608
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:4819
pi_result piextUSMHostAlloc(void **ResultPtr, pi_context Context, pi_usm_mem_properties *Properties, size_t Size, pi_uint32 Alignment)
Definition: pi2ur.hpp:2749
pi_result piextCommandBufferRetain(pi_ext_command_buffer CommandBuffer)
Definition: pi2ur.hpp:4439
pi_result piDeviceGetInfo(pi_device Device, pi_device_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
Definition: pi2ur.hpp:1013
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:4695
pi_result piextKernelCreateWithNativeHandle(pi_native_handle NativeHandle, pi_context Context, pi_program Program, bool OwnNativeHandle, pi_kernel *Kernel)
Definition: pi2ur.hpp:2248
pi_result piextMemSampledImageHandleDestroy(pi_context Context, pi_device Device, pi_image_handle Handle)
Definition: pi2ur.hpp:5113
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:3783
pi_result piextDeviceCreateWithNativeHandle(pi_native_handle NativeHandle, pi_platform Platform, pi_device *Device)
Definition: pi2ur.hpp:1318
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:3615
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:3728
pi_result piextEnqueueCommandBuffer(pi_ext_command_buffer CommandBuffer, pi_queue Queue, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *Event)
Definition: pi2ur.hpp:4738
pi_result piextCommandBufferCreate(pi_context Context, pi_device Device, const pi_ext_command_buffer_desc *Desc, pi_ext_command_buffer *RetCommandBuffer)
Definition: pi2ur.hpp:4422
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:3472
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:3147
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:3056
pi_result piextQueueCreate(pi_context Context, pi_device Device, pi_queue_properties *Properties, pi_queue *Queue)
Definition: pi2ur.hpp:1627
pi_result piextProgramCreateWithNativeHandle(pi_native_handle NativeHandle, pi_context Context, bool OwnNativeHandle, pi_program *Program)
Definition: pi2ur.hpp:2341
pi_result piextMemUnsampledImageCreate(pi_context Context, pi_device Device, pi_image_mem_handle ImgMem, pi_image_format *ImageFormat, pi_image_desc *ImageDesc, pi_mem *RetMem, pi_image_handle *RetHandle)
Definition: pi2ur.hpp:4842
pi_result piextUSMFree(pi_context Context, void *Ptr)
Definition: pi2ur.hpp:3318
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:2647
pi_result piEventCreate(pi_context Context, pi_event *RetEvent)
Definition: pi2ur.hpp:4201
pi_result piextKernelGetNativeHandle(pi_kernel Kernel, pi_native_handle *NativeHandle)
Definition: pi2ur.hpp:2588
pi_result piextMemImageGetInfo(pi_image_mem_handle MemHandle, pi_image_info ParamName, void *ParamValue, size_t *ParamValueSizeRet)
Definition: pi2ur.hpp:5150
pi_result piQueueFinish(pi_queue Queue)
Definition: pi2ur.hpp:1780
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:4643
pi_result piContextRelease(pi_context Context)
Definition: pi2ur.hpp:1616
pi_result piextPlatformCreateWithNativeHandle(pi_native_handle NativeHandle, pi_platform *Platform)
Definition: pi2ur.hpp:851
pi_result piextMemReleaseInterop(pi_context Context, pi_device Device, pi_interop_mem_handle ExtMem)
Definition: pi2ur.hpp:5227
pi_result piKernelSetArg(pi_kernel Kernel, pi_uint32 ArgIndex, size_t ArgSize, const void *ArgValue)
Definition: pi2ur.hpp:2222
pi_result piEventRetain(pi_event Event)
Definition: pi2ur.hpp:4260
pi_result piextContextGetNativeHandle(pi_context Context, pi_native_handle *NativeHandle)
Definition: pi2ur.hpp:1514
pi_result piMemRelease(pi_mem Mem)
Definition: pi2ur.hpp:3335
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:3888
pi_result piextCommandBufferFinalize(pi_ext_command_buffer CommandBuffer)
Definition: pi2ur.hpp:4459
pi_result piPluginGetLastError(char **Message)
Definition: pi2ur.hpp:996
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:3702
pi_result piKernelRelease(pi_kernel Kernel)
Definition: pi2ur.hpp:2480
pi_result piextMemImageFree(pi_context Context, pi_device Device, pi_image_mem_handle MemoryHandle)
Definition: pi2ur.hpp:5006
pi_result piextContextCreateWithNativeHandle(pi_native_handle NativeHandle, pi_uint32 NumDevices, const pi_device *Devices, bool OwnNativeHandle, pi_context *RetContext)
Definition: pi2ur.hpp:1525
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:4785
pi_result piQueueRelease(pi_queue Queue)
Definition: pi2ur.hpp:1770
pi_result piextWaitExternalSemaphore(pi_queue Queue, pi_interop_semaphore_handle SemHandle, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *Event)
Definition: pi2ur.hpp:5286
pi_result piextCommandBufferRelease(pi_ext_command_buffer CommandBuffer)
Definition: pi2ur.hpp:4449
pi_result piContextGetInfo(pi_context Context, pi_context_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
Definition: pi2ur.hpp:1553
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:4500
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:4660
pi_result piextMemGetNativeHandle(pi_mem Mem, pi_device Dev, pi_native_handle *NativeHandle)
Definition: pi2ur.hpp:3132
pi_result piTearDown(void *PluginParameter)
Definition: pi2ur.hpp:781
pi_result piextMemImportOpaqueFD(pi_context Context, pi_device Device, size_t Size, int FileDescriptor, pi_interop_mem_handle *RetHandle)
Definition: pi2ur.hpp:5177
pi_result piextDisablePeerAccess(pi_device command_device, pi_device peer_device)
Definition: pi2ur.hpp:4774
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:4518
pi_result piextEnablePeerAccess(pi_device command_device, pi_device peer_device)
Definition: pi2ur.hpp:4764
pi_result piDevicePartition(pi_device Device, const pi_device_partition_property *Properties, pi_uint32 NumEntries, pi_device *SubDevices, pi_uint32 *NumSubDevices)
Definition: pi2ur.hpp:1342
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:3966
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:3014
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:2064
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:3908
pi_result piProgramRetain(pi_program Program)
Definition: pi2ur.hpp:2269
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)
Definition: pi2ur.hpp:4468
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:3391
pi_result piextProgramSetSpecializationConstant(pi_program Program, pi_uint32 SpecID, size_t Size, const void *SpecValue)
Definition: pi2ur.hpp:2093
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:3254
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:4001
pi_result piProgramCreate(pi_context Context, const void *ILBytes, size_t Length, pi_program *Program)
Definition: pi2ur.hpp:1869
pi_result piEventsWait(pi_uint32 NumEvents, const pi_event *EventsWaitList)
Definition: pi2ur.hpp:4105
pi_result piDeviceRetain(pi_device Device)
Definition: pi2ur.hpp:981
pi_result piextImportExternalSemaphoreOpaqueFD(pi_context Context, pi_device Device, int FileDescriptor, pi_interop_semaphore_handle *RetHandle)
Definition: pi2ur.hpp:5243
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:4486
pi_result piextMemCreateWithNativeHandle(pi_native_handle NativeHandle, pi_context Context, bool OwnNativeHandle, pi_mem *Mem)
Definition: pi2ur.hpp:3178
pi_result piMemGetInfo(pi_mem Mem, pi_mem_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
Definition: pi2ur.hpp:2779
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:2026
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:5056
void die(const char *Message)
Definition: pi.cpp:586
#define PI_ASSERT(condition, error)
Definition: pi2ur.hpp:154
int32_t pi_int32
Definition: pi.h:199
uintptr_t pi_native_handle
Definition: pi.h:204
pi_bitfield pi_map_flags
Definition: pi.h:739
_pi_result
Definition: pi.h:211
pi_uint32 pi_bool
Definition: pi.h:202
pi_bitfield pi_usm_mem_properties
Definition: pi.h:751
_pi_device_info
Definition: pi.h:291
_pi_queue_info
Definition: pi.h:475
_pi_mem_advice
Definition: pi.h:577
_pi_kernel_sub_group_info
Definition: pi.h:517
pi_bitfield pi_mem_properties
Definition: pi.h:745
_pi_kernel_group_info
Definition: pi.h:496
pi_uint64 pi_image_handle
Definition: pi.h:1128
_pi_kernel_exec_info
Definition: pi.h:1568
_pi_platform_info
Definition: pi.h:226
_pi_image_info
Definition: pi.h:507
pi_uint32 pi_ext_sync_point
Definition: pi.h:2298
_pi_profiling_info
Definition: pi.h:718
_pi_usm_migration_flags
Definition: pi.h:1924
_pi_device_type
Definition: pi.h:259
uint64_t pi_uint64
Definition: pi.h:201
pi_bitfield pi_queue_properties
Definition: pi.h:764
_pi_image_copy_flags
Definition: pi.h:654
pi_bitfield pi_sampler_properties
Definition: pi.h:697
_pi_buffer_create_type
Definition: pi.h:660
uint32_t pi_uint32
Definition: pi.h:200
_pi_event_info
Definition: pi.h:524
intptr_t pi_context_properties
Definition: pi.h:689
pi_bitfield pi_mem_flags
Definition: pi.h:729
constexpr pi_queue_properties PI_QUEUE_FLAGS
Definition: pi.h:765
void(* pi_context_extended_deleter)(void *user_data)
Definition: pi.h:1308
_pi_sampler_info
Definition: pi.h:665
_pi_kernel_info
Definition: pi.h:487
_pi_mem_alloc_info
Definition: pi.h:1907
_pi_context_info
Definition: pi.h:458
void * pi_image_mem_handle
Definition: pi.h:1129
#define _PI_PLUGIN_VERSION_CHECK(PI_API_VERSION, PI_PLUGIN_VERSION)
Definition: pi.h:177
_pi_program_info
Definition: pi.h:446
intptr_t pi_device_partition_property
Definition: pi.h:823
_pi_mem_info
Definition: pi.h:1154
pi_uint64 pi_interop_semaphore_handle
Definition: pi.h:1131
_pi_peer_attr
Definition: pi.h:1156
pi_uint64 pi_interop_mem_handle
Definition: pi.h:1130
_pi_program_build_info
Definition: pi.h:235
C++ wrapper of extern "C" PI interfaces.
pi_result piextContextSetExtendedDeleter(pi_context Context, pi_context_extended_deleter Function, void *UserData)
Definition: pi_cuda.cpp:132
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.
Definition: pi_cuda.cpp:198
pi_result piextDisablePeerAccess(pi_device command_device, pi_device peer_device)
Definition: pi_cuda.cpp:1214
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...
Definition: pi_cuda.cpp:78
pi_result piMemBufferCreate(pi_context Context, pi_mem_flags Flags, size_t Size, void *HostPtr, pi_mem *RetMem, const pi_mem_properties *properties)
Definition: pi_cuda.cpp:210
pi_result piextWaitExternalSemaphore(pi_queue Queue, pi_interop_semaphore_handle SemHandle, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *Event)
API to instruct the queue with a non-blocking wait on an external semaphore.
Definition: pi_cuda.cpp:492
pi_result piMemRelease(pi_mem Mem)
Definition: pi_cuda.cpp:225
pi_result piEventSetStatus(pi_event Event, pi_int32 ExecutionStatus)
Definition: pi_cuda.cpp:594
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...
Definition: pi_cuda.cpp:1185
pi_result piextEnablePeerAccess(pi_device command_device, pi_device peer_device)
Definition: pi_cuda.cpp:1208
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)
Device global variable.
Definition: pi_cuda.cpp:967
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.
Definition: pi_cuda.cpp:1080
pi_result piProgramGetBuildInfo(pi_program Program, pi_device Device, pi_program_build_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
Definition: pi_cuda.cpp:310
pi_result piKernelGetGroupInfo(pi_kernel Kernel, pi_device Device, pi_kernel_group_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
Definition: pi_cuda.cpp:508
pi_result piextDeviceCreateWithNativeHandle(pi_native_handle NativeHandle, pi_platform Platform, pi_device *Device)
Creates PI device object from a native handle.
Definition: pi_cuda.cpp:106
pi_result piEventSetCallback(pi_event Event, pi_int32 CommandExecCallbackType, void(*PFnNotify)(pi_event Event, pi_int32 EventCommandStatus, void *UserData), void *UserData)
Definition: pi_cuda.cpp:585
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...
Definition: pi_cuda.cpp:1057
pi_result piKernelCreate(pi_program Program, const char *KernelName, pi_kernel *RetKernel)
Definition: pi_cuda.cpp:341
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: pi_cuda.cpp:291
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.
Definition: pi_cuda.cpp:1167
pi_result piextDeviceGetNativeHandle(pi_device Device, pi_native_handle *NativeHandle)
Gets the native handle of a PI device object.
Definition: pi_cuda.cpp:100
pi_result piextPlatformCreateWithNativeHandle(pi_native_handle NativeHandle, pi_platform *Platform)
Creates PI platform object from a native handle.
Definition: pi_cuda.cpp:47
pi_result piQueueRetain(pi_queue Queue)
Definition: pi_cuda.cpp:180
pi_result piQueueRelease(pi_queue Queue)
Definition: pi_cuda.cpp:182
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.
Definition: pi_cuda.cpp:450
pi_result piextPluginGetOpaqueData(void *opaque_data_param, void **opaque_data_return)
API to get Plugin internal data, opaque to SYCL RT.
Definition: pi_cuda.cpp:1194
pi_result piextEventGetNativeHandle(pi_event Event, pi_native_handle *NativeHandle)
Gets the native handle of a PI event object.
Definition: pi_cuda.cpp:604
pi_result piProgramRelease(pi_program Program)
Definition: pi_cuda.cpp:324
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.
Definition: pi_cuda.cpp:253
pi_result piextMemImageFree(pi_context Context, pi_device Device, pi_image_mem_handle MemoryHandle)
API to free memory for bindless images.
Definition: pi_cuda.cpp:417
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)
Definition: pi_cuda.cpp:657
pi_result piKernelSetArg(pi_kernel Kernel, pi_uint32 ArgIndex, size_t ArgSize, const void *ArgValue)
Definition: pi_cuda.cpp:347
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.
Definition: pi_cuda.cpp:93
pi_result piextMemCreateWithNativeHandle(pi_native_handle NativeHandle, pi_context Context, bool ownNativeHandle, pi_mem *Mem)
Creates PI mem object from a native handle.
Definition: pi_cuda.cpp:241
pi_result piSamplerRelease(pi_sampler Sampler)
Definition: pi_cuda.cpp:636
pi_result piDeviceRelease(pi_device Device)
Definition: pi_cuda.cpp:74
pi_result piextMemUnsampledImageHandleDestroy(pi_context Context, pi_device Device, pi_image_handle Handle)
API to destroy bindless unsampled image handles.
Definition: pi_cuda.cpp:440
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)
Definition: pi_cuda.cpp:772
pi_result piextUSMFree(pi_context Context, void *Ptr)
Indicates that the allocated USM memory is no longer needed on the runtime side.
Definition: pi_cuda.cpp:869
pi_result piQueueFlush(pi_queue Queue)
Definition: pi_cuda.cpp:188
pi_result piMemRetain(pi_mem Mem)
Definition: pi_cuda.cpp:223
pi_result piContextGetInfo(pi_context Context, pi_context_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
Definition: pi_cuda.cpp:124
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)
Definition: pi_cuda.cpp:720
pi_result piKernelSetExecInfo(pi_kernel Kernel, pi_kernel_exec_info ParamName, size_t ParamValueSize, const void *ParamValue)
API to set attributes controlling kernel execution.
Definition: pi_cuda.cpp:1027
pi_result piSamplerGetInfo(pi_sampler Sampler, pi_sampler_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
Definition: pi_cuda.cpp:624
pi_result piextProgramSetSpecializationConstant(pi_program Prog, pi_uint32 SpecID, size_t Size, const void *SpecValue)
Sets a specialization constant to a specific value.
Definition: pi_cuda.cpp:1034
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.
Definition: pi_cuda.cpp:887
pi_result piextMemUnsampledImageCreate(pi_context Context, pi_device Device, pi_image_mem_handle ImgMem, pi_image_format *ImageFormat, pi_image_desc *ImageDesc, pi_mem *RetMem, pi_image_handle *RetHandle)
API to create bindless image handles.
Definition: pi_cuda.cpp:383
pi_result piextQueueCreate(pi_context Context, pi_device Device, pi_queue_properties *Properties, pi_queue *Queue)
Definition: pi_cuda.cpp:167
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.
Definition: pi_cuda.cpp:1124
pi_result piextMemImportOpaqueFD(pi_context Context, pi_device Device, size_t Size, int FileDescriptor, pi_interop_mem_handle *RetHandle)
API to import external memory in the form of a file descriptor.
Definition: pi_cuda.cpp:459
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)
Definition: pi_cuda.cpp:733
pi_result piextPeerAccessGetInfo(pi_device command_device, pi_device peer_device, pi_peer_attr attr, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
Definition: pi_cuda.cpp:1220
pi_result piEventCreate(pi_context Context, pi_event *RetEvent)
Create PI event object in a signalled/completed state.
Definition: pi_cuda.cpp:562
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.
Definition: pi_cuda.cpp:1071
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.
Definition: pi_cuda.cpp:1090
pi_result piTearDown(void *PluginParameter)
API to notify that the plugin should clean up its resources.
Definition: pi_cuda.cpp:1199
pi_result piextKernelGetNativeHandle(pi_kernel Kernel, pi_native_handle *NativeHandle)
Gets the native handle of a PI kernel object.
Definition: pi_cuda.cpp:557
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.
Definition: pi_cuda.cpp:940
pi_result piSamplerRetain(pi_sampler Sampler)
Definition: pi_cuda.cpp:632
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.
Definition: pi_cuda.cpp:427
pi_result piEventRelease(pi_event Event)
Definition: pi_cuda.cpp:600
pi_result piKernelRelease(pi_kernel Kernel)
Definition: pi_cuda.cpp:531
pi_result piEventGetProfilingInfo(pi_event Event, pi_profiling_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
Definition: pi_cuda.cpp:573
pi_result piMemGetInfo(pi_mem Mem, pi_mem_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
Definition: pi_cuda.cpp:217
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)
Definition: pi_cuda.cpp:745
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)
Definition: pi_cuda.cpp:683
pi_result piKernelGetInfo(pi_kernel Kernel, pi_kernel_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
Definition: pi_cuda.cpp:366
pi_result piextUSMImport(const void *HostPtr, size_t Size, pi_context Context)
Import host system memory into USM.
Definition: pi_cuda.cpp:959
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: pi_cuda.cpp:915
pi_result piPluginInit(pi_plugin *PluginInit)
Definition: pi_cuda.cpp:1231
pi_result piPlatformGetInfo(pi_platform Platform, pi_platform_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
Definition: pi_cuda.cpp:35
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.
Definition: pi_cuda.cpp:409
pi_result piextMemMipmapFree(pi_context Context, pi_device Device, pi_image_mem_handle MemoryHandle)
API to free mipmap memory for bindless images.
Definition: pi_cuda.cpp:422
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.
Definition: pi_cuda.cpp:843
void freeCUDATracingContext(cuda_tracing_context_t_ *Ctx)
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)
Definition: pi_cuda.cpp:695
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.
Definition: pi_cuda.cpp:827
pi_result piextUSMEnqueueMemAdvise(pi_queue Queue, const void *Ptr, size_t Length, pi_mem_advice Advice, pi_event *OutEvent)
USM Memadvise API.
Definition: pi_cuda.cpp:908
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.
Definition: pi_cuda.cpp:862
pi_result piProgramRetain(pi_program Program)
Definition: pi_cuda.cpp:320
pi_result piQueueGetInfo(pi_queue Queue, pi_queue_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
Definition: pi_cuda.cpp:172
pi_result piQueueCreate(pi_context Context, pi_device Device, pi_queue_properties Flags, pi_queue *Queue)
Definition: pi_cuda.cpp:161
const char SupportedVersion[]
Definition: pi_cuda.cpp:1229
pi_result piContextRelease(pi_context Context)
Definition: pi_cuda.cpp:157
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.
Definition: pi_cuda.cpp:465
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)
Definition: pi_cuda.cpp:709
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)
Definition: pi_cuda.cpp:798
pi_result piEventGetInfo(pi_event Event, pi_event_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
Definition: pi_cuda.cpp:566
pi_result piProgramGetInfo(pi_program Program, pi_program_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
Definition: pi_cuda.cpp:272
pi_result piextImportExternalSemaphoreOpaqueFD(pi_context Context, pi_device Device, int FileDescriptor, pi_interop_semaphore_handle *RetHandle)
API to import an external semaphore in the form of a file descriptor.
Definition: pi_cuda.cpp:479
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.
Definition: pi_cuda.cpp:928
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.
Definition: pi_cuda.cpp:1133
pi_result piextMemReleaseInterop(pi_context Context, pi_device Device, pi_interop_mem_handle ExtMem)
API to destroy interop memory.
Definition: pi_cuda.cpp:473
pi_result piextUSMRelease(const void *HostPtr, pi_context Context)
Release host system memory from USM.
Definition: pi_cuda.cpp:963
pi_result piEventsWait(pi_uint32 NumEvents, const pi_event *EventList)
Definition: pi_cuda.cpp:581
void enableCUDATracing(cuda_tracing_context_t_ *ctx)
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.
Definition: pi_cuda.cpp:879
pi_result piextPlatformGetNativeHandle(pi_platform Platform, pi_native_handle *NativeHandle)
Gets the native handle of a PI platform object.
Definition: pi_cuda.cpp:42
pi_result 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)
Definition: pi_cuda.cpp:669
pi_result piMemBufferPartition(pi_mem Buffer, pi_mem_flags Flags, pi_buffer_create_type BufferCreateType, void *BufferCreateInfo, pi_mem *RetMem)
Definition: pi_cuda.cpp:819
pi_result piextDestroyExternalSemaphore(pi_context Context, pi_device Device, pi_interop_semaphore_handle SemHandle)
API to destroy the external semaphore handle.
Definition: pi_cuda.cpp:487
pi_result piPluginGetLastError(char **message)
API to get Plugin specific warning and error messages.
Definition: pi_cuda.cpp:52
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.
Definition: pi_cuda.cpp:1102
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)
Definition: pi_cuda.cpp:784
pi_result piextContextGetNativeHandle(pi_context Context, pi_native_handle *NativeHandle)
Gets the native handle of a PI context object.
Definition: pi_cuda.cpp:138
pi_result piMemImageCreate(pi_context Context, pi_mem_flags Flags, const pi_image_format *ImageFormat, const pi_image_desc *ImageDesc, void *HostPtr, pi_mem *RetImage)
Definition: pi_cuda.cpp:227
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 Valid Queries: PI_MEM_ALLOC_TYPE returns host/d...
Definition: pi_cuda.cpp:951
pi_result piEnqueueEventsWaitWithBarrier(pi_queue Queue, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *OutEvent)
Definition: pi_cuda.cpp:648
pi_result piextMemSampledImageHandleDestroy(pi_context Context, pi_device Device, pi_image_handle Handle)
API to destroy bindless sampled image handles.
Definition: pi_cuda.cpp:445
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)
API to append a kernel execution command to the command-buffer.
Definition: pi_cuda.cpp:1061
pi_result piQueueFinish(pi_queue Queue)
Definition: pi_cuda.cpp:186
void disableCUDATracing(cuda_tracing_context_t_ *ctx)
pi_result piextMemImageCreateWithNativeHandle(pi_native_handle NativeHandle, pi_context Context, bool OwnNativeHandle, const pi_image_format *ImageFormat, const pi_image_desc *ImageDesc, pi_mem *Img)
Creates PI image object from a native handle.
Definition: pi_cuda.cpp:264
pi_result piSamplerCreate(pi_context Context, const pi_sampler_properties *SamplerProperties, pi_sampler *RetSampler)
Definition: pi_cuda.cpp:618
pi_result piGetDeviceAndHostTimer(pi_device Device, uint64_t *DeviceTime, uint64_t *HostTime)
Queries device for it's global timestamp in nanoseconds, and updates HostTime with the value of the h...
Definition: pi_cuda.cpp:1203
pi_result piPlatformsGet(pi_uint32 NumEntries, pi_platform *Platforms, pi_uint32 *NumPlatforms)
Definition: pi_cuda.cpp:30
pi_result piDevicesGet(pi_platform Platform, pi_device_type DeviceType, pi_uint32 NumEntries, pi_device *Devices, pi_uint32 *NumDevices)
Definition: pi_cuda.cpp:63
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)
Definition: pi_cuda.cpp:807
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)
Write to pipe of a given name.
Definition: pi_cuda.cpp:1007
pi_result piextKernelSetArgMemObj(pi_kernel Kernel, pi_uint32 ArgIndex, const pi_mem_obj_property *ArgProperties, const pi_mem *ArgValue)
Definition: pi_cuda.cpp:353
pi_result piDevicePartition(pi_device Device, const pi_device_partition_property *Properties, pi_uint32 NumDevices, pi_device *OutDevices, pi_uint32 *OutNumDevices)
Definition: pi_cuda.cpp:85
cuda_tracing_context_t_ * createCUDATracingContext()
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.
Definition: pi_cuda.cpp:976
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: pi_cuda.cpp:114
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.
Definition: pi_cuda.cpp:834
pi_result piextKernelSetArgSampler(pi_kernel Kernel, pi_uint32 ArgIndex, const pi_sampler *ArgValue)
Definition: pi_cuda.cpp:360
pi_result piextMemGetNativeHandle(pi_mem Mem, pi_device Dev, pi_native_handle *NativeHandle)
Gets the native handle of a PI mem object.
Definition: pi_cuda.cpp:236
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)
Plugin.
Definition: pi_cuda.cpp:987
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.
Definition: pi_cuda.cpp:898
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)
Definition: pi_cuda.cpp:537
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.
Definition: pi_cuda.cpp:1156
pi_result piextCommandBufferRetain(pi_ext_command_buffer CommandBuffer)
API to increment the reference count of the command-buffer.
Definition: pi_cuda.cpp:1049
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: pi_cuda.cpp:302
pi_result piKernelRetain(pi_kernel Kernel)
Definition: pi_cuda.cpp:526
pi_result piEventRetain(pi_event Event)
Definition: pi_cuda.cpp:598
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.
Definition: pi_cuda.cpp:143
pi_result piextCommandBufferRelease(pi_ext_command_buffer CommandBuffer)
API to decrement the reference count of the command-buffer.
Definition: pi_cuda.cpp:1053
pi_result piPluginGetBackendOption(pi_platform platform, const char *frontend_option, const char **backend_option)
API to get backend specific option.
Definition: pi_cuda.cpp:56
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.
Definition: pi_cuda.cpp:1146
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: pi_cuda.cpp:280
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_mem *RetMem, pi_image_handle *RetHandle)
API to create sampled bindless image handles.
Definition: pi_cuda.cpp:391
pi_result piextProgramCreateWithNativeHandle(pi_native_handle NativeHandle, pi_context Context, bool OwnNativeHandle, pi_program *Program)
Creates PI program object from a native handle.
Definition: pi_cuda.cpp:333
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.
Definition: pi_cuda.cpp:1176
pi_result piextEventCreateWithNativeHandle(pi_native_handle NativeHandle, pi_context Context, bool OwnNativeHandle, pi_event *Event)
Creates PI event object from a native handle.
Definition: pi_cuda.cpp:610
pi_result piMemImageGetInfo(pi_mem Image, pi_image_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
Definition: pi_cuda.cpp:764
pi_result piEnqueueEventsWait(pi_queue Queue, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *OutEvent)
Definition: pi_cuda.cpp:640
pi_result piDeviceRetain(pi_device Device)
Definition: pi_cuda.cpp:70
pi_result piextQueueGetNativeHandle(pi_queue Queue, pi_native_handle *NativeHandle, int32_t *NativeHandleDesc)
Gets the native handle of a PI queue object.
Definition: pi_cuda.cpp:190
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.
Definition: pi_cuda.cpp:852
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.
Definition: pi_cuda.cpp:1042
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.
Definition: pi_cuda.cpp:1111
pi_result piContextRetain(pi_context Context)
Definition: pi_cuda.cpp:152
pi_result piextKernelSetArgPointer(pi_kernel Kernel, pi_uint32 ArgIndex, size_t ArgSize, const void *ArgValue)
Sets up pointer arguments for CL kernels.
Definition: pi_cuda.cpp:874
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.
Definition: pi_cuda.cpp:516
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.
Definition: pi_cuda.cpp:400
pi_result piEnqueueMemUnmap(pi_queue Queue, pi_mem Mem, void *MappedPtr, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *OutEvent)
Definition: pi_cuda.cpp:756
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.
Definition: pi_cuda.cpp:374
pi_result piProgramCreate(pi_context Context, const void *ILBytes, size_t Length, pi_program *Program)
Definition: pi_cuda.cpp:248
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.
Definition: pi_cuda.cpp:547
pi_result piextSignalExternalSemaphore(pi_queue Queue, pi_interop_semaphore_handle SemHandle, 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...
Definition: pi_cuda.cpp:500
pi_result piextProgramGetNativeHandle(pi_program Program, pi_native_handle *NativeHandle)
Gets the native handle of a PI program object.
Definition: pi_cuda.cpp:328
Declarations for CUDA Plugin.
#define _PI_CUDA_PLUGIN_VERSION_STRING
Definition: pi_cuda.hpp:25
char PluginVersion[20]
Definition: pi.h:2817
struct _pi_plugin::FunctionPointers PiFunctionTable
char PiVersion[20]
Definition: pi.h:2815
This struct is a record of the device binary information.
Definition: pi.h:996