DPC++ Runtime
Runtime libraries for oneAPI DPC++
pi2ur.hpp File Reference
#include "ur_api.h"
#include <cstdarg>
#include <sycl/detail/cuda_definitions.hpp>
#include <sycl/detail/pi.h>
#include <ur/ur.hpp>
Include dependency graph for pi2ur.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ReturnHelper
 
class  ConvertHelper
 

Namespaces

 pi2ur
 

Macros

#define PI_ASSERT(condition, error)
 
#define HANDLE_ERRORS(urCall)
 
#define PI_TO_UR_MAP_DEVICE_INFO(FROM, TO)
 
#define PI_TO_UR_MAP_IMAGE_CHANNEL_TYPE(FROM, TO)
 
#define PI_TO_UR_MAP_IMAGE_CHANNEL_ORDER(FROM, TO)
 
#define PI_TO_UR_MAP_IMAGE_TYPE(FROM, TO)
 
#define UR_TO_PI_MAP_IMAGE_CHANNEL_ORDER(FROM, TO)
 
#define UR_TO_PI_MAP_IMAGE_CHANNEL_TYPE(FROM, TO)
 
#define PI_TO_UR_IMAGE_INFO(FROM, TO)
 

Functions

static pi_result ur2piResult (ur_result_t urResult)
 
void fixupInfoValueTypes (size_t ParamValueSizeRetUR, size_t *ParamValueSizeRetPI, size_t ParamValueSize, void *ParamValue)
 
pi_result ur2piPlatformInfoValue (ur_platform_info_t ParamName, size_t ParamValueSizePI, size_t *ParamValueSizeUR, void *ParamValue)
 
pi_result ur2piDeviceInfoValue (ur_device_info_t ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
 Translate UR device info values to PI info values. More...
 
pi_result ur2piSamplerInfoValue (ur_sampler_info_t ParamName, size_t ParamValueSizePI, size_t *ParamValueSizeUR, void *ParamValue)
 
pi_result ur2piUSMAllocInfoValue (ur_usm_alloc_info_t ParamName, size_t ParamValueSizePI, size_t *ParamValueSizeUR, void *ParamValue)
 
pi_result ur2piProgramBuildInfoValue (ur_program_build_info_t ParamName, size_t ParamValueSizePI, size_t *ParamValueSizeUR, void *ParamValue)
 
ur_result_t mapPIMetadataToUR (const pi_device_binary_property *pi_metadata, ur_program_metadata_t *ur_metadata)
 
pi_result pi2ur::piTearDown (void *PluginParameter)
 
pi_result pi2ur::PiGetAdapter (ur_adapter_handle_t &adapter)
 
pi_result pi2ur::piPlatformsGet (pi_uint32 NumEntries, pi_platform *Platforms, pi_uint32 *NumPlatforms)
 
pi_result pi2ur::piextPlatformGetNativeHandle (pi_platform Platform, pi_native_handle *NativeHandle)
 
pi_result pi2ur::piextPlatformCreateWithNativeHandle (pi_native_handle NativeHandle, pi_platform *Platform)
 
pi_result pi2ur::piPlatformGetInfo (pi_platform Platform, pi_platform_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
 
pi_result pi2ur::piextPluginGetOpaqueData (void *opaque_data_param, void **opaque_data_return)
 
pi_result pi2ur::piPluginGetBackendOption (pi_platform Platform, const char *FrontendOption, const char **PlatformOption)
 
pi_result pi2ur::piDevicesGet (pi_platform Platform, pi_device_type DeviceType, pi_uint32 NumEntries, pi_device *Devices, pi_uint32 *NumDevices)
 
pi_result pi2ur::piDeviceRetain (pi_device Device)
 
pi_result pi2ur::piDeviceRelease (pi_device Device)
 
pi_result pi2ur::piPluginGetLastError (char **Message)
 
pi_result pi2ur::piDeviceGetInfo (pi_device Device, pi_device_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
 
pi_result pi2ur::piextDeviceGetNativeHandle (pi_device Device, pi_native_handle *NativeHandle)
 
pi_result pi2ur::piextDeviceCreateWithNativeHandle (pi_native_handle NativeHandle, pi_platform Platform, pi_device *Device)
 
pi_result pi2ur::piDevicePartition (pi_device Device, const pi_device_partition_property *Properties, pi_uint32 NumEntries, pi_device *SubDevices, pi_uint32 *NumSubDevices)
 
pi_result pi2ur::piGetDeviceAndHostTimer (pi_device Device, uint64_t *DeviceTime, uint64_t *HostTime)
 
pi_result pi2ur::piextDeviceSelectBinary (pi_device Device, pi_device_binary *Binaries, pi_uint32 NumBinaries, pi_uint32 *SelectedBinaryInd)
 
pi_result pi2ur::piContextCreate (const pi_context_properties *Properties, pi_uint32 NumDevices, const pi_device *Devices, void(*PFnNotify)(const char *ErrInfo, const void *PrivateInfo, size_t CB, void *UserData), void *UserData, pi_context *RetContext)
 
pi_result pi2ur::piextContextSetExtendedDeleter (pi_context Context, pi_context_extended_deleter Function, void *UserData)
 
pi_result pi2ur::piextContextGetNativeHandle (pi_context Context, pi_native_handle *NativeHandle)
 
pi_result pi2ur::piextContextCreateWithNativeHandle (pi_native_handle NativeHandle, pi_uint32 NumDevices, const pi_device *Devices, bool OwnNativeHandle, pi_context *RetContext)
 
pi_result pi2ur::piContextGetInfo (pi_context Context, pi_context_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
 
pi_result pi2ur::piContextRetain (pi_context Context)
 
pi_result pi2ur::piContextRelease (pi_context Context)
 
pi_result pi2ur::piextQueueCreate (pi_context Context, pi_device Device, pi_queue_properties *Properties, pi_queue *Queue)
 
pi_result pi2ur::piQueueCreate (pi_context Context, pi_device Device, pi_queue_properties Flags, pi_queue *Queue)
 
pi_result pi2ur::piextQueueCreateWithNativeHandle (pi_native_handle NativeHandle, int32_t NativeHandleDesc, pi_context Context, pi_device Device, bool OwnNativeHandle, pi_queue_properties *Properties, pi_queue *Queue)
 
pi_result pi2ur::piextQueueGetNativeHandle (pi_queue Queue, pi_native_handle *NativeHandle, int32_t *NativeHandleDesc)
 
pi_result pi2ur::piQueueRelease (pi_queue Queue)
 
pi_result pi2ur::piQueueFinish (pi_queue Queue)
 
pi_result pi2ur::piQueueGetInfo (pi_queue Queue, pi_queue_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
 
pi_result pi2ur::piQueueRetain (pi_queue Queue)
 
pi_result pi2ur::piQueueFlush (pi_queue Queue)
 
pi_result pi2ur::piProgramCreate (pi_context Context, const void *ILBytes, size_t Length, pi_program *Program)
 
pi_result pi2ur::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)
 
pi_result pi2ur::piProgramGetInfo (pi_program Program, pi_program_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
 
pi_result pi2ur::piProgramLink (pi_context Context, pi_uint32 NumDevices, const pi_device *DeviceList, const char *Options, pi_uint32 NumInputPrograms, const pi_program *InputPrograms, void(*PFnNotify)(pi_program Program, void *UserData), void *UserData, pi_program *RetProgram)
 
pi_result pi2ur::piProgramCompile (pi_program Program, pi_uint32 NumDevices, const pi_device *DeviceList, const char *Options, pi_uint32 NumInputHeaders, const pi_program *InputHeaders, const char **HeaderIncludeNames, void(*PFnNotify)(pi_program Program, void *UserData), void *UserData)
 
pi_result pi2ur::piProgramBuild (pi_program Program, pi_uint32 NumDevices, const pi_device *DeviceList, const char *Options, void(*PFnNotify)(pi_program Program, void *UserData), void *UserData)
 
pi_result pi2ur::piextProgramSetSpecializationConstant (pi_program Program, pi_uint32 SpecID, size_t Size, const void *SpecValue)
 
pi_result pi2ur::piKernelCreate (pi_program Program, const char *KernelName, pi_kernel *RetKernel)
 
pi_result pi2ur::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)
 
pi_result pi2ur::piextGetDeviceFunctionPointer (pi_device Device, pi_program Program, const char *FunctionName, pi_uint64 *FunctionPointerRet)
 
pi_result pi2ur::piextKernelSetArgMemObj (pi_kernel Kernel, pi_uint32 ArgIndex, const pi_mem_obj_property *ArgProperties, const pi_mem *ArgValue)
 
pi_result pi2ur::piKernelSetArg (pi_kernel Kernel, pi_uint32 ArgIndex, size_t ArgSize, const void *ArgValue)
 
pi_result pi2ur::piKernelSetArgPointer (pi_kernel Kernel, pi_uint32 ArgIndex, size_t ArgSize, const void *ArgValue)
 
pi_result pi2ur::piextKernelCreateWithNativeHandle (pi_native_handle NativeHandle, pi_context Context, pi_program Program, bool OwnNativeHandle, pi_kernel *Kernel)
 
pi_result pi2ur::piProgramRetain (pi_program Program)
 
pi_result pi2ur::piKernelSetExecInfo (pi_kernel Kernel, pi_kernel_exec_info ParamName, size_t ParamValueSize, const void *ParamValue)
 
pi_result pi2ur::piextProgramGetNativeHandle (pi_program Program, pi_native_handle *NativeHandle)
 
pi_result pi2ur::piextProgramCreateWithNativeHandle (pi_native_handle NativeHandle, pi_context Context, bool OwnNativeHandle, pi_program *Program)
 
pi_result pi2ur::piKernelGetInfo (pi_kernel Kernel, pi_kernel_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
 
pi_result pi2ur::piKernelGetGroupInfo (pi_kernel Kernel, pi_device Device, pi_kernel_group_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
 
pi_result pi2ur::piKernelRetain (pi_kernel Kernel)
 
pi_result pi2ur::piKernelRelease (pi_kernel Kernel)
 
pi_result pi2ur::piProgramRelease (pi_program Program)
 
pi_result pi2ur::piextKernelSetArgPointer (pi_kernel Kernel, pi_uint32 ArgIndex, size_t, const void *ArgValue)
 
pi_result pi2ur::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)
 
pi_result pi2ur::piProgramGetBuildInfo (pi_program Program, pi_device Device, pi_program_build_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
 
pi_result pi2ur::piextKernelGetNativeHandle (pi_kernel Kernel, pi_native_handle *NativeHandle)
 
pi_result pi2ur::piextKernelSuggestMaxCooperativeGroupCount (pi_kernel Kernel, size_t LocalWorkSize, size_t DynamicSharedMemorySize, pi_uint32 *GroupCountRet)
 
pi_result pi2ur::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. More...
 
pi_result pi2ur::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. More...
 
pi_result pi2ur::piMemBufferCreate (pi_context Context, pi_mem_flags Flags, size_t Size, void *HostPtr, pi_mem *RetMem, const pi_mem_properties *properties)
 
pi_result pi2ur::piextUSMHostAlloc (void **ResultPtr, pi_context Context, pi_usm_mem_properties *Properties, size_t Size, pi_uint32 Alignment)
 
pi_result pi2ur::piMemGetInfo (pi_mem Mem, pi_mem_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
 
static void pi2ur::pi2urImageDesc (const pi_image_format *ImageFormat, const pi_image_desc *ImageDesc, ur_image_format_t *UrFormat, ur_image_desc_t *UrDesc)
 
static void pi2ur::ur2piImageFormat (const ur_image_format_t *UrFormat, pi_image_format *PiFormat)
 
pi_result pi2ur::piMemImageCreate (pi_context Context, pi_mem_flags Flags, const pi_image_format *ImageFormat, const pi_image_desc *ImageDesc, void *HostPtr, pi_mem *RetImage)
 
pi_result pi2ur::piextMemImageCreateWithNativeHandle (pi_native_handle NativeHandle, pi_context Context, bool OwnNativeHandle, const pi_image_format *ImageFormat, const pi_image_desc *ImageDesc, pi_mem *RetImage)
 
pi_result pi2ur::piMemBufferPartition (pi_mem Buffer, pi_mem_flags Flags, pi_buffer_create_type BufferCreateType, void *BufferCreateInfo, pi_mem *RetMem)
 
pi_result pi2ur::piextMemGetNativeHandle (pi_mem Mem, pi_device Dev, pi_native_handle *NativeHandle)
 
pi_result pi2ur::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)
 
pi_result pi2ur::piextMemCreateWithNativeHandle (pi_native_handle NativeHandle, pi_context Context, bool OwnNativeHandle, pi_mem *Mem)
 
pi_result pi2ur::piextUSMDeviceAlloc (void **ResultPtr, pi_context Context, pi_device Device, pi_usm_mem_properties *Properties, size_t Size, pi_uint32 Alignment)
 
pi_result pi2ur::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)
 
pi_result pi2ur::piextUSMSharedAlloc (void **ResultPtr, pi_context Context, pi_device Device, pi_usm_mem_properties *Properties, size_t Size, pi_uint32 Alignment)
 
pi_result pi2ur::piextUSMFree (pi_context Context, void *Ptr)
 
pi_result pi2ur::piMemRetain (pi_mem Mem)
 
pi_result pi2ur::piMemRelease (pi_mem Mem)
 
pi_result pi2ur::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. More...
 
pi_result pi2ur::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. More...
 
pi_result pi2ur::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. More...
 
pi_result pi2ur::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)
 
pi_result pi2ur::piextUSMGetMemAllocInfo (pi_context Context, const void *Ptr, pi_mem_alloc_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
 
pi_result pi2ur::piextUSMImport (const void *HostPtr, size_t Size, pi_context Context)
 
pi_result pi2ur::piextUSMRelease (const void *HostPtr, pi_context Context)
 
pi_result pi2ur::piMemImageGetInfo (pi_mem Image, pi_image_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
 
pi_result pi2ur::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. More...
 
pi_result pi2ur::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)
 
pi_result pi2ur::piextEnqueueCooperativeKernelLaunch (pi_queue Queue, pi_kernel Kernel, pi_uint32 WorkDim, const size_t *GlobalWorkOffset, const size_t *GlobalWorkSize, const size_t *LocalWorkSize, pi_uint32 NumEventsInWaitList, const pi_event *EventsWaitList, pi_event *OutEvent)
 
pi_result pi2ur::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)
 
pi_result pi2ur::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)
 
pi_result pi2ur::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)
 
pi_result pi2ur::piEnqueueMemUnmap (pi_queue Queue, pi_mem Mem, void *MappedPtr, pi_uint32 NumEventsInWaitList, const pi_event *EventsWaitList, pi_event *OutEvent)
 
pi_result pi2ur::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)
 
pi_result pi2ur::piextUSMEnqueueMemset (pi_queue Queue, void *Ptr, pi_int32 Value, size_t Count, pi_uint32 NumEventsInWaitList, const pi_event *EventsWaitList, pi_event *OutEvent)
 
pi_result pi2ur::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)
 
pi_result pi2ur::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)
 
pi_result pi2ur::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)
 
pi_result pi2ur::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)
 
pi_result pi2ur::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)
 
pi_result pi2ur::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)
 
pi_result pi2ur::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)
 
pi_result pi2ur::piEnqueueEventsWaitWithBarrier (pi_queue Queue, pi_uint32 NumEventsInWaitList, const pi_event *EventsWaitList, pi_event *OutEvent)
 
pi_result pi2ur::piEnqueueEventsWait (pi_queue Queue, pi_uint32 NumEventsInWaitList, const pi_event *EventsWaitList, pi_event *OutEvent)
 
pi_result pi2ur::piextEnqueueReadHostPipe (pi_queue queue, pi_program program, const char *pipe_symbol, pi_bool blocking, void *ptr, size_t size, pi_uint32 num_events_in_waitlist, const pi_event *events_waitlist, pi_event *event)
 
pi_result pi2ur::piextEnqueueWriteHostPipe (pi_queue queue, pi_program program, const char *pipe_symbol, pi_bool blocking, void *ptr, size_t size, pi_uint32 num_events_in_waitlist, const pi_event *events_waitlist, pi_event *event)
 
pi_result pi2ur::piEventsWait (pi_uint32 NumEvents, const pi_event *EventsWaitList)
 
pi_result pi2ur::piEventGetInfo (pi_event Event, pi_event_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
 
pi_result pi2ur::piextEventGetNativeHandle (pi_event Event, pi_native_handle *NativeHandle)
 
pi_result pi2ur::piEventGetProfilingInfo (pi_event Event, pi_profiling_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
 
pi_result pi2ur::piEventCreate (pi_context Context, pi_event *RetEvent)
 
pi_result pi2ur::piextEventCreateWithNativeHandle (pi_native_handle NativeHandle, pi_context Context, bool OwnNativeHandle, pi_event *Event)
 
pi_result pi2ur::piEventSetCallback (pi_event Event, pi_int32 CommandExecCallbackType, void(*PFnNotify)(pi_event Event, pi_int32 EventCommandStatus, void *UserData), void *UserData)
 
pi_result pi2ur::piEventSetStatus (pi_event Event, pi_int32 ExecutionStatus)
 
pi_result pi2ur::piEventRetain (pi_event Event)
 
pi_result pi2ur::piEventRelease (pi_event Event)
 
pi_result pi2ur::piSamplerCreate (pi_context Context, const pi_sampler_properties *SamplerProperties, pi_sampler *RetSampler)
 
pi_result pi2ur::piSamplerGetInfo (pi_sampler Sampler, pi_sampler_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
 
pi_result pi2ur::piextKernelSetArgSampler (pi_kernel Kernel, pi_uint32 ArgIndex, const pi_sampler *ArgValue)
 
pi_result pi2ur::piSamplerRetain (pi_sampler Sampler)
 
pi_result pi2ur::piSamplerRelease (pi_sampler Sampler)
 
pi_result pi2ur::piextCommandBufferCreate (pi_context Context, pi_device Device, const pi_ext_command_buffer_desc *Desc, pi_ext_command_buffer *RetCommandBuffer)
 
pi_result pi2ur::piextCommandBufferRetain (pi_ext_command_buffer CommandBuffer)
 
pi_result pi2ur::piextCommandBufferRelease (pi_ext_command_buffer CommandBuffer)
 
pi_result pi2ur::piextCommandBufferFinalize (pi_ext_command_buffer CommandBuffer)
 
pi_result pi2ur::piextCommandBufferNDRangeKernel (pi_ext_command_buffer CommandBuffer, pi_kernel Kernel, pi_uint32 WorkDim, const size_t *GlobalWorkOffset, const size_t *GlobalWorkSize, const size_t *LocalWorkSize, pi_uint32 NumSyncPointsInWaitList, const pi_ext_sync_point *SyncPointWaitList, pi_ext_sync_point *SyncPoint)
 
pi_result pi2ur::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)
 
pi_result pi2ur::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)
 
pi_result pi2ur::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)
 
pi_result pi2ur::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)
 
pi_result pi2ur::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)
 
pi_result pi2ur::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)
 
pi_result pi2ur::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)
 
pi_result pi2ur::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)
 
pi_result pi2ur::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)
 
pi_result pi2ur::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)
 
pi_result pi2ur::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)
 
pi_result pi2ur::piextEnqueueCommandBuffer (pi_ext_command_buffer CommandBuffer, pi_queue Queue, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *Event)
 
pi_result pi2ur::piextEnablePeerAccess (pi_device command_device, pi_device peer_device)
 
pi_result pi2ur::piextDisablePeerAccess (pi_device command_device, pi_device peer_device)
 
pi_result pi2ur::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)
 
pi_result pi2ur::piextMemImageAllocate (pi_context Context, pi_device Device, pi_image_format *ImageFormat, pi_image_desc *ImageDesc, pi_image_mem_handle *RetMem)
 
pi_result pi2ur::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)
 
pi_result pi2ur::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)
 
pi_result pi2ur::piextBindlessImageSamplerCreate (pi_context Context, const pi_sampler_properties *SamplerProperties, float MinMipmapLevelClamp, float MaxMipmapLevelClamp, float MaxAnisotropy, pi_sampler *RetSampler)
 
pi_result pi2ur::piextMemMipmapGetLevel (pi_context Context, pi_device Device, pi_image_mem_handle MipMem, unsigned int Level, pi_image_mem_handle *RetMem)
 
pi_result pi2ur::piextMemImageFree (pi_context Context, pi_device Device, pi_image_mem_handle MemoryHandle)
 
pi_result pi2ur::piextMemMipmapFree (pi_context Context, pi_device Device, pi_image_mem_handle MemoryHandle)
 
static void pi2ur::pi2urImageCopyFlags (const pi_image_copy_flags PiFlags, ur_exp_image_copy_flags_t *UrFlags)
 
pi_result pi2ur::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)
 
pi_result pi2ur::piextMemUnsampledImageHandleDestroy (pi_context Context, pi_device Device, pi_image_handle Handle)
 
pi_result pi2ur::piextMemSampledImageHandleDestroy (pi_context Context, pi_device Device, pi_image_handle Handle)
 
static void pi2ur::pi2urImageInfoFlags (const pi_image_info PiFlags, ur_image_info_t *UrFlags)
 
pi_result pi2ur::piextMemImageGetInfo (pi_image_mem_handle MemHandle, pi_image_info ParamName, void *ParamValue, size_t *ParamValueSizeRet)
 
pi_result pi2ur::piextMemImportOpaqueFD (pi_context Context, pi_device Device, size_t Size, int FileDescriptor, pi_interop_mem_handle *RetHandle)
 
pi_result pi2ur::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)
 
pi_result pi2ur::piextMemReleaseInterop (pi_context Context, pi_device Device, pi_interop_mem_handle ExtMem)
 
pi_result pi2ur::piextImportExternalSemaphoreOpaqueFD (pi_context Context, pi_device Device, int FileDescriptor, pi_interop_semaphore_handle *RetHandle)
 
pi_result pi2ur::piextDestroyExternalSemaphore (pi_context Context, pi_device Device, pi_interop_semaphore_handle SemHandle)
 
pi_result pi2ur::piextWaitExternalSemaphore (pi_queue Queue, pi_interop_semaphore_handle SemHandle, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *Event)
 
pi_result pi2ur::piextSignalExternalSemaphore (pi_queue Queue, pi_interop_semaphore_handle SemHandle, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *Event)
 

Macro Definition Documentation

◆ HANDLE_ERRORS

#define HANDLE_ERRORS (   urCall)
Value:
if (auto Result = urCall) \
return ur2piResult(Result);
static pi_result ur2piResult(ur_result_t urResult)
Definition: pi2ur.hpp:17

Definition at line 159 of file pi2ur.hpp.

◆ PI_ASSERT

#define PI_ASSERT (   condition,
  error 
)
Value:
if (!(condition)) \
return error;

Definition at line 154 of file pi2ur.hpp.

◆ PI_TO_UR_IMAGE_INFO

#define PI_TO_UR_IMAGE_INFO (   FROM,
  TO 
)
Value:
case FROM: { \
*UrFlags = TO; \
return; \
}

◆ PI_TO_UR_MAP_DEVICE_INFO

#define PI_TO_UR_MAP_DEVICE_INFO (   FROM,
  TO 
)
Value:
case FROM: { \
InfoType = TO; \
break; \
}

◆ PI_TO_UR_MAP_IMAGE_CHANNEL_ORDER

#define PI_TO_UR_MAP_IMAGE_CHANNEL_ORDER (   FROM,
  TO 
)
Value:
case FROM: { \
UrFormat->channelOrder = TO; \
break; \
}

◆ PI_TO_UR_MAP_IMAGE_CHANNEL_TYPE

#define PI_TO_UR_MAP_IMAGE_CHANNEL_TYPE (   FROM,
  TO 
)
Value:
case FROM: { \
UrFormat->channelType = TO; \
break; \
}

◆ PI_TO_UR_MAP_IMAGE_TYPE

#define PI_TO_UR_MAP_IMAGE_TYPE (   FROM,
  TO 
)
Value:
case FROM: { \
UrDesc->type = TO; \
break; \
}

◆ UR_TO_PI_MAP_IMAGE_CHANNEL_ORDER

#define UR_TO_PI_MAP_IMAGE_CHANNEL_ORDER (   FROM,
  TO 
)
Value:
case FROM: { \
PiFormat->image_channel_order = TO; \
break; \
}

◆ UR_TO_PI_MAP_IMAGE_CHANNEL_TYPE

#define UR_TO_PI_MAP_IMAGE_CHANNEL_TYPE (   FROM,
  TO 
)
Value:
case FROM: { \
PiFormat->image_channel_data_type = TO; \
break; \
}

Function Documentation

◆ fixupInfoValueTypes()

void fixupInfoValueTypes ( size_t  ParamValueSizeRetUR,
size_t *  ParamValueSizeRetPI,
size_t  ParamValueSize,
void *  ParamValue 
)
inline

◆ mapPIMetadataToUR()

ur_result_t mapPIMetadataToUR ( const pi_device_binary_property pi_metadata,
ur_program_metadata_t *  ur_metadata 
)
inline

◆ ur2piDeviceInfoValue()

pi_result ur2piDeviceInfoValue ( ur_device_info_t  ParamName,
size_t  ParamValueSize,
void *  ParamValue,
size_t *  ParamValueSizeRet 
)
inline

Translate UR device info values to PI info values.

Parameters
ParamNameThe name of the parameter
ParamValueSize[in]The size of ParamValue passed to the PI plugin.
ParamValue[in,out]Input: The ParamValue returned by the UR adapter. Output: The UR output converted to PI.
ParamValueSizeRet[in,out]Input: The value of ParamValueSizeRet that UR returned. Output: The value of ParamValueSizeRet after conversion.

Definition at line 345 of file pi2ur.hpp.

References __SYCL_PI_CUDA_SYNC_WITH_DEFAULT, __SYCL_PI_CUDA_USE_DEFAULT_STREAM, ConvertHelper::convert(), ConvertHelper::convertArray(), ConvertHelper::convertBitSet(), sycl::_V1::detail::pi::die(), fixupInfoValueTypes(), PI_ASSERT, PI_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE, PI_DEVICE_AFFINITY_DOMAIN_NUMA, PI_DEVICE_EXEC_CAPABILITIES_KERNEL, PI_DEVICE_EXEC_CAPABILITIES_NATIVE_KERNEL, PI_DEVICE_LOCAL_MEM_TYPE_GLOBAL, PI_DEVICE_LOCAL_MEM_TYPE_LOCAL, PI_DEVICE_PARTITION_BY_AFFINITY_DOMAIN, PI_DEVICE_PARTITION_BY_COUNTS, PI_DEVICE_PARTITION_EQUALLY, PI_DEVICE_TYPE_ACC, PI_DEVICE_TYPE_CPU, PI_DEVICE_TYPE_GPU, PI_EXT_INTEL_DEVICE_PARTITION_BY_CSLICE, PI_MEMORY_ORDER_ACQ_REL, PI_MEMORY_ORDER_ACQUIRE, PI_MEMORY_ORDER_RELAXED, PI_MEMORY_ORDER_RELEASE, PI_MEMORY_ORDER_SEQ_CST, PI_MEMORY_SCOPE_DEVICE, PI_MEMORY_SCOPE_SUB_GROUP, PI_MEMORY_SCOPE_SYSTEM, PI_MEMORY_SCOPE_WORK_GROUP, PI_MEMORY_SCOPE_WORK_ITEM, PI_QUEUE_FLAG_ON_DEVICE, PI_QUEUE_FLAG_ON_DEVICE_DEFAULT, PI_QUEUE_FLAG_OUT_OF_ORDER_EXEC_MODE_ENABLE, and PI_QUEUE_FLAG_PROFILING_ENABLE.

Referenced by pi2ur::piDeviceGetInfo().

◆ ur2piPlatformInfoValue()

pi_result ur2piPlatformInfoValue ( ur_platform_info_t  ParamName,
size_t  ParamValueSizePI,
size_t *  ParamValueSizeUR,
void *  ParamValue 
)
inline

◆ ur2piProgramBuildInfoValue()

pi_result ur2piProgramBuildInfoValue ( ur_program_build_info_t  ParamName,
size_t  ParamValueSizePI,
size_t *  ParamValueSizeUR,
void *  ParamValue 
)
inline

◆ ur2piResult()

static pi_result ur2piResult ( ur_result_t  urResult)
static

◆ ur2piSamplerInfoValue()

◆ ur2piUSMAllocInfoValue()

pi_result ur2piUSMAllocInfoValue ( ur_usm_alloc_info_t  ParamName,
size_t  ParamValueSizePI,
size_t *  ParamValueSizeUR,
void *  ParamValue 
)
inline