DPC++ Runtime
Runtime libraries for oneAPI DPC++
pi_esimd_emulator.cpp File Reference
#include <stdint.h>
#include <CL/sycl/backend_types.hpp>
#include <CL/sycl/detail/accessor_impl.hpp>
#include <CL/sycl/detail/common.hpp>
#include <CL/sycl/detail/export.hpp>
#include <CL/sycl/detail/helpers.hpp>
#include <CL/sycl/detail/host_profiling_info.hpp>
#include <CL/sycl/detail/kernel_desc.hpp>
#include <CL/sycl/detail/type_traits.hpp>
#include <CL/sycl/group.hpp>
#include <CL/sycl/id.hpp>
#include <CL/sycl/kernel.hpp>
#include <CL/sycl/nd_item.hpp>
#include <CL/sycl/range.hpp>
#include <sycl/ext/intel/esimd/common.hpp>
#include <esimdemu_support.h>
#include <cstdarg>
#include <cstdio>
#include <cstring>
#include <functional>
#include <map>
#include <memory>
#include <string>
#include <thread>
#include <utility>
#include "pi_esimd_emulator.hpp"
#include <CL/sycl/detail/pi.def>
Include dependency graph for pi_esimd_emulator.cpp:

Go to the source code of this file.

Classes

struct  KernelInvocationContext< NDims >
 
struct  RangeBuilder< NDims >
 
struct  RangeBuilder< 1 >
 
struct  RangeBuilder< 2 >
 
struct  RangeBuilder< 3 >
 
class  libCMBatch< DIMS >
 
struct  InvokeImpl< NDims >
 

Macros

#define ARG_UNUSED(x)   (void)x
 
#define ESIMDEmuPluginDataVersion   0
 
#define ESIMDEmuPluginInterfaceVersion   1
 
#define DIE_NO_IMPLEMENTATION
 
#define CONTINUE_NO_IMPLEMENTATION
 
#define CASE_PI_UNSUPPORTED(not_supported)
 
#define _PI_API(api)   (PluginInit->PiFunctionTable).api = (decltype(&::api))(&api);
 

Typedefs

using IDBuilder = sycl::detail::Builder
 
template<int NDims>
using KernelFunc = std::function< void(const sycl::nd_item< NDims > &)>
 

Functions

static void PiTrace (std::string TraceString)
 
static void setErrorMessage (const char *message, pi_result error_code)
 
pi_result piPluginGetLastError (char **message)
 API to get Plugin specific warning and error messages. More...
 
template<int NDims>
void InvokeKernel (KernelInvocationContext< NDims > *ctx)
 
unsigned int sycl_get_cm_surface_index (void *PtrInput)
 
void sycl_get_cm_buffer_params (unsigned int IndexInput, char **BaseAddr, uint32_t *Width, std::mutex **BufMtxLock)
 
void sycl_get_cm_image_params (unsigned int IndexInput, char **BaseAddr, uint32_t *Width, uint32_t *Height, uint32_t *Bpp, std::mutex **ImgMtxLock)
 
static bool isNull (int NDims, const size_t *R)
 Implementation for Host Kernel Launch used by piEnqueueKernelLaunch. More...
 
pi_result piPlatformsGet (pi_uint32 NumEntries, pi_platform *Platforms, pi_uint32 *NumPlatforms)
 
pi_result piPlatformGetInfo (pi_platform Platform, pi_platform_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
 
pi_result piextPlatformGetNativeHandle (pi_platform, pi_native_handle *)
 Gets the native handle of a PI platform object. More...
 
pi_result piextPlatformCreateWithNativeHandle (pi_native_handle, pi_platform *)
 Creates PI platform object from a native handle. More...
 
pi_result piDevicesGet (pi_platform Platform, pi_device_type DeviceType, pi_uint32 NumEntries, pi_device *Devices, pi_uint32 *NumDevices)
 
pi_result piDeviceRetain (pi_device Device)
 
pi_result piDeviceRelease (pi_device Device)
 
pi_result piDeviceGetInfo (pi_device Device, pi_device_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
 Returns requested info for provided native device Return PI_DEVICE_INFO_EXTENSION_DEVICELIB_ASSERT for PI_DEVICE_INFO_EXTENSIONS query when the device supports native asserts. More...
 
pi_result piDevicePartition (pi_device, const pi_device_partition_property *, pi_uint32, pi_device *, pi_uint32 *)
 
pi_result piextDeviceGetNativeHandle (pi_device, pi_native_handle *)
 Gets the native handle of a PI device object. More...
 
pi_result piextDeviceCreateWithNativeHandle (pi_native_handle, pi_platform, pi_device *)
 Creates PI device object from a native handle. More...
 
pi_result piContextCreate (const pi_context_properties *Properties, pi_uint32 NumDevices, const pi_device *Devices, void(*PFnNotify)(const char *ErrInfo, const void *PrivateInfo, size_t CB, void *UserData), void *UserData, pi_context *RetContext)
 
pi_result piContextGetInfo (pi_context, pi_context_info, size_t, void *, size_t *)
 
pi_result piextContextSetExtendedDeleter (pi_context, pi_context_extended_deleter, void *)
 
pi_result piextContextGetNativeHandle (pi_context, pi_native_handle *)
 Gets the native handle of a PI context object. More...
 
pi_result piextContextCreateWithNativeHandle (pi_native_handle, pi_uint32, const pi_device *, bool, pi_context *)
 Creates PI context object from a native handle. More...
 
pi_result piContextRetain (pi_context Context)
 
pi_result piContextRelease (pi_context Context)
 
pi_result piQueueCreate (pi_context Context, pi_device Device, pi_queue_properties Properties, pi_queue *Queue)
 
pi_result piQueueGetInfo (pi_queue, pi_queue_info, size_t, void *, size_t *)
 
pi_result piQueueRetain (pi_queue Queue)
 
pi_result piQueueRelease (pi_queue Queue)
 
pi_result piQueueFinish (pi_queue)
 
pi_result piQueueFlush (pi_queue)
 
pi_result piextQueueGetNativeHandle (pi_queue, pi_native_handle *)
 Gets the native handle of a PI queue object. More...
 
pi_result piextQueueCreateWithNativeHandle (pi_native_handle, pi_context, pi_device, bool, pi_queue *)
 Creates PI queue object from a native handle. More...
 
pi_result piMemBufferCreate (pi_context Context, pi_mem_flags Flags, size_t Size, void *HostPtr, pi_mem *RetMem, const pi_mem_properties *properties)
 
pi_result piMemGetInfo (pi_mem, pi_mem_info, size_t, void *, size_t *)
 
pi_result piMemRetain (pi_mem Mem)
 
pi_result piMemRelease (pi_mem Mem)
 
cm_support::CM_SURFACE_FORMAT ConvertPiImageFormatToCmFormat (const pi_image_format *PiFormat)
 
pi_result piMemImageCreate (pi_context Context, pi_mem_flags Flags, const pi_image_format *ImageFormat, const pi_image_desc *ImageDesc, void *HostPtr, pi_mem *RetImage)
 
pi_result piextMemGetNativeHandle (pi_mem, pi_native_handle *)
 Gets the native handle of a PI mem object. More...
 
pi_result piextMemCreateWithNativeHandle (pi_native_handle, pi_context, bool, pi_mem *)
 Creates PI mem object from a native handle. More...
 
pi_result piProgramCreate (pi_context, const void *, size_t, pi_program *)
 
pi_result piProgramCreateWithBinary (pi_context, pi_uint32, const pi_device *, const size_t *, const unsigned char **, size_t, const pi_device_binary_property *, pi_int32 *, pi_program *)
 Creates a PI program for a context and loads the given binary into it. More...
 
pi_result piclProgramCreateWithBinary (pi_context, pi_uint32, const pi_device *, const size_t *, const unsigned char **, pi_int32 *, pi_program *)
 
pi_result piclProgramCreateWithSource (pi_context, pi_uint32, const char **, const size_t *, pi_program *)
 
pi_result piProgramGetInfo (pi_program, pi_program_info, size_t, void *, size_t *)
 
pi_result piProgramLink (pi_context, pi_uint32, const pi_device *, const char *, pi_uint32, const pi_program *, void(*)(pi_program, void *), void *, pi_program *)
 
pi_result piProgramCompile (pi_program, pi_uint32, const pi_device *, const char *, pi_uint32, const pi_program *, const char **, void(*)(pi_program, void *), void *)
 
pi_result piProgramBuild (pi_program, pi_uint32, const pi_device *, const char *, void(*)(pi_program, void *), void *)
 
pi_result piProgramGetBuildInfo (pi_program, pi_device, pi_program_build_info, size_t, void *, size_t *)
 
pi_result piProgramRetain (pi_program)
 
pi_result piProgramRelease (pi_program)
 
pi_result piextProgramGetNativeHandle (pi_program, pi_native_handle *)
 Gets the native handle of a PI program object. More...
 
pi_result piextProgramCreateWithNativeHandle (pi_native_handle, pi_context, bool, pi_program *)
 Creates PI program object from a native handle. More...
 
pi_result piKernelCreate (pi_program, const char *, pi_kernel *)
 
pi_result piKernelSetArg (pi_kernel, pi_uint32, size_t, const void *)
 
pi_result piextKernelSetArgMemObj (pi_kernel, pi_uint32, const pi_mem *)
 
pi_result piextKernelSetArgSampler (pi_kernel, pi_uint32, const pi_sampler *)
 
pi_result piKernelGetInfo (pi_kernel, pi_kernel_info, size_t, void *, size_t *)
 
pi_result piKernelGetGroupInfo (pi_kernel, pi_device, pi_kernel_group_info, size_t, void *, size_t *)
 
pi_result piKernelGetSubGroupInfo (pi_kernel, pi_device, pi_kernel_sub_group_info, size_t, const void *, size_t, void *, size_t *)
 API to query information from the sub-group from a kernel. More...
 
pi_result piKernelRetain (pi_kernel)
 
pi_result piKernelRelease (pi_kernel)
 
pi_result piEventCreate (pi_context, pi_event *)
 
pi_result piEventGetInfo (pi_event, pi_event_info, size_t, void *, size_t *)
 
pi_result piEventGetProfilingInfo (pi_event Event, pi_profiling_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet)
 
pi_result piEventsWait (pi_uint32 NumEvents, const pi_event *EventList)
 
pi_result piEventSetCallback (pi_event, pi_int32, void(*)(pi_event, pi_int32, void *), void *)
 
pi_result piEventSetStatus (pi_event, pi_int32)
 
pi_result piEventRetain (pi_event Event)
 
pi_result piEventRelease (pi_event Event)
 
pi_result piextEventGetNativeHandle (pi_event, pi_native_handle *)
 Gets the native handle of a PI event object. More...
 
pi_result piextEventCreateWithNativeHandle (pi_native_handle, pi_context, bool, pi_event *)
 Creates PI event object from a native handle. More...
 
pi_result piSamplerCreate (pi_context, const pi_sampler_properties *, pi_sampler *)
 
pi_result piSamplerGetInfo (pi_sampler, pi_sampler_info, size_t, void *, size_t *)
 
pi_result piSamplerRetain (pi_sampler)
 
pi_result piSamplerRelease (pi_sampler)
 
pi_result piEnqueueEventsWait (pi_queue, pi_uint32, const pi_event *, pi_event *)
 
pi_result piEnqueueEventsWaitWithBarrier (pi_queue, pi_uint32, const pi_event *, pi_event *)
 
pi_result piEnqueueMemBufferRead (pi_queue Queue, pi_mem Src, pi_bool BlockingRead, size_t Offset, size_t Size, void *Dst, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *Event)
 
pi_result piEnqueueMemBufferReadRect (pi_queue, pi_mem, pi_bool, pi_buff_rect_offset, pi_buff_rect_offset, pi_buff_rect_region, size_t, size_t, size_t, size_t, void *, pi_uint32, const pi_event *, pi_event *)
 
pi_result piEnqueueMemBufferWrite (pi_queue, pi_mem, pi_bool, size_t, size_t, const void *, pi_uint32, const pi_event *, pi_event *)
 
pi_result piEnqueueMemBufferWriteRect (pi_queue, pi_mem, pi_bool, pi_buff_rect_offset, pi_buff_rect_offset, pi_buff_rect_region, size_t, size_t, size_t, size_t, const void *, pi_uint32, const pi_event *, pi_event *)
 
pi_result piEnqueueMemBufferCopy (pi_queue, pi_mem, pi_mem, size_t, size_t, size_t, pi_uint32, const pi_event *, pi_event *)
 
pi_result piEnqueueMemBufferCopyRect (pi_queue, pi_mem, pi_mem, pi_buff_rect_offset, pi_buff_rect_offset, pi_buff_rect_region, size_t, size_t, size_t, size_t, pi_uint32, const pi_event *, pi_event *)
 
pi_result piEnqueueMemBufferFill (pi_queue, pi_mem, const void *, size_t, size_t, size_t, pi_uint32, const pi_event *, pi_event *)
 
pi_result piEnqueueMemBufferMap (pi_queue Queue, pi_mem MemObj, pi_bool BlockingMap, pi_map_flags MapFlags, size_t Offset, size_t Size, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *Event, void **RetMap)
 
pi_result piEnqueueMemUnmap (pi_queue Queue, pi_mem MemObj, void *MappedPtr, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *Event)
 
pi_result piMemImageGetInfo (pi_mem, pi_image_info, size_t, void *, size_t *)
 
pi_result piEnqueueMemImageRead (pi_queue CommandQueue, pi_mem Image, pi_bool BlockingRead, pi_image_offset Origin, pi_image_region Region, size_t RowPitch, size_t SlicePitch, void *Ptr, pi_uint32 NumEventsInWaitList, const pi_event *EventWaitList, pi_event *Event)
 
pi_result piEnqueueMemImageWrite (pi_queue, pi_mem, pi_bool, pi_image_offset, pi_image_region, size_t, size_t, const void *, pi_uint32, const pi_event *, pi_event *)
 
pi_result piEnqueueMemImageCopy (pi_queue, pi_mem, pi_mem, pi_image_offset, pi_image_offset, pi_image_region, pi_uint32, const pi_event *, pi_event *)
 
pi_result piEnqueueMemImageFill (pi_queue, pi_mem, const void *, const size_t *, const size_t *, pi_uint32, const pi_event *, pi_event *)
 
pi_result piMemBufferPartition (pi_mem, pi_mem_flags, pi_buffer_create_type, void *, pi_mem *)
 
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 *Event)
 
pi_result piextKernelCreateWithNativeHandle (pi_native_handle, pi_context, pi_program, bool, pi_kernel *)
 Creates PI kernel object from a native handle. More...
 
pi_result piextKernelGetNativeHandle (pi_kernel, pi_native_handle *)
 Gets the native handle of a PI kernel object. More...
 
pi_result piEnqueueNativeKernel (pi_queue, void(*)(void *), void *, size_t, pi_uint32, const pi_mem *, const void **, pi_uint32, const pi_event *, pi_event *)
 
pi_result piextGetDeviceFunctionPointer (pi_device, pi_program, const char *, pi_uint64 *)
 Retrieves a device function pointer to a user-defined function. More...
 
pi_result piextUSMHostAlloc (void **, pi_context, pi_usm_mem_properties *, size_t, pi_uint32)
 Allocates host memory accessible by the device. More...
 
pi_result piextUSMDeviceAlloc (void **, pi_context, pi_device, pi_usm_mem_properties *, size_t, pi_uint32)
 Allocates device memory. More...
 
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. More...
 
pi_result piextUSMFree (pi_context Context, void *Ptr)
 Indicates that the allocated USM memory is no longer needed on the runtime side. More...
 
pi_result piextKernelSetArgPointer (pi_kernel, pi_uint32, size_t, const void *)
 Sets up pointer arguments for CL kernels. More...
 
pi_result piextUSMEnqueueMemset (pi_queue, void *, pi_int32, size_t, pi_uint32, const pi_event *, pi_event *)
 USM Memset API. More...
 
pi_result piextUSMEnqueueMemcpy (pi_queue, pi_bool, void *, const void *, size_t, pi_uint32, const pi_event *, pi_event *)
 USM Memcpy API. More...
 
pi_result piextUSMEnqueueMemAdvise (pi_queue, const void *, size_t, pi_mem_advice, pi_event *)
 USM Memadvise API. More...
 
pi_result piextUSMGetMemAllocInfo (pi_context, const void *, pi_mem_alloc_info, size_t, void *, size_t *)
 API to query information about USM allocated pointers Valid Queries: PI_MEM_ALLOC_TYPE returns host/device/shared pi_host_usm value PI_MEM_ALLOC_BASE_PTR returns the base ptr of an allocation if the queried pointer fell inside an allocation. More...
 
pi_result piKernelSetExecInfo (pi_kernel, pi_kernel_exec_info, size_t, const void *)
 API to set attributes controlling kernel execution. More...
 
pi_result piextProgramSetSpecializationConstant (pi_program, pi_uint32, size_t, const void *)
 Sets a specialization constant to a specific value. More...
 
pi_result piextDeviceSelectBinary (pi_device, pi_device_binary *, pi_uint32 RawImgSize, pi_uint32 *ImgInd)
 Selects the most appropriate device binary based on runtime information and the IR characteristics. More...
 
pi_result piextUSMEnqueuePrefetch (pi_queue, const void *, size_t, pi_usm_migration_flags, pi_uint32, const pi_event *, pi_event *)
 Hint to migrate memory to the device. More...
 
pi_result piextPluginGetOpaqueData (void *, void **OpaqueDataReturn)
 API to get Plugin internal data, opaque to SYCL RT. More...
 
pi_result piTearDown (void *)
 API to notify that the plugin should clean up its resources. More...
 
pi_result piPluginInit (pi_plugin *PluginInit)
 

Variables

static bool PrintPiTrace = false
 
static sycl::detail::ESIMDEmuPluginOpaqueData * PiESimdDeviceAccess
 
static pi_platform PiPlatformCache
 
static std::mutex * PiPlatformCacheLock = new std::mutex
 
static std::unordered_map< unsigned int, _pi_mem * > * PiESimdSurfaceMap
 
static std::mutex * PiESimdSurfaceMapLock = new std::mutex
 
static char ESimdEmuVersionString [32]
 
constexpr size_t MaxMessageSize = 256
 
thread_local pi_result ErrorMessageCode = PI_SUCCESS
 
thread_local char ErrorMessage [MaxMessageSize]
 
const char SupportedVersion [] = _PI_ESIMD_PLUGIN_VERSION_STRING
 

Detailed Description

Declarations for CM Emulation Plugin. It is the interface between the device-agnostic SYCL runtime layer and underlying CM Emulation

Definition in file pi_esimd_emulator.cpp.

Macro Definition Documentation

◆ _PI_API

#define _PI_API (   api)    (PluginInit->PiFunctionTable).api = (decltype(&::api))(&api);

◆ ARG_UNUSED

#define ARG_UNUSED (   x)    (void)x

Definition at line 46 of file pi_esimd_emulator.cpp.

◆ CASE_PI_UNSUPPORTED

#define CASE_PI_UNSUPPORTED (   not_supported)
Value:
case not_supported: \
if (PrintPiTrace) { \
std::cerr << std::endl \
<< "Unsupported PI case : " << #not_supported << " in " \
<< __FUNCTION__ << ":" << __LINE__ << "(" << __FILE__ << ")" \
<< std::endl; \
} \
return PI_ERROR_INVALID_OPERATION;

Definition at line 390 of file pi_esimd_emulator.cpp.

◆ CONTINUE_NO_IMPLEMENTATION

#define CONTINUE_NO_IMPLEMENTATION
Value:
if (PrintPiTrace) { \
std::cerr << "Warning : Not Implemented : " << __FUNCTION__ \
<< " - File : " << __FILE__; \
std::cerr << " / Line : " << __LINE__ << std::endl; \
} \
return PI_SUCCESS;

Definition at line 382 of file pi_esimd_emulator.cpp.

◆ DIE_NO_IMPLEMENTATION

#define DIE_NO_IMPLEMENTATION
Value:
if (PrintPiTrace) { \
std::cerr << "Not Implemented : " << __FUNCTION__ \
<< " - File : " << __FILE__; \
std::cerr << " / Line : " << __LINE__ << std::endl; \
} \
return PI_ERROR_INVALID_OPERATION;

Definition at line 374 of file pi_esimd_emulator.cpp.

◆ ESIMDEmuPluginDataVersion

#define ESIMDEmuPluginDataVersion   0

Definition at line 141 of file pi_esimd_emulator.cpp.

◆ ESIMDEmuPluginInterfaceVersion

#define ESIMDEmuPluginInterfaceVersion   1

Definition at line 145 of file pi_esimd_emulator.cpp.

Typedef Documentation

◆ IDBuilder

using IDBuilder = sycl::detail::Builder

Definition at line 169 of file pi_esimd_emulator.cpp.

◆ KernelFunc

template<int NDims>
using KernelFunc = std::function<void(const sycl::nd_item<NDims> &)>

Definition at line 172 of file pi_esimd_emulator.cpp.

Function Documentation

◆ ConvertPiImageFormatToCmFormat()

◆ InvokeKernel()

◆ isNull()

static bool isNull ( int  NDims,
const size_t *  R 
)
static

Implementation for Host Kernel Launch used by piEnqueueKernelLaunch.

Definition at line 340 of file pi_esimd_emulator.cpp.

Referenced by piEnqueueKernelLaunch().

◆ piclProgramCreateWithBinary()

pi_result piclProgramCreateWithBinary ( pi_context  ,
pi_uint32  ,
const pi_device ,
const size_t *  ,
const unsigned char **  ,
pi_int32 ,
pi_program  
)

Definition at line 1291 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piclProgramCreateWithSource()

pi_result piclProgramCreateWithSource ( pi_context  ,
pi_uint32  ,
const char **  ,
const size_t *  ,
pi_program  
)

Definition at line 1297 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piContextCreate()

pi_result piContextCreate ( const pi_context_properties Properties,
pi_uint32  NumDevices,
const pi_device Devices,
void(*)(const char *ErrInfo, const void *PrivateInfo, size_t CB, void *UserData)  PFnNotify,
void *  UserData,
pi_context RetContext 
)

Single-root-device

Definition at line 827 of file pi_esimd_emulator.cpp.

References ARG_UNUSED.

◆ piContextGetInfo()

pi_result piContextGetInfo ( pi_context  ,
pi_context_info  ,
size_t  ,
void *  ,
size_t *   
)

Definition at line 858 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piContextRelease()

pi_result piContextRelease ( pi_context  Context)

TODO : Encapsulating accesses (add/remove) for Addr2CmBufferSVM

Definition at line 888 of file pi_esimd_emulator.cpp.

References _pi_context::Addr2CmBufferSVM, _pi_context::Addr2CmBufferSVMLock, _pi_device::CmDevicePtr, and _pi_context::Device.

◆ piContextRetain()

pi_result piContextRetain ( pi_context  Context)

Definition at line 878 of file pi_esimd_emulator.cpp.

◆ piDeviceGetInfo()

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 for PI_DEVICE_INFO_EXTENSIONS query when the device supports native asserts.

Combination of ESIMDEmuPluginDataVersion and ESIMDEmuPluginInterfaceVersion : 0.a.b a : ESIMDEmuPluginInterfaceVersion b : ESIMDEmuPluginDataVersion

TODO : Check

TODO : Check. CM_MAX_1D_SURF_WIDTH from CM_EMU

TODO : Check

TODO : Check. CM_MAX_SAMPLERS_PER_KERNEL from CM_EMU

TODO : Check

TODO : Check. half_type.hpp from CM_EMU

Definition at line 591 of file pi_esimd_emulator.cpp.

References CASE_PI_UNSUPPORTED, Device, DIE_NO_IMPLEMENTATION, ESIMDEmuPluginDataVersion, ESIMDEmuPluginInterfaceVersion, ESimdEmuVersionString, PI_DEVICE_EXEC_CAPABILITIES_KERNEL, PI_DEVICE_INFO_ADDRESS_BITS, PI_DEVICE_INFO_ATOMIC_64, PI_DEVICE_INFO_ATOMIC_MEMORY_ORDER_CAPABILITIES, PI_DEVICE_INFO_AVAILABLE, PI_DEVICE_INFO_BUILD_ON_SUBDEVICE, PI_DEVICE_INFO_BUILT_IN_KERNELS, PI_DEVICE_INFO_COMPILER_AVAILABLE, PI_DEVICE_INFO_DOUBLE_FP_CONFIG, PI_DEVICE_INFO_DRIVER_VERSION, PI_DEVICE_INFO_ENDIAN_LITTLE, PI_DEVICE_INFO_ERROR_CORRECTION_SUPPORT, PI_DEVICE_INFO_EXECUTION_CAPABILITIES, PI_DEVICE_INFO_EXTENSIONS, PI_DEVICE_INFO_GLOBAL_MEM_CACHE_SIZE, PI_DEVICE_INFO_GLOBAL_MEM_CACHE_TYPE, PI_DEVICE_INFO_GLOBAL_MEM_CACHELINE_SIZE, PI_DEVICE_INFO_GLOBAL_MEM_SIZE, PI_DEVICE_INFO_GPU_EU_COUNT, PI_DEVICE_INFO_GPU_EU_COUNT_PER_SUBSLICE, PI_DEVICE_INFO_GPU_EU_SIMD_WIDTH, PI_DEVICE_INFO_GPU_SLICES, PI_DEVICE_INFO_GPU_SUBSLICES_PER_SLICE, PI_DEVICE_INFO_HALF_FP_CONFIG, PI_DEVICE_INFO_HOST_UNIFIED_MEMORY, PI_DEVICE_INFO_IL_VERSION, PI_DEVICE_INFO_IMAGE2D_MAX_HEIGHT, PI_DEVICE_INFO_IMAGE2D_MAX_WIDTH, PI_DEVICE_INFO_IMAGE3D_MAX_DEPTH, PI_DEVICE_INFO_IMAGE3D_MAX_HEIGHT, PI_DEVICE_INFO_IMAGE3D_MAX_WIDTH, PI_DEVICE_INFO_IMAGE_MAX_ARRAY_SIZE, PI_DEVICE_INFO_IMAGE_MAX_BUFFER_SIZE, PI_DEVICE_INFO_IMAGE_SRGB, PI_DEVICE_INFO_IMAGE_SUPPORT, PI_DEVICE_INFO_LINKER_AVAILABLE, PI_DEVICE_INFO_LOCAL_MEM_SIZE, PI_DEVICE_INFO_LOCAL_MEM_TYPE, PI_DEVICE_INFO_MAX_CLOCK_FREQUENCY, PI_DEVICE_INFO_MAX_COMPUTE_UNITS, PI_DEVICE_INFO_MAX_CONSTANT_ARGS, PI_DEVICE_INFO_MAX_CONSTANT_BUFFER_SIZE, PI_DEVICE_INFO_MAX_MEM_ALLOC_SIZE, PI_DEVICE_INFO_MAX_MEM_BANDWIDTH, PI_DEVICE_INFO_MAX_NUM_SUB_GROUPS, PI_DEVICE_INFO_MAX_PARAMETER_SIZE, PI_DEVICE_INFO_MAX_READ_IMAGE_ARGS, PI_DEVICE_INFO_MAX_SAMPLERS, PI_DEVICE_INFO_MAX_WORK_GROUP_SIZE, PI_DEVICE_INFO_MAX_WORK_ITEM_DIMENSIONS, PI_DEVICE_INFO_MAX_WORK_ITEM_SIZES, PI_DEVICE_INFO_MAX_WRITE_IMAGE_ARGS, PI_DEVICE_INFO_MEM_BASE_ADDR_ALIGN, PI_DEVICE_INFO_NAME, PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_CHAR, PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_DOUBLE, PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_FLOAT, PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_HALF, PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_INT, PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG, PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_SHORT, PI_DEVICE_INFO_OPENCL_C_VERSION, PI_DEVICE_INFO_PARENT_DEVICE, PI_DEVICE_INFO_PARTITION_AFFINITY_DOMAIN, PI_DEVICE_INFO_PARTITION_MAX_SUB_DEVICES, PI_DEVICE_INFO_PARTITION_PROPERTIES, PI_DEVICE_INFO_PARTITION_TYPE, PI_DEVICE_INFO_PCI_ADDRESS, PI_DEVICE_INFO_PLATFORM, PI_DEVICE_INFO_PREFERRED_INTEROP_USER_SYNC, PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_CHAR, PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_DOUBLE, PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_FLOAT, PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_HALF, PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_INT, PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_LONG, PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_SHORT, PI_DEVICE_INFO_PRINTF_BUFFER_SIZE, PI_DEVICE_INFO_PROFILE, PI_DEVICE_INFO_PROFILING_TIMER_RESOLUTION, PI_DEVICE_INFO_QUEUE_PROPERTIES, PI_DEVICE_INFO_REFERENCE_COUNT, PI_DEVICE_INFO_SINGLE_FP_CONFIG, PI_DEVICE_INFO_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS, PI_DEVICE_INFO_SUB_GROUP_SIZES_INTEL, PI_DEVICE_INFO_TYPE, PI_DEVICE_INFO_USM_CROSS_SHARED_SUPPORT, PI_DEVICE_INFO_USM_DEVICE_SUPPORT, PI_DEVICE_INFO_USM_HOST_SUPPORT, PI_DEVICE_INFO_USM_SINGLE_SHARED_SUPPORT, PI_DEVICE_INFO_USM_SYSTEM_SHARED_SUPPORT, PI_DEVICE_INFO_VENDOR, PI_DEVICE_INFO_VENDOR_ID, PI_DEVICE_INFO_VERSION, PI_DEVICE_LOCAL_MEM_TYPE_LOCAL, PI_DEVICE_MEM_CACHE_TYPE_READ_WRITE_CACHE, PI_DEVICE_TYPE_GPU, PI_EXT_ONEAPI_DEVICE_INFO_MAX_GLOBAL_WORK_GROUPS, PI_EXT_ONEAPI_DEVICE_INFO_MAX_WORK_GROUPS_1D, PI_EXT_ONEAPI_DEVICE_INFO_MAX_WORK_GROUPS_2D, PI_EXT_ONEAPI_DEVICE_INFO_MAX_WORK_GROUPS_3D, PI_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT, PI_FP_DENORM, PI_FP_FMA, PI_FP_INF_NAN, PI_FP_ROUND_TO_INF, PI_FP_ROUND_TO_NEAREST, PI_FP_ROUND_TO_ZERO, PI_QUEUE_ON_DEVICE, PI_USM_ACCESS, PI_USM_ATOMIC_ACCESS, PI_USM_CONCURRENT_ACCESS, and PI_USM_CONCURRENT_ATOMIC_ACCESS.

◆ piDevicePartition()

pi_result piDevicePartition ( pi_device  ,
const pi_device_partition_property ,
pi_uint32  ,
pi_device ,
pi_uint32  
)

Definition at line 813 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piDeviceRelease()

pi_result piDeviceRelease ( pi_device  Device)

Definition at line 581 of file pi_esimd_emulator.cpp.

References Device.

◆ piDeviceRetain()

pi_result piDeviceRetain ( pi_device  Device)

Definition at line 571 of file pi_esimd_emulator.cpp.

References Device.

◆ piDevicesGet()

pi_result piDevicesGet ( pi_platform  Platform,
pi_device_type  DeviceType,
pi_uint32  NumEntries,
pi_device Devices,
pi_uint32 NumDevices 
)

Runtime queries number of devices

No GPU entry to fill 'Devices' array

Definition at line 483 of file pi_esimd_emulator.cpp.

References PI_DEVICE_TYPE_GPU, _pi_platform::PiDeviceCache, PiTrace(), and _pi_platform::populateDeviceCacheIfNeeded().

◆ piEnqueueEventsWait()

pi_result piEnqueueEventsWait ( pi_queue  ,
pi_uint32  ,
const pi_event ,
pi_event  
)

Definition at line 1476 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piEnqueueEventsWaitWithBarrier()

pi_result piEnqueueEventsWaitWithBarrier ( pi_queue  ,
pi_uint32  ,
const pi_event ,
pi_event  
)

Definition at line 1481 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piEnqueueKernelLaunch()

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 Event 
)

◆ piEnqueueMemBufferCopy()

pi_result piEnqueueMemBufferCopy ( pi_queue  ,
pi_mem  ,
pi_mem  ,
size_t  ,
size_t  ,
size_t  ,
pi_uint32  ,
const pi_event ,
pi_event  
)

Definition at line 1566 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piEnqueueMemBufferCopyRect()

pi_result piEnqueueMemBufferCopyRect ( pi_queue  ,
pi_mem  ,
pi_mem  ,
pi_buff_rect_offset  ,
pi_buff_rect_offset  ,
pi_buff_rect_region  ,
size_t  ,
size_t  ,
size_t  ,
size_t  ,
pi_uint32  ,
const pi_event ,
pi_event  
)

Definition at line 1572 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piEnqueueMemBufferFill()

pi_result piEnqueueMemBufferFill ( pi_queue  ,
pi_mem  ,
const void *  ,
size_t  ,
size_t  ,
size_t  ,
pi_uint32  ,
const pi_event ,
pi_event  
)

Definition at line 1580 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piEnqueueMemBufferMap()

pi_result piEnqueueMemBufferMap ( pi_queue  Queue,
pi_mem  MemObj,
pi_bool  BlockingMap,
pi_map_flags  MapFlags,
size_t  Offset,
size_t  Size,
pi_uint32  NumEventsInWaitList,
const pi_event EventWaitList,
pi_event Event,
void **  RetMap 
)

◆ piEnqueueMemBufferRead()

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 
)

◆ piEnqueueMemBufferReadRect()

pi_result piEnqueueMemBufferReadRect ( pi_queue  ,
pi_mem  ,
pi_bool  ,
pi_buff_rect_offset  ,
pi_buff_rect_offset  ,
pi_buff_rect_region  ,
size_t  ,
size_t  ,
size_t  ,
size_t  ,
void *  ,
pi_uint32  ,
const pi_event ,
pi_event  
)

Definition at line 1544 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piEnqueueMemBufferWrite()

pi_result piEnqueueMemBufferWrite ( pi_queue  ,
pi_mem  ,
pi_bool  ,
size_t  ,
size_t  ,
const void *  ,
pi_uint32  ,
const pi_event ,
pi_event  
)

Definition at line 1552 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piEnqueueMemBufferWriteRect()

pi_result piEnqueueMemBufferWriteRect ( pi_queue  ,
pi_mem  ,
pi_bool  ,
pi_buff_rect_offset  ,
pi_buff_rect_offset  ,
pi_buff_rect_region  ,
size_t  ,
size_t  ,
size_t  ,
size_t  ,
const void *  ,
pi_uint32  ,
const pi_event ,
pi_event  
)

Definition at line 1558 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piEnqueueMemImageCopy()

pi_result piEnqueueMemImageCopy ( pi_queue  ,
pi_mem  ,
pi_mem  ,
pi_image_offset  ,
pi_image_offset  ,
pi_image_region  ,
pi_uint32  ,
const pi_event ,
pi_event  
)

Definition at line 1740 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piEnqueueMemImageFill()

pi_result piEnqueueMemImageFill ( pi_queue  ,
pi_mem  ,
const void *  ,
const size_t *  ,
const size_t *  ,
pi_uint32  ,
const pi_event ,
pi_event  
)

Definition at line 1746 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piEnqueueMemImageRead()

pi_result piEnqueueMemImageRead ( pi_queue  CommandQueue,
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 
)

◆ piEnqueueMemImageWrite()

pi_result piEnqueueMemImageWrite ( pi_queue  ,
pi_mem  ,
pi_bool  ,
pi_image_offset  ,
pi_image_region  ,
size_t  ,
size_t  ,
const void *  ,
pi_uint32  ,
const pi_event ,
pi_event  
)

Definition at line 1734 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piEnqueueMemUnmap()

pi_result piEnqueueMemUnmap ( pi_queue  Queue,
pi_mem  MemObj,
void *  MappedPtr,
pi_uint32  NumEventsInWaitList,
const pi_event EventWaitList,
pi_event Event 
)

◆ piEnqueueNativeKernel()

pi_result piEnqueueNativeKernel ( pi_queue  ,
void(*)(void *)  ,
void *  ,
size_t  ,
pi_uint32  ,
const pi_mem ,
const void **  ,
pi_uint32  ,
const pi_event ,
pi_event  
)

Definition at line 1828 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piEventCreate()

pi_result piEventCreate ( pi_context  ,
pi_event  
)

Definition at line 1379 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piEventGetInfo()

pi_result piEventGetInfo ( pi_event  ,
pi_event_info  ,
size_t  ,
void *  ,
size_t *   
)

Definition at line 1381 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piEventGetProfilingInfo()

pi_result piEventGetProfilingInfo ( pi_event  Event,
pi_profiling_info  ParamName,
size_t  ParamValueSize,
void *  ParamValue,
size_t *  ParamValueSizeRet 
)

Definition at line 1385 of file pi_esimd_emulator.cpp.

References ARG_UNUSED, and PiTrace().

◆ piEventRelease()

pi_result piEventRelease ( pi_event  Event)

◆ piEventRetain()

pi_result piEventRetain ( pi_event  Event)

Definition at line 1423 of file pi_esimd_emulator.cpp.

◆ piEventSetCallback()

pi_result piEventSetCallback ( pi_event  ,
pi_int32  ,
void(*)(pi_event, pi_int32, void *)  ,
void *   
)

Definition at line 1416 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piEventSetStatus()

pi_result piEventSetStatus ( pi_event  ,
pi_int32   
)

Definition at line 1421 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piEventsWait()

pi_result piEventsWait ( pi_uint32  NumEvents,
const pi_event EventList 
)

Definition at line 1398 of file pi_esimd_emulator.cpp.

References _pi_event::CmEventPtr.

◆ piextContextCreateWithNativeHandle()

pi_result piextContextCreateWithNativeHandle ( pi_native_handle  nativeHandle,
pi_uint32  numDevices,
const pi_device devices,
bool  pluginOwnsNativeHandle,
pi_context context 
)

Creates PI context object from a native handle.

NOTE: The created PI object takes ownership of the native handle. NOTE: The number of devices and the list of devices is needed for Level Zero backend because there is no possilibity to query this information from context handle for Level Zero. If backend has API to query a list of devices from the context native handle then these parameters are ignored.

Parameters
nativeHandleis the native handle to create PI context from.
numDevicesis the number of devices in the context. Parameter is ignored if number of devices can be queried from the context native handle for a backend.
devicesis the list of devices in the context. Parameter is ignored if devices can be queried from the context native handle for a backend.
pluginOwnsNativeHandleIndicates whether the created PI object should take ownership of the native handle.
contextis the PI context created from the native handle.
Returns
PI_SUCCESS if successfully created pi_context from the handle. PI_ERROR_OUT_OF_HOST_MEMORY if can't allocate memory for the pi_context object. PI_ERROR_INVALID_VALUE if numDevices == 0 or devices is NULL but backend doesn't have API to query a list of devices from the context native handle. PI_UNKNOWN_ERROR in case of another error.

Definition at line 872 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piextContextGetNativeHandle()

pi_result piextContextGetNativeHandle ( pi_context  context,
pi_native_handle nativeHandle 
)

Gets the native handle of a PI context object.

Parameters
contextis the PI context to get the native handle of.
nativeHandleis the native handle of context.

Definition at line 868 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piextContextSetExtendedDeleter()

pi_result piextContextSetExtendedDeleter ( pi_context  ,
pi_context_extended_deleter  ,
void *   
)

Definition at line 863 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piextDeviceCreateWithNativeHandle()

pi_result piextDeviceCreateWithNativeHandle ( pi_native_handle  nativeHandle,
pi_platform  platform,
pi_device device 
)

Creates PI device object from a native handle.

NOTE: The created PI object takes ownership of the native handle.

Parameters
nativeHandleis the native handle to create PI device from.
platformis the platform of the device (optional).
deviceis the PI device created from the native handle.

Definition at line 822 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piextDeviceGetNativeHandle()

pi_result piextDeviceGetNativeHandle ( pi_device  device,
pi_native_handle nativeHandle 
)

Gets the native handle of a PI device object.

Parameters
deviceis the PI device to get the native handle of.
nativeHandleis the native handle of device.

Definition at line 818 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piextDeviceSelectBinary()

pi_result piextDeviceSelectBinary ( pi_device  ,
pi_device_binary ,
pi_uint32  RawImgSize,
pi_uint32 ImgInd 
)

Selects the most appropriate device binary based on runtime information and the IR characteristics.

TODO : Support multiple images and enable selection algorithm for the images

Definition at line 1946 of file pi_esimd_emulator.cpp.

References PiTrace().

◆ piextEventCreateWithNativeHandle()

pi_result piextEventCreateWithNativeHandle ( pi_native_handle  nativeHandle,
pi_context  context,
bool  ownNativeHandle,
pi_event event 
)

Creates PI event object from a native handle.

NOTE: The created PI object takes ownership of the native handle.

Parameters
nativeHandleis the native handle to create PI event from.
contextis the corresponding PI context
pluginOwnsNativeHandleIndicates whether the created PI object should take ownership of the native handle.
eventis the PI event created from the native handle.

Definition at line 1458 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piextEventGetNativeHandle()

pi_result piextEventGetNativeHandle ( pi_event  event,
pi_native_handle nativeHandle 
)

Gets the native handle of a PI event object.

Parameters
eventis the PI event to get the native handle of.
nativeHandleis the native handle of event.

Definition at line 1454 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piextGetDeviceFunctionPointer()

pi_result piextGetDeviceFunctionPointer ( pi_device  device,
pi_program  program,
const char function_name,
pi_uint64 function_pointer_ret 
)

Retrieves a device function pointer to a user-defined function.

  • function_name.
  • function_pointer_ret is set to 0 if query failed.
  • program must be built before calling this API.
  • device must present in the list of devices returned by get_device method for
  • program.

If a fallback method determines the function exists but the address is not available PI_ERROR_FUNCTION_ADDRESS_IS_NOT_AVAILABLE is returned. If the address does not exist PI_ERROR_INVALID_KERNEL_NAME is returned.

Definition at line 1834 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piextKernelCreateWithNativeHandle()

pi_result piextKernelCreateWithNativeHandle ( pi_native_handle  nativeHandle,
pi_context  context,
pi_program  program,
bool  pluginOwnsNativeHandle,
pi_kernel kernel 
)

Creates PI kernel object from a native handle.

NOTE: The created PI object takes ownership of the native handle.

Parameters
nativeHandleis the native handle to create PI kernel from.
contextis the PI context of the kernel.
programis the PI program of the kernel.
pluginOwnsNativeHandleIndicates whether the created PI object should take ownership of the native handle.
kernelis the PI kernel created from the native handle.

Definition at line 1819 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piextKernelGetNativeHandle()

pi_result piextKernelGetNativeHandle ( pi_kernel  kernel,
pi_native_handle nativeHandle 
)

Gets the native handle of a PI kernel object.

Parameters
kernelis the PI kernel to get the native handle of.
nativeHandleis the native handle of kernel.

Definition at line 1824 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piextKernelSetArgMemObj()

pi_result piextKernelSetArgMemObj ( pi_kernel  ,
pi_uint32  ,
const pi_mem  
)

Definition at line 1351 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piextKernelSetArgPointer()

pi_result piextKernelSetArgPointer ( pi_kernel  kernel,
pi_uint32  arg_index,
size_t  arg_size,
const void *  arg_value 
)

Sets up pointer arguments for CL kernels.

An extra indirection is required due to CL argument conventions.

Parameters
kernelis the kernel to be launched
arg_indexis the index of the kernel argument
arg_sizeis the size in bytes of the argument (ignored in CL)
arg_valueis the pointer argument

Definition at line 1912 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piextKernelSetArgSampler()

pi_result piextKernelSetArgSampler ( pi_kernel  ,
pi_uint32  ,
const pi_sampler  
)

Definition at line 1356 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piextMemCreateWithNativeHandle()

pi_result piextMemCreateWithNativeHandle ( pi_native_handle  nativeHandle,
pi_context  context,
bool  ownNativeHandle,
pi_mem mem 
)

Creates PI mem object from a native handle.

NOTE: The created PI object takes ownership of the native handle.

Parameters
nativeHandleis the native handle to create PI mem from.
contextThe PI context of the memory allocation.
ownNativeHandleIndicates if we own the native memory handle or it came from interop that asked to not transfer the ownership to SYCL RT.
memis the PI mem created from the native handle.

Definition at line 1275 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piextMemGetNativeHandle()

pi_result piextMemGetNativeHandle ( pi_mem  mem,
pi_native_handle nativeHandle 
)

Gets the native handle of a PI mem object.

Parameters
memis the PI mem to get the native handle of.
nativeHandleis the native handle of mem.

Definition at line 1271 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piextPlatformCreateWithNativeHandle()

pi_result piextPlatformCreateWithNativeHandle ( pi_native_handle  nativeHandle,
pi_platform platform 
)

Creates PI platform object from a native handle.

NOTE: The created PI object takes ownership of the native handle.

Parameters
nativeHandleis the native handle to create PI device from.
platformis the PI platform created from the native handle.

Definition at line 479 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piextPlatformGetNativeHandle()

pi_result piextPlatformGetNativeHandle ( pi_platform  platform,
pi_native_handle nativeHandle 
)

Gets the native handle of a PI platform object.

Parameters
platformis the PI platform to get the native handle of.
nativeHandleis the native handle of platform.

Definition at line 475 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piextPluginGetOpaqueData()

pi_result piextPluginGetOpaqueData ( void *  opaque_data_param,
void **  opaque_data_return 
)

API to get Plugin internal data, opaque to SYCL RT.

Some devices whose device code is compiled by the host compiler (e.g. CPU emulators) may use it to access some device code functionality implemented in/behind the plugin.

Parameters
opaque_data_param- unspecified argument, interpretation is specific to a plugin
opaque_data_return- placeholder for the returned opaque data.

Definition at line 1964 of file pi_esimd_emulator.cpp.

References PiESimdDeviceAccess.

◆ piextProgramCreateWithNativeHandle()

pi_result piextProgramCreateWithNativeHandle ( pi_native_handle  nativeHandle,
pi_context  context,
bool  pluginOwnsNativeHandle,
pi_program program 
)

Creates PI program object from a native handle.

NOTE: The created PI object takes ownership of the native handle.

Parameters
nativeHandleis the native handle to create PI program from.
contextis the PI context of the program.
pluginOwnsNativeHandleIndicates whether the created PI object should take ownership of the native handle.
programis the PI program created from the native handle.

Definition at line 1338 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piextProgramGetNativeHandle()

pi_result piextProgramGetNativeHandle ( pi_program  program,
pi_native_handle nativeHandle 
)

Gets the native handle of a PI program object.

Parameters
programis the PI program to get the native handle of.
nativeHandleis the native handle of program.

Definition at line 1334 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piextProgramSetSpecializationConstant()

pi_result piextProgramSetSpecializationConstant ( pi_program  prog,
pi_uint32  spec_id,
size_t  spec_size,
const void *  spec_value 
)

Sets a specialization constant to a specific value.

Note: Only used when specialization constants are natively supported (SPIR-V binaries), and not when they are emulated (AOT binaries).

Parameters
progthe program object which will use the value
spec_idinteger ID of the constant
spec_sizesize of the value
spec_valuebytes of the value

Definition at line 1941 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piextQueueCreateWithNativeHandle()

pi_result piextQueueCreateWithNativeHandle ( pi_native_handle  nativeHandle,
pi_context  context,
pi_device  device,
bool  pluginOwnsNativeHandle,
pi_queue queue 
)

Creates PI queue object from a native handle.

NOTE: The created PI object takes ownership of the native handle.

Parameters
nativeHandleis the native handle to create PI queue from.
contextis the PI context of the queue.
deviceis the PI device associated with the native device used when creating the native queue. This parameter is optional but some backends may fail to create the right PI queue if omitted.
pluginOwnsNativeHandleIndicates whether the created PI object should take ownership of the native handle.
queueis the PI queue created from the native handle.

Definition at line 995 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piextQueueGetNativeHandle()

pi_result piextQueueGetNativeHandle ( pi_queue  queue,
pi_native_handle nativeHandle 
)

Gets the native handle of a PI queue object.

Parameters
queueis the PI queue to get the native handle of.
nativeHandleis the native handle of queue.

Definition at line 991 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piextUSMDeviceAlloc()

pi_result piextUSMDeviceAlloc ( void **  result_ptr,
pi_context  context,
pi_device  device,
pi_usm_mem_properties properties,
size_t  size,
pi_uint32  alignment 
)

Allocates device memory.

Parameters
result_ptrcontains the allocated memory
contextis the pi_context
deviceis the device the memory will be allocated on
propertiesare optional allocation properties
sizeis the size of the allocation
alignmentis the desired alignment of the allocation

Definition at line 1844 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piextUSMEnqueueMemAdvise()

pi_result piextUSMEnqueueMemAdvise ( pi_queue  queue,
const void *  ptr,
size_t  length,
pi_mem_advice  advice,
pi_event event 
)

USM Memadvise API.

Parameters
queueis the queue to submit to
ptris the data to be advised
lengthis the size in bytes of the memory to advise
adviceis device specific advice
eventis the event that represents this operation

Definition at line 1926 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piextUSMEnqueueMemcpy()

pi_result piextUSMEnqueueMemcpy ( pi_queue  queue,
pi_bool  blocking,
void *  dst_ptr,
const void *  src_ptr,
size_t  size,
pi_uint32  num_events_in_waitlist,
const pi_event events_waitlist,
pi_event event 
)

USM Memcpy API.

Parameters
queueis the queue to submit to
blockingis whether this operation should block the host
src_ptris the data to be copied
dst_ptris the location the data will be copied
sizeis number of bytes to copy
num_events_in_waitlistis the number of events to wait on
events_waitlistis an array of events to wait on
eventis the event that represents this operation

Definition at line 1921 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piextUSMEnqueueMemset()

pi_result piextUSMEnqueueMemset ( pi_queue  queue,
void *  ptr,
pi_int32  value,
size_t  count,
pi_uint32  num_events_in_waitlist,
const pi_event events_waitlist,
pi_event event 
)

USM Memset API.

Parameters
queueis the queue to submit to
ptris the ptr to memset
valueis value to set. It is interpreted as an 8-bit value and the upper 24 bits are ignored
countis the size in bytes to memset
num_events_in_waitlistis the number of events to wait on
events_waitlistis an array of events to wait on
eventis the event that represents this operation

Definition at line 1916 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piextUSMEnqueuePrefetch()

pi_result piextUSMEnqueuePrefetch ( pi_queue  queue,
const void *  ptr,
size_t  size,
pi_usm_migration_flags  flags,
pi_uint32  num_events_in_waitlist,
const pi_event events_waitlist,
pi_event event 
)

Hint to migrate memory to the device.

Parameters
queueis the queue to submit to
ptrpoints to the memory to migrate
sizeis the number of bytes to migrate
flagsis a bitfield used to specify memory migration options
num_events_in_waitlistis the number of events to wait on
events_waitlistis an array of events to wait on
eventis the event that represents this operation

Definition at line 1958 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piextUSMFree()

pi_result piextUSMFree ( pi_context  context,
void *  ptr 
)

Indicates that the allocated USM memory is no longer needed on the runtime side.

The actual freeing of the memory may be done in a blocking or deferred manner, e.g. to avoid issues with indirect memory access from kernels.

Parameters
contextis the pi_context of the allocation
ptris the memory to be freed

Definition at line 1888 of file pi_esimd_emulator.cpp.

References _pi_context::Addr2CmBufferSVM, _pi_context::Addr2CmBufferSVMLock, _pi_device::CmDevicePtr, and _pi_context::Device.

◆ piextUSMGetMemAllocInfo()

pi_result piextUSMGetMemAllocInfo ( pi_context  context,
const void *  ptr,
pi_mem_alloc_info  param_name,
size_t  param_value_size,
void *  param_value,
size_t *  param_value_size_ret 
)

API to query information about USM allocated pointers Valid Queries: PI_MEM_ALLOC_TYPE returns host/device/shared pi_host_usm value PI_MEM_ALLOC_BASE_PTR returns the base ptr of an allocation if the queried pointer fell inside an allocation.

Result must fit in void * PI_MEM_ALLOC_SIZE returns how big the queried pointer's allocation is in bytes. Result is a size_t. PI_MEM_ALLOC_DEVICE returns the pi_device this was allocated against

Parameters
contextis the pi_context
ptris the pointer to query
param_nameis the type of query to perform
param_value_sizeis the size of the result in bytes
param_valueis the result
param_value_size_retis how many bytes were written

Definition at line 1931 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piextUSMHostAlloc()

pi_result piextUSMHostAlloc ( void **  result_ptr,
pi_context  context,
pi_usm_mem_properties properties,
size_t  size,
pi_uint32  alignment 
)

Allocates host memory accessible by the device.

Parameters
result_ptrcontains the allocated memory
contextis the pi_context
propertiesare optional allocation properties
sizeis the size of the allocation
alignmentis the desired alignment of the allocation

Definition at line 1839 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piextUSMSharedAlloc()

pi_result piextUSMSharedAlloc ( void **  result_ptr,
pi_context  context,
pi_device  device,
pi_usm_mem_properties properties,
size_t  size,
pi_uint32  alignment 
)

Allocates memory accessible on both host and device.

Parameters
result_ptrcontains the allocated memory
contextis the pi_context
deviceis the device the memory will be allocated on
propertiesare optional allocation properties
sizeis the size of the allocation
alignmentis the desired alignment of the allocation

Definition at line 1849 of file pi_esimd_emulator.cpp.

References _pi_context::Addr2CmBufferSVM, _pi_context::Addr2CmBufferSVMLock, ARG_UNUSED, _pi_device::CmDevicePtr, Device, _pi_context::Device, and cl::sycl::detail::getNextPowerOfTwo().

◆ piKernelCreate()

pi_result piKernelCreate ( pi_program  ,
const char ,
pi_kernel  
)

Definition at line 1343 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piKernelGetGroupInfo()

pi_result piKernelGetGroupInfo ( pi_kernel  ,
pi_device  ,
pi_kernel_group_info  ,
size_t  ,
void *  ,
size_t *   
)

Definition at line 1364 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piKernelGetInfo()

pi_result piKernelGetInfo ( pi_kernel  ,
pi_kernel_info  ,
size_t  ,
void *  ,
size_t *   
)

Definition at line 1360 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piKernelGetSubGroupInfo()

pi_result piKernelGetSubGroupInfo ( pi_kernel  kernel,
pi_device  device,
pi_kernel_sub_group_info  param_name,
size_t  input_value_size,
const void *  input_value,
size_t  param_value_size,
void *  param_value,
size_t *  param_value_size_ret 
)

API to query information from the sub-group from a kernel.

Parameters
kernelis the pi_kernel to query
deviceis the device the kernel is executed on
param_nameis a pi_kernel_sub_group_info enum value that specifies the informtation queried for.
input_value_sizeis the size of input value passed in ptr input_value param
input_valueis the ptr to the input value passed.
param_value_sizeis the size of the value in bytes.
param_valueis a pointer to the value to set.
param_value_size_retis a pointer to return the size of data in param_value ptr.

All queries expect a return of 4 bytes in param_value_size, param_value_size_ret, and a uint32_t value should to be written in param_value ptr. Note: This behaviour differs from OpenCL. OpenCL returns size_t.

Definition at line 1369 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piKernelRelease()

pi_result piKernelRelease ( pi_kernel  )

Definition at line 1377 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piKernelRetain()

pi_result piKernelRetain ( pi_kernel  )

Definition at line 1375 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piKernelSetArg()

pi_result piKernelSetArg ( pi_kernel  ,
pi_uint32  ,
size_t  ,
const void *   
)

Definition at line 1347 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piKernelSetExecInfo()

pi_result piKernelSetExecInfo ( pi_kernel  kernel,
pi_kernel_exec_info  value_name,
size_t  param_value_size,
const void *  param_value 
)

API to set attributes controlling kernel execution.

Parameters
kernelis the pi kernel to execute
param_nameis a pi_kernel_exec_info value that specifies the info passed to the kernel
param_value_sizeis the size of the value in bytes
param_valueis a pointer to the value to set for the kernel

If param_name is PI_USM_INDIRECT_ACCESS, the value will be a ptr to the pi_bool value PI_TRUE If param_name is PI_USM_PTRS, the value will be an array of ptrs

Definition at line 1936 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piMemBufferCreate()

◆ piMemBufferPartition()

pi_result piMemBufferPartition ( pi_mem  ,
pi_mem_flags  ,
pi_buffer_create_type  ,
void *  ,
pi_mem  
)

Definition at line 1752 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piMemGetInfo()

pi_result piMemGetInfo ( pi_mem  ,
pi_mem_info  ,
size_t  ,
void *  ,
size_t *   
)

Definition at line 1073 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piMemImageCreate()

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 
)

◆ piMemImageGetInfo()

pi_result piMemImageGetInfo ( pi_mem  ,
pi_image_info  ,
size_t  ,
void *  ,
size_t *   
)

Definition at line 1665 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piMemRelease()

pi_result piMemRelease ( pi_mem  Mem)

◆ piMemRetain()

pi_result piMemRetain ( pi_mem  Mem)

Definition at line 1077 of file pi_esimd_emulator.cpp.

◆ piPlatformGetInfo()

pi_result piPlatformGetInfo ( pi_platform  Platform,
pi_platform_info  ParamName,
size_t  ParamValueSize,
void *  ParamValue,
size_t *  ParamValueSizeRet 
)

◆ piPlatformsGet()

pi_result piPlatformsGet ( pi_uint32  NumEntries,
pi_platform Platforms,
pi_uint32 NumPlatforms 
)

Runtime queries number of Platforms

Definition at line 400 of file pi_esimd_emulator.cpp.

References _pi_platform::CmEmuVersion, PiPlatformCache, PiPlatformCacheLock, PiPlatformCachePopulated, PiTrace(), and PrintPiTrace.

◆ piPluginGetLastError()

pi_result piPluginGetLastError ( char **  message)

API to get Plugin specific warning and error messages.

Parameters
messageis a returned address to the first element in the message the plugin owns the error message string. The string is thread-local. As a result, different threads may return different errors. A message is overwritten by the following error or warning that is produced within the given thread. The memory is cleaned up at the end of the thread's lifetime.
Returns
PI_SUCCESS if plugin is indicating non-fatal warning. Any other error code indicates that plugin considers this to be a fatal error and the runtime must handle it or end the application.

Definition at line 164 of file pi_esimd_emulator.cpp.

References ErrorMessage, and ErrorMessageCode.

◆ piPluginInit()

◆ piProgramBuild()

pi_result piProgramBuild ( pi_program  ,
pi_uint32  ,
const pi_device ,
const char ,
void(*)(pi_program, void *)  ,
void *   
)

Definition at line 1320 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piProgramCompile()

pi_result piProgramCompile ( pi_program  ,
pi_uint32  ,
const pi_device ,
const char ,
pi_uint32  ,
const pi_program ,
const char **  ,
void(*)(pi_program, void *)  ,
void *   
)

Definition at line 1313 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piProgramCreate()

pi_result piProgramCreate ( pi_context  ,
const void *  ,
size_t  ,
pi_program  
)

Definition at line 1280 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piProgramCreateWithBinary()

pi_result piProgramCreateWithBinary ( pi_context  context,
pi_uint32  num_devices,
const pi_device device_list,
const size_t *  lengths,
const unsigned char **  binaries,
size_t  num_metadata_entries,
const pi_device_binary_property metadata,
pi_int32 binary_status,
pi_program ret_program 
)

Creates a PI program for a context and loads the given binary into it.

Parameters
contextis the PI context to associate the program with.
num_devicesis the number of devices in device_list.
device_listis a pointer to a list of devices. These devices must all be in context.
lengthsis an array of sizes in bytes of the binary in binaries.
binariesis a pointer to a list of program binaries.
num_metadata_entriesis the number of metadata entries in metadata.
metadatais a pointer to a list of program metadata entries. The use of metadata entries is backend-defined.
binary_statusreturns whether the program binary was loaded succesfully or not, for each device in device_list. binary_status is ignored if it is null and otherwise it must be an array of num_devices elements.
ret_programis the PI program created from the program binaries.

Definition at line 1284 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piProgramGetBuildInfo()

pi_result piProgramGetBuildInfo ( pi_program  ,
pi_device  ,
pi_program_build_info  ,
size_t  ,
void *  ,
size_t *   
)

Definition at line 1325 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piProgramGetInfo()

pi_result piProgramGetInfo ( pi_program  ,
pi_program_info  ,
size_t  ,
void *  ,
size_t *   
)

Definition at line 1302 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piProgramLink()

pi_result piProgramLink ( pi_context  ,
pi_uint32  ,
const pi_device ,
const char ,
pi_uint32  ,
const pi_program ,
void(*)(pi_program, void *)  ,
void *  ,
pi_program  
)

Definition at line 1307 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piProgramRelease()

pi_result piProgramRelease ( pi_program  )

Definition at line 1332 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piProgramRetain()

pi_result piProgramRetain ( pi_program  )

Definition at line 1330 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piQueueCreate()

pi_result piQueueCreate ( pi_context  Context,
pi_device  Device,
pi_queue_properties  Properties,
pi_queue Queue 
)

◆ piQueueFinish()

pi_result piQueueFinish ( pi_queue  )

Definition at line 977 of file pi_esimd_emulator.cpp.

References CONTINUE_NO_IMPLEMENTATION.

◆ piQueueFlush()

pi_result piQueueFlush ( pi_queue  )

Definition at line 984 of file pi_esimd_emulator.cpp.

References CONTINUE_NO_IMPLEMENTATION.

◆ piQueueGetInfo()

pi_result piQueueGetInfo ( pi_queue  ,
pi_queue_info  ,
size_t  ,
void *  ,
size_t *   
)

Definition at line 951 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piQueueRelease()

pi_result piQueueRelease ( pi_queue  Queue)

Definition at line 963 of file pi_esimd_emulator.cpp.

References _pi_queue::CmQueuePtr.

◆ piQueueRetain()

pi_result piQueueRetain ( pi_queue  Queue)

Definition at line 955 of file pi_esimd_emulator.cpp.

◆ piSamplerCreate()

pi_result piSamplerCreate ( pi_context  ,
const pi_sampler_properties ,
pi_sampler  
)

Definition at line 1462 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piSamplerGetInfo()

pi_result piSamplerGetInfo ( pi_sampler  ,
pi_sampler_info  ,
size_t  ,
void *  ,
size_t *   
)

Definition at line 1467 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piSamplerRelease()

pi_result piSamplerRelease ( pi_sampler  )

Definition at line 1474 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piSamplerRetain()

pi_result piSamplerRetain ( pi_sampler  )

Definition at line 1472 of file pi_esimd_emulator.cpp.

References DIE_NO_IMPLEMENTATION.

◆ piTearDown()

pi_result piTearDown ( void *  PluginParameter)

API to notify that the plugin should clean up its resources.

No PI calls should be made until the next piPluginInit call.

Parameters
PluginParameterplaceholder for future use, currenly not used.

Definition at line 1969 of file pi_esimd_emulator.cpp.

References PiESimdDeviceAccess, and PiESimdSurfaceMap.

◆ PiTrace()

◆ setErrorMessage()

static void setErrorMessage ( const char message,
pi_result  error_code 
)
static

◆ sycl_get_cm_buffer_params()

void sycl_get_cm_buffer_params ( unsigned int  IndexInput,
char **  BaseAddr,
uint32_t *  Width,
std::mutex **  BufMtxLock 
)

◆ sycl_get_cm_image_params()

void sycl_get_cm_image_params ( unsigned int  IndexInput,
char **  BaseAddr,
uint32_t *  Width,
uint32_t *  Height,
uint32_t *  Bpp,
std::mutex **  ImgMtxLock 
)

◆ sycl_get_cm_surface_index()

unsigned int sycl_get_cm_surface_index ( void *  PtrInput)

Definition at line 272 of file pi_esimd_emulator.cpp.

References _pi_mem::SurfaceIndex.

Variable Documentation

◆ ErrorMessage

thread_local char ErrorMessage[MaxMessageSize]

Definition at line 153 of file pi_esimd_emulator.cpp.

Referenced by piPluginGetLastError(), and setErrorMessage().

◆ ErrorMessageCode

thread_local pi_result ErrorMessageCode = PI_SUCCESS

Definition at line 152 of file pi_esimd_emulator.cpp.

Referenced by piPluginGetLastError(), and setErrorMessage().

◆ ESimdEmuVersionString

char ESimdEmuVersionString[32]
static

Definition at line 148 of file pi_esimd_emulator.cpp.

Referenced by piDeviceGetInfo().

◆ MaxMessageSize

constexpr size_t MaxMessageSize = 256
constexpr

Definition at line 151 of file pi_esimd_emulator.cpp.

Referenced by setErrorMessage().

◆ PiESimdDeviceAccess

sycl::detail::ESIMDEmuPluginOpaqueData* PiESimdDeviceAccess
static

Definition at line 126 of file pi_esimd_emulator.cpp.

Referenced by piextPluginGetOpaqueData(), piPluginInit(), and piTearDown().

◆ PiESimdSurfaceMap

std::unordered_map<unsigned int, _pi_mem *>* PiESimdSurfaceMap
static
Initial value:
=
new std::unordered_map<unsigned int, _pi_mem *>

Definition at line 134 of file pi_esimd_emulator.cpp.

Referenced by piMemBufferCreate(), piMemImageCreate(), piMemRelease(), piTearDown(), sycl_get_cm_buffer_params(), and sycl_get_cm_image_params().

◆ PiESimdSurfaceMapLock

std::mutex* PiESimdSurfaceMapLock = new std::mutex
static

◆ PiPlatformCache

pi_platform PiPlatformCache
static

Definition at line 129 of file pi_esimd_emulator.cpp.

Referenced by piPlatformsGet().

◆ PiPlatformCacheLock

std::mutex* PiPlatformCacheLock = new std::mutex
static

Definition at line 131 of file pi_esimd_emulator.cpp.

Referenced by piPlatformsGet().

◆ PrintPiTrace

bool PrintPiTrace = false
static

Definition at line 113 of file pi_esimd_emulator.cpp.

Referenced by _pi_queue::executeCommandList(), piPlatformsGet(), and PiTrace().

◆ SupportedVersion

const char SupportedVersion[] = _PI_ESIMD_PLUGIN_VERSION_STRING

Definition at line 1984 of file pi_esimd_emulator.cpp.

Referenced by piPluginInit().

PrintPiTrace
static bool PrintPiTrace
Definition: pi_esimd_emulator.cpp:113