#include <stdint.h>
#include <detail/accessor_impl.hpp>
#include <sycl/backend_types.hpp>
#include <sycl/detail/common.hpp>
#include <sycl/detail/export.hpp>
#include <sycl/detail/helpers.hpp>
#include <sycl/detail/host_profiling_info.hpp>
#include <sycl/detail/kernel_desc.hpp>
#include <sycl/detail/type_traits.hpp>
#include <sycl/ext/intel/esimd/common.hpp>
#include <sycl/group.hpp>
#include <sycl/id.hpp>
#include <sycl/kernel.hpp>
#include <sycl/nd_item.hpp>
#include <sycl/range.hpp>
#include <esimdemu_support.h>
#include <cstdarg>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <string>
#include <thread>
#include <utility>
#include "pi_esimd_emulator.hpp"
#include <sycl/detail/pi.def>
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 | piextQueueCreate (pi_context Context, pi_device Device, pi_queue_properties *Properties, pi_queue *Queue) |
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 *) |
Create PI event object in a signalled/completed state. More... | |
pi_result | piEventGetInfo (pi_event Event, pi_event_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet) |
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 | piextUSMEnqueueFill2D (pi_queue, void *, size_t, size_t, const void *, size_t, size_t, pi_uint32, const pi_event *, pi_event *) |
USM 2D fill API. More... | |
pi_result | piextUSMEnqueueMemset2D (pi_queue, void *, size_t, int, size_t, size_t, pi_uint32, const pi_event *, pi_event *) |
USM 2D Memset API. More... | |
pi_result | piextUSMEnqueueMemcpy2D (pi_queue, pi_bool, void *, size_t, const void *, size_t, size_t, size_t, pi_uint32, const pi_event *, pi_event *) |
USM 2D Memcpy 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 | piextEnqueueDeviceGlobalVariableWrite (pi_queue, pi_program, const char *, pi_bool, size_t, size_t, const void *, pi_uint32, const pi_event *, pi_event *) |
Device global variable. More... | |
pi_result | piextEnqueueDeviceGlobalVariableRead (pi_queue, pi_program, const char *, pi_bool, size_t, size_t, void *, pi_uint32, const pi_event *, pi_event *) |
API reading data from a device global variable to host. More... | |
pi_result | piextPluginGetOpaqueData (void *, void **OpaqueDataReturn) |
Plugin. More... | |
pi_result | piTearDown (void *) |
API to notify that the plugin should clean up its resources. More... | |
pi_result | piGetDeviceAndHostTimer (pi_device device, uint64_t *deviceTime, uint64_t *hostTime) |
Queries device for it's global timestamp in nanoseconds, and updates HostTime with the value of the host timer at the closest possible point in time to that at which DeviceTime was returned. 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 |
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.
#define _PI_API | ( | api | ) | (PluginInit->PiFunctionTable).api = (decltype(&::api))(&api); |
#define ARG_UNUSED | ( | x | ) | (void)x |
Definition at line 47 of file pi_esimd_emulator.cpp.
#define CASE_PI_UNSUPPORTED | ( | not_supported | ) |
Definition at line 391 of file pi_esimd_emulator.cpp.
#define CONTINUE_NO_IMPLEMENTATION |
Definition at line 383 of file pi_esimd_emulator.cpp.
#define DIE_NO_IMPLEMENTATION |
Definition at line 375 of file pi_esimd_emulator.cpp.
#define ESIMDEmuPluginDataVersion 0 |
Definition at line 142 of file pi_esimd_emulator.cpp.
#define ESIMDEmuPluginInterfaceVersion 1 |
Definition at line 146 of file pi_esimd_emulator.cpp.
using IDBuilder = sycl::detail::Builder |
Definition at line 170 of file pi_esimd_emulator.cpp.
using KernelFunc = std::function<void(const sycl::nd_item<NDims> &)> |
Definition at line 173 of file pi_esimd_emulator.cpp.
cm_support::CM_SURFACE_FORMAT ConvertPiImageFormatToCmFormat | ( | const pi_image_format * | PiFormat | ) |
Definition at line 1151 of file pi_esimd_emulator.cpp.
References _pi_image_format::image_channel_data_type, _pi_image_format::image_channel_order, PI_IMAGE_CHANNEL_ORDER_ARGB, PI_IMAGE_CHANNEL_ORDER_RGBA, PI_IMAGE_CHANNEL_TYPE_UNORM_INT8, PI_IMAGE_CHANNEL_TYPE_UNSIGNED_INT32, and PI_IMAGE_CHANNEL_TYPE_UNSIGNED_INT8.
Referenced by piMemImageCreate().
void InvokeKernel | ( | KernelInvocationContext< NDims > * | ctx | ) |
Definition at line 211 of file pi_esimd_emulator.cpp.
References KernelInvocationContext< NDims >::Func, KernelInvocationContext< NDims >::GlobalOffset, KernelInvocationContext< NDims >::GlobalSize, and KernelInvocationContext< NDims >::LocalSize.
|
static |
Implementation for Host Kernel Launch used by piEnqueueKernelLaunch.
Definition at line 341 of file pi_esimd_emulator.cpp.
Referenced by piEnqueueKernelLaunch().
pi_result piclProgramCreateWithBinary | ( | pi_context | , |
pi_uint32 | , | ||
const pi_device * | , | ||
const size_t * | , | ||
const unsigned char ** | , | ||
pi_int32 * | , | ||
pi_program * | |||
) |
Definition at line 1314 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
pi_result piclProgramCreateWithSource | ( | pi_context | , |
pi_uint32 | , | ||
const char ** | , | ||
const size_t * | , | ||
pi_program * | |||
) |
Definition at line 1320 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
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 | ||
) |
pi_result piContextGetInfo | ( | pi_context | , |
pi_context_info | , | ||
size_t | , | ||
void * | , | ||
size_t * | |||
) |
Definition at line 867 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
pi_result piContextRelease | ( | pi_context | Context | ) |
TODO : Encapsulating accesses (add/remove) for Addr2CmBufferSVM
Definition at line 897 of file pi_esimd_emulator.cpp.
References _pi_context::Addr2CmBufferSVM, _pi_context::Addr2CmBufferSVMLock, _pi_device::CmDevicePtr, and _pi_context::Device.
pi_result piContextRetain | ( | pi_context | Context | ) |
Definition at line 887 of file pi_esimd_emulator.cpp.
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 592 of file pi_esimd_emulator.cpp.
References CASE_PI_UNSUPPORTED, DIE_NO_IMPLEMENTATION, ESIMDEmuPluginDataVersion, ESIMDEmuPluginInterfaceVersion, ESimdEmuVersionString, PI_DEVICE_EXEC_CAPABILITIES_KERNEL, PI_DEVICE_INFO_ADDRESS_BITS, PI_DEVICE_INFO_ATOMIC_64, PI_DEVICE_INFO_AVAILABLE, PI_DEVICE_INFO_BUILD_ON_SUBDEVICE, PI_DEVICE_INFO_BUILT_IN_KERNELS, PI_DEVICE_INFO_COMPILER_AVAILABLE, PI_DEVICE_INFO_DEVICE_ID, 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_DEVICE_INFO_ATOMIC_FENCE_ORDER_CAPABILITIES, PI_EXT_DEVICE_INFO_ATOMIC_FENCE_SCOPE_CAPABILITIES, PI_EXT_DEVICE_INFO_ATOMIC_MEMORY_ORDER_CAPABILITIES, PI_EXT_DEVICE_INFO_ATOMIC_MEMORY_SCOPE_CAPABILITIES, PI_EXT_INTEL_DEVICE_INFO_MAX_COMPUTE_QUEUE_INDICES, 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_FLAG_ON_DEVICE, PI_USM_ACCESS, PI_USM_ATOMIC_ACCESS, PI_USM_CONCURRENT_ACCESS, and PI_USM_CONCURRENT_ATOMIC_ACCESS.
pi_result piDevicePartition | ( | pi_device | , |
const pi_device_partition_property * | , | ||
pi_uint32 | , | ||
pi_device * | , | ||
pi_uint32 * | |||
) |
Definition at line 822 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
Definition at line 582 of file pi_esimd_emulator.cpp.
Definition at line 572 of file pi_esimd_emulator.cpp.
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 484 of file pi_esimd_emulator.cpp.
References PI_DEVICE_TYPE_GPU, _pi_platform::PiDeviceCache, PiTrace(), and _pi_platform::populateDeviceCacheIfNeeded().
Definition at line 1531 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
Definition at line 1536 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
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 | ||
) |
Definition at line 1813 of file pi_esimd_emulator.cpp.
References ARG_UNUSED, DIE_NO_IMPLEMENTATION, InvokeImpl< NDims >::invoke(), isNull(), and _pi_event::release().
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 1621 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
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 1627 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
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 1635 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
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 | ||
) |
Definition at line 1641 of file pi_esimd_emulator.cpp.
References ARG_UNUSED, _pi_mem::MapHostPtr, _pi_mem::Mappings, _pi_mem::MappingsMutex, PiTrace(), and _pi_event::release().
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 | ||
) |
TODO : Support Blocked read, 'Queue' handling
Definition at line 1541 of file pi_esimd_emulator.cpp.
References ARG_UNUSED, _pi_buffer::MapHostPtr, sycl::_V1::detail::memcpy(), PiTrace(), cm_surface_ptr_t::RegularBufPtr, _pi_event::release(), _pi_mem::SurfacePtr, cm_surface_ptr_t::tag, cm_surface_ptr_t::TypeRegularBuffer, and cm_surface_ptr_t::TypeUserProvidedBuffer.
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 1599 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
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 1607 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
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 1613 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
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 1795 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
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 1801 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
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 | ||
) |
TODO : Support Blocked read, 'Queue' handling
Definition at line 1724 of file pi_esimd_emulator.cpp.
References ARG_UNUSED, pi_image_region_struct::height, _pi_mem::MapHostPtr, sycl::_V1::detail::memcpy(), PiTrace(), cm_surface_ptr_t::RegularImgPtr, _pi_event::release(), _pi_mem::SurfacePtr, cm_surface_ptr_t::tag, cm_surface_ptr_t::TypeRegularImage, cm_surface_ptr_t::TypeUserProvidedImage, pi_image_offset_struct::x, pi_image_offset_struct::y, and pi_image_offset_struct::z.
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 1789 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
pi_result piEnqueueMemUnmap | ( | pi_queue | Queue, |
pi_mem | MemObj, | ||
void * | MappedPtr, | ||
pi_uint32 | NumEventsInWaitList, | ||
const pi_event * | EventWaitList, | ||
pi_event * | Event | ||
) |
Definition at line 1684 of file pi_esimd_emulator.cpp.
References ARG_UNUSED, _pi_mem::Mappings, _pi_mem::MappingsMutex, PiTrace(), and _pi_event::release().
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 1883 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
pi_result piEventCreate | ( | pi_context | context, |
pi_event * | ret_event | ||
) |
Create PI event object in a signalled/completed state.
context | is the PI context of the event. |
ret_event | is the PI even created. |
Definition at line 1402 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
pi_result piEventGetInfo | ( | pi_event | Event, |
pi_event_info | ParamName, | ||
size_t | ParamValueSize, | ||
void * | ParamValue, | ||
size_t * | ParamValueSizeRet | ||
) |
Definition at line 1404 of file pi_esimd_emulator.cpp.
References _pi_event::CmEventPtr, DIE_NO_IMPLEMENTATION, _pi_event::IsDummyEvent, PI_EVENT_COMPLETE, PI_EVENT_INFO_COMMAND_EXECUTION_STATUS, and PI_EVENT_RUNNING.
pi_result piEventGetProfilingInfo | ( | pi_event | Event, |
pi_profiling_info | ParamName, | ||
size_t | ParamValueSize, | ||
void * | ParamValue, | ||
size_t * | ParamValueSizeRet | ||
) |
Definition at line 1440 of file pi_esimd_emulator.cpp.
References ARG_UNUSED, and PiTrace().
Definition at line 1488 of file pi_esimd_emulator.cpp.
References _pi_event::CmEventPtr, _pi_event::IsDummyEvent, and _pi_event::OwnerQueue.
Definition at line 1478 of file pi_esimd_emulator.cpp.
Definition at line 1471 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
Definition at line 1476 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
Definition at line 1453 of file pi_esimd_emulator.cpp.
References _pi_event::CmEventPtr.
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.
nativeHandle | is the native handle to create PI context from. |
numDevices | is 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. |
devices | is the list of devices in the context. Parameter is ignored if devices can be queried from the context native handle for a backend. |
pluginOwnsNativeHandle | Indicates whether the created PI object should take ownership of the native handle. |
context | is the PI context created from the native handle. |
Definition at line 881 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
pi_result piextContextGetNativeHandle | ( | pi_context | context, |
pi_native_handle * | nativeHandle | ||
) |
Gets the native handle of a PI context object.
context | is the PI context to get the native handle of. |
nativeHandle | is the native handle of context. |
Definition at line 877 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
pi_result piextContextSetExtendedDeleter | ( | pi_context | , |
pi_context_extended_deleter | , | ||
void * | |||
) |
Definition at line 872 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
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.
nativeHandle | is the native handle to create PI device from. |
platform | is the platform of the device (optional). |
device | is the PI device created from the native handle. |
Definition at line 831 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
pi_result piextDeviceGetNativeHandle | ( | pi_device | device, |
pi_native_handle * | nativeHandle | ||
) |
Gets the native handle of a PI device object.
device | is the PI device to get the native handle of. |
nativeHandle | is the native handle of device. |
Definition at line 827 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
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 2018 of file pi_esimd_emulator.cpp.
References PiTrace().
pi_result piextEnqueueDeviceGlobalVariableRead | ( | pi_queue | queue, |
pi_program | program, | ||
const char * | name, | ||
pi_bool | blocking_read, | ||
size_t | count, | ||
size_t | offset, | ||
void * | dst, | ||
pi_uint32 | num_events_in_wait_list, | ||
const pi_event * | event_wait_list, | ||
pi_event * | event | ||
) |
API reading data from a device global variable to host.
queue | is the queue |
program | is the program containing the device global variable |
blocking_read | is true if the read should block |
name | is the unique identifier for the device global variable |
count | is the number of bytes to copy |
offset | is the byte offset into the device global variable to start copying |
dst | is a pointer to where the data must be copied to |
num_events_in_wait_list | is a number of events in the wait list |
event_wait_list | is the wait list |
event | is the resulting event |
Definition at line 2043 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
pi_result piextEnqueueDeviceGlobalVariableWrite | ( | pi_queue | queue, |
pi_program | program, | ||
const char * | name, | ||
pi_bool | blocking_write, | ||
size_t | count, | ||
size_t | offset, | ||
const void * | src, | ||
pi_uint32 | num_events_in_wait_list, | ||
const pi_event * | event_wait_list, | ||
pi_event * | event | ||
) |
Device global variable.
API for writing data from host to a device global variable.
queue | is the queue |
program | is the program containing the device global variable |
blocking_write | is true if the write should block |
name | is the unique identifier for the device global variable |
count | is the number of bytes to copy |
offset | is the byte offset into the device global variable to start copying |
src | is a pointer to where the data must be copied from |
num_events_in_wait_list | is a number of events in the wait list |
event_wait_list | is the wait list |
event | is the resulting event |
Definition at line 2036 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
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.
nativeHandle | is the native handle to create PI event from. |
context | is the corresponding PI context |
pluginOwnsNativeHandle | Indicates whether the created PI object should take ownership of the native handle. |
event | is the PI event created from the native handle. |
Definition at line 1513 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
pi_result piextEventGetNativeHandle | ( | pi_event | event, |
pi_native_handle * | nativeHandle | ||
) |
Gets the native handle of a PI event object.
event | is the PI event to get the native handle of. |
nativeHandle | is the native handle of event. |
Definition at line 1509 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
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 1889 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
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.
nativeHandle | is the native handle to create PI kernel from. |
context | is the PI context of the kernel. |
program | is the PI program of the kernel. |
pluginOwnsNativeHandle | Indicates whether the created PI object should take ownership of the native handle. |
kernel | is the PI kernel created from the native handle. |
Definition at line 1874 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
pi_result piextKernelGetNativeHandle | ( | pi_kernel | kernel, |
pi_native_handle * | nativeHandle | ||
) |
Gets the native handle of a PI kernel object.
kernel | is the PI kernel to get the native handle of. |
nativeHandle | is the native handle of kernel. |
Definition at line 1879 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
Definition at line 1374 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
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.
kernel | is the kernel to be launched |
arg_index | is the index of the kernel argument |
arg_size | is the size in bytes of the argument (ignored in CL) |
arg_value | is the pointer argument |
Definition at line 1967 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
pi_result piextKernelSetArgSampler | ( | pi_kernel | , |
pi_uint32 | , | ||
const pi_sampler * | |||
) |
Definition at line 1379 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
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.
nativeHandle | is the native handle to create PI mem from. |
context | The PI context of the memory allocation. |
ownNativeHandle | Indicates if we own the native memory handle or it came from interop that asked to not transfer the ownership to SYCL RT. |
mem | is the PI mem created from the native handle. |
Definition at line 1298 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
pi_result piextMemGetNativeHandle | ( | pi_mem | mem, |
pi_native_handle * | nativeHandle | ||
) |
Gets the native handle of a PI mem object.
mem | is the PI mem to get the native handle of. |
nativeHandle | is the native handle of mem. |
Definition at line 1294 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
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.
nativeHandle | is the native handle to create PI device from. |
platform | is the PI platform created from the native handle. |
Definition at line 480 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
pi_result piextPlatformGetNativeHandle | ( | pi_platform | platform, |
pi_native_handle * | nativeHandle | ||
) |
Gets the native handle of a PI platform object.
platform | is the PI platform to get the native handle of. |
nativeHandle | is the native handle of platform. |
Definition at line 476 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
pi_result piextPluginGetOpaqueData | ( | void * | opaque_data_param, |
void ** | opaque_data_return | ||
) |
Plugin.
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.
opaque_data_param | - unspecified argument, interpretation is specific to a plugin |
opaque_data_return | - placeholder for the returned opaque data. |
Definition at line 2050 of file pi_esimd_emulator.cpp.
References PiESimdDeviceAccess.
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.
nativeHandle | is the native handle to create PI program from. |
context | is the PI context of the program. |
pluginOwnsNativeHandle | Indicates whether the created PI object should take ownership of the native handle. |
program | is the PI program created from the native handle. |
Definition at line 1361 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
pi_result piextProgramGetNativeHandle | ( | pi_program | program, |
pi_native_handle * | nativeHandle | ||
) |
Gets the native handle of a PI program object.
program | is the PI program to get the native handle of. |
nativeHandle | is the native handle of program. |
Definition at line 1357 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
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).
prog | the program object which will use the value |
spec_id | integer ID of the constant |
spec_size | size of the value |
spec_value | bytes of the value |
Definition at line 2013 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
pi_result piextQueueCreate | ( | pi_context | context, |
pi_device | device, | ||
pi_queue_properties * | properties, | ||
pi_queue * | queue | ||
) |
properties | points to a zero-terminated array of extra data describing desired queue properties. Format is {[PROPERTY[, property-specific elements of data]*,]* 0} |
Definition at line 932 of file pi_esimd_emulator.cpp.
References PI_QUEUE_FLAGS, and piQueueCreate().
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.
nativeHandle | is the native handle to create PI queue from. |
context | is the PI context of the queue. |
device | is 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. |
pluginOwnsNativeHandle | Indicates whether the created PI object should take ownership of the native handle. |
queue | is the PI queue created from the native handle. |
Definition at line 1018 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
pi_result piextQueueGetNativeHandle | ( | pi_queue | queue, |
pi_native_handle * | nativeHandle | ||
) |
Gets the native handle of a PI queue object.
queue | is the PI queue to get the native handle of. |
nativeHandle | is the native handle of queue. |
Definition at line 1014 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
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.
result_ptr | contains the allocated memory |
context | is the pi_context |
device | is the device the memory will be allocated on |
properties | are optional allocation properties |
size | is the size of the allocation |
alignment | is the desired alignment of the allocation |
Definition at line 1899 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
pi_result piextUSMEnqueueFill2D | ( | pi_queue | queue, |
void * | ptr, | ||
size_t | pitch, | ||
size_t | pattern_size, | ||
const void * | pattern, | ||
size_t | width, | ||
size_t | height, | ||
pi_uint32 | num_events_in_waitlist, | ||
const pi_event * | events_waitlist, | ||
pi_event * | event | ||
) |
USM 2D fill API.
queue | is the queue to submit to |
ptr | is the ptr to fill |
pitch | is the total width of the destination memory including padding |
pattern | is a pointer with the bytes of the pattern to set |
pattern_size | is the size in bytes of the pattern |
width | is width in bytes of each row to fill |
height | is height the columns to fill |
num_events_in_waitlist | is the number of events to wait on |
events_waitlist | is an array of events to wait on |
event | is the event that represents this operation |
Definition at line 1986 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
pi_result piextUSMEnqueueMemAdvise | ( | pi_queue | queue, |
const void * | ptr, | ||
size_t | length, | ||
pi_mem_advice | advice, | ||
pi_event * | event | ||
) |
USM Memadvise API.
queue | is the queue to submit to |
ptr | is the data to be advised |
length | is the size in bytes of the memory to advise |
advice | is device specific advice |
event | is the event that represents this operation |
Definition at line 1981 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
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.
queue | is the queue to submit to |
blocking | is whether this operation should block the host |
src_ptr | is the data to be copied |
dst_ptr | is the location the data will be copied |
size | is number of bytes to copy |
num_events_in_waitlist | is the number of events to wait on |
events_waitlist | is an array of events to wait on |
event | is the event that represents this operation |
Definition at line 1976 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
pi_result piextUSMEnqueueMemcpy2D | ( | pi_queue | queue, |
pi_bool | blocking, | ||
void * | dst_ptr, | ||
size_t | dst_pitch, | ||
const void * | src_ptr, | ||
size_t | src_pitch, | ||
size_t | width, | ||
size_t | height, | ||
pi_uint32 | num_events_in_waitlist, | ||
const pi_event * | events_waitlist, | ||
pi_event * | event | ||
) |
USM 2D Memcpy API.
queue | is the queue to submit to |
blocking | is whether this operation should block the host |
dst_ptr | is the location the data will be copied |
dst_pitch | is the total width of the destination memory including padding |
src_ptr | is the data to be copied |
src_pitch | is the total width of the source memory including padding |
width | is width in bytes of each row to be copied |
height | is height the columns to be copied |
num_events_in_waitlist | is the number of events to wait on |
events_waitlist | is an array of events to wait on |
event | is the event that represents this operation |
Definition at line 1997 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
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.
queue | is the queue to submit to |
ptr | is the ptr to memset |
value | is value to set. It is interpreted as an 8-bit value and the upper 24 bits are ignored |
count | is the size in bytes to memset |
num_events_in_waitlist | is the number of events to wait on |
events_waitlist | is an array of events to wait on |
event | is the event that represents this operation |
Definition at line 1971 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
pi_result piextUSMEnqueueMemset2D | ( | pi_queue | queue, |
void * | ptr, | ||
size_t | pitch, | ||
int | value, | ||
size_t | width, | ||
size_t | height, | ||
pi_uint32 | num_events_in_waitlist, | ||
const pi_event * | events_waitlist, | ||
pi_event * | event | ||
) |
USM 2D Memset API.
queue | is the queue to submit to |
ptr | is the ptr to fill |
pitch | is the total width of the destination memory including padding |
value | the value to fill into the region in |
ptr | |
width | is width in bytes of each row to fill |
height | is height the columns to fill |
num_events_in_waitlist | is the number of events to wait on |
events_waitlist | is an array of events to wait on |
event | is the event that represents this operation |
Definition at line 1992 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
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.
queue | is the queue to submit to |
ptr | points to the memory to migrate |
size | is the number of bytes to migrate |
flags | is a bitfield used to specify memory migration options |
num_events_in_waitlist | is the number of events to wait on |
events_waitlist | is an array of events to wait on |
event | is the event that represents this operation |
Definition at line 2030 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
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.
context | is the pi_context of the allocation |
ptr | is the memory to be freed |
Definition at line 1943 of file pi_esimd_emulator.cpp.
References _pi_context::Addr2CmBufferSVM, _pi_context::Addr2CmBufferSVMLock, _pi_device::CmDevicePtr, and _pi_context::Device.
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
context | is the pi_context |
ptr | is the pointer to query |
param_name | is the type of query to perform |
param_value_size | is the size of the result in bytes |
param_value | is the result |
param_value_size_ret | is how many bytes were written |
Definition at line 2003 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
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.
result_ptr | contains the allocated memory |
context | is the pi_context |
properties | are optional allocation properties |
size | is the size of the allocation |
alignment | is the desired alignment of the allocation |
Definition at line 1894 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
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.
result_ptr | contains the allocated memory |
context | is the pi_context |
device | is the device the memory will be allocated on |
properties | are optional allocation properties |
size | is the size of the allocation |
alignment | is the desired alignment of the allocation |
Definition at line 1904 of file pi_esimd_emulator.cpp.
References _pi_context::Addr2CmBufferSVM, _pi_context::Addr2CmBufferSVMLock, sycl::_V1::ext::oneapi::experimental::detail::Alignment, ARG_UNUSED, _pi_device::CmDevicePtr, _pi_context::Device, and sycl::_V1::detail::getNextPowerOfTwo().
Queries device for it's global timestamp in nanoseconds, and updates HostTime with the value of the host timer at the closest possible point in time to that at which DeviceTime was returned.
Device | device to query for timestamp |
DeviceTime | pointer to store device timestamp in nanoseconds. Optional argument, can be nullptr |
HostTime | pointer to store host timestamp in nanoseconds. Optional argurment, can be nullptr in which case timestamp will not be written |
Definition at line 2074 of file pi_esimd_emulator.cpp.
References PiTrace().
pi_result piKernelCreate | ( | pi_program | , |
const char * | , | ||
pi_kernel * | |||
) |
Definition at line 1366 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
pi_result piKernelGetGroupInfo | ( | pi_kernel | , |
pi_device | , | ||
pi_kernel_group_info | , | ||
size_t | , | ||
void * | , | ||
size_t * | |||
) |
Definition at line 1387 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
pi_result piKernelGetInfo | ( | pi_kernel | , |
pi_kernel_info | , | ||
size_t | , | ||
void * | , | ||
size_t * | |||
) |
Definition at line 1383 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
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.
kernel | is the pi_kernel to query |
device | is the device the kernel is executed on |
param_name | is a pi_kernel_sub_group_info enum value that specifies the informtation queried for. |
input_value_size | is the size of input value passed in ptr input_value param |
input_value | is the ptr to the input value passed. |
param_value_size | is the size of the value in bytes. |
param_value | is a pointer to the value to set. |
param_value_size_ret | is 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 1392 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
Definition at line 1400 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
Definition at line 1398 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
Definition at line 1370 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
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.
kernel | is the pi kernel to execute |
param_name | is a pi_kernel_exec_info value that specifies the info passed to the kernel |
param_value_size | is the size of the value in bytes |
param_value | is 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 2008 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
pi_result piMemBufferCreate | ( | pi_context | Context, |
pi_mem_flags | Flags, | ||
size_t | Size, | ||
void * | HostPtr, | ||
pi_mem * | RetMem, | ||
const pi_mem_properties * | properties | ||
) |
Definition at line 1023 of file pi_esimd_emulator.cpp.
References ARG_UNUSED, _pi_context::checkSurfaceArgument(), _pi_device::CmDevicePtr, _pi_context::Device, PI_MEM_FLAGS_ACCESS_RW, PI_MEM_FLAGS_HOST_PTR_COPY, PI_MEM_FLAGS_HOST_PTR_USE, PiESimdSurfaceMap, PiESimdSurfaceMapLock, PiTrace(), cm_surface_ptr_t::RegularBufPtr, cm_surface_ptr_t::tag, cm_surface_ptr_t::TypeRegularBuffer, cm_surface_ptr_t::TypeUserProvidedBuffer, and cm_surface_ptr_t::UPBufPtr.
pi_result piMemBufferPartition | ( | pi_mem | , |
pi_mem_flags | , | ||
pi_buffer_create_type | , | ||
void * | , | ||
pi_mem * | |||
) |
Definition at line 1807 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
pi_result piMemGetInfo | ( | pi_mem | , |
pi_mem_info | , | ||
size_t | , | ||
void * | , | ||
size_t * | |||
) |
Definition at line 1096 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
pi_result piMemImageCreate | ( | pi_context | Context, |
pi_mem_flags | Flags, | ||
const pi_image_format * | ImageFormat, | ||
const pi_image_desc * | ImageDesc, | ||
void * | HostPtr, | ||
pi_mem * | RetImage | ||
) |
Definition at line 1175 of file pi_esimd_emulator.cpp.
References CASE_PI_UNSUPPORTED, _pi_context::checkSurfaceArgument(), _pi_device::CmDevicePtr, ConvertPiImageFormatToCmFormat(), _pi_context::Device, _pi_image_format::image_channel_data_type, _pi_image_desc::image_height, _pi_image_desc::image_type, _pi_image_desc::image_width, PI_IMAGE_CHANNEL_TYPE_FLOAT, PI_IMAGE_CHANNEL_TYPE_HALF_FLOAT, PI_IMAGE_CHANNEL_TYPE_SIGNED_INT16, PI_IMAGE_CHANNEL_TYPE_SIGNED_INT32, PI_IMAGE_CHANNEL_TYPE_SIGNED_INT8, PI_IMAGE_CHANNEL_TYPE_SNORM_INT16, PI_IMAGE_CHANNEL_TYPE_SNORM_INT8, PI_IMAGE_CHANNEL_TYPE_UNORM_INT16, PI_IMAGE_CHANNEL_TYPE_UNORM_INT8, PI_IMAGE_CHANNEL_TYPE_UNORM_INT_101010, PI_IMAGE_CHANNEL_TYPE_UNORM_SHORT_555, PI_IMAGE_CHANNEL_TYPE_UNORM_SHORT_565, PI_IMAGE_CHANNEL_TYPE_UNSIGNED_INT16, PI_IMAGE_CHANNEL_TYPE_UNSIGNED_INT32, PI_IMAGE_CHANNEL_TYPE_UNSIGNED_INT8, PI_MEM_FLAGS_ACCESS_RW, PI_MEM_FLAGS_HOST_PTR_COPY, PI_MEM_FLAGS_HOST_PTR_USE, PI_MEM_TYPE_IMAGE1D, PI_MEM_TYPE_IMAGE1D_ARRAY, PI_MEM_TYPE_IMAGE1D_BUFFER, PI_MEM_TYPE_IMAGE2D, PI_MEM_TYPE_IMAGE2D_ARRAY, PI_MEM_TYPE_IMAGE3D, PiESimdSurfaceMap, PiESimdSurfaceMapLock, PiTrace(), cm_surface_ptr_t::RegularImgPtr, cm_surface_ptr_t::tag, cm_surface_ptr_t::TypeRegularImage, cm_surface_ptr_t::TypeUserProvidedImage, and cm_surface_ptr_t::UPImgPtr.
pi_result piMemImageGetInfo | ( | pi_mem | , |
pi_image_info | , | ||
size_t | , | ||
void * | , | ||
size_t * | |||
) |
Definition at line 1720 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
Definition at line 1108 of file pi_esimd_emulator.cpp.
References PiESimdSurfaceMap, PiESimdSurfaceMapLock, PiTrace(), and _pi_mem::SurfaceIndex.
Definition at line 1100 of file pi_esimd_emulator.cpp.
pi_result piPlatformGetInfo | ( | pi_platform | Platform, |
pi_platform_info | ParamName, | ||
size_t | ParamValueSize, | ||
void * | ParamValue, | ||
size_t * | ParamValueSizeRet | ||
) |
Definition at line 444 of file pi_esimd_emulator.cpp.
References _pi_platform::CmEmuVersion, sycl::_V1::detail::pi::die(), PI_PLATFORM_INFO_EXTENSIONS, PI_PLATFORM_INFO_NAME, PI_PLATFORM_INFO_PROFILE, PI_PLATFORM_INFO_VENDOR, and PI_PLATFORM_INFO_VERSION.
pi_result piPlatformsGet | ( | pi_uint32 | NumEntries, |
pi_platform * | Platforms, | ||
pi_uint32 * | NumPlatforms | ||
) |
Runtime queries number of Platforms
Definition at line 401 of file pi_esimd_emulator.cpp.
References _pi_platform::CmEmuVersion, PiPlatformCache, PiPlatformCacheLock, PiPlatformCachePopulated, PiTrace(), and PrintPiTrace.
pi_result piPluginGetLastError | ( | char ** | message | ) |
API to get Plugin specific warning and error messages.
message | is 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. |
device,and | syncronized host timestamp |
Definition at line 165 of file pi_esimd_emulator.cpp.
References ErrorMessage, and ErrorMessageCode.
Definition at line 2082 of file pi_esimd_emulator.cpp.
References _PI_H_VERSION_STRING, _PI_PLUGIN_VERSION_CHECK, ESIMDEmuPluginDataVersion, PiESimdDeviceAccess, _pi_plugin::PiVersion, _pi_plugin::PluginVersion, sycl::_V1::ext::intel::esimd::detail::SLM_BTI, and SupportedVersion.
pi_result piProgramBuild | ( | pi_program | , |
pi_uint32 | , | ||
const pi_device * | , | ||
const char * | , | ||
void(*)(pi_program, void *) | , | ||
void * | |||
) |
Definition at line 1343 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
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 1336 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
pi_result piProgramCreate | ( | pi_context | , |
const void * | , | ||
size_t | , | ||
pi_program * | |||
) |
Definition at line 1303 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
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.
context | is the PI context to associate the program with. |
num_devices | is the number of devices in device_list. |
device_list | is a pointer to a list of devices. These devices must all be in context. |
lengths | is an array of sizes in bytes of the binary in binaries. |
binaries | is a pointer to a list of program binaries. |
num_metadata_entries | is the number of metadata entries in metadata. |
metadata | is a pointer to a list of program metadata entries. The use of metadata entries is backend-defined. |
binary_status | returns 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_program | is the PI program created from the program binaries. |
Definition at line 1307 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
pi_result piProgramGetBuildInfo | ( | pi_program | , |
pi_device | , | ||
pi_program_build_info | , | ||
size_t | , | ||
void * | , | ||
size_t * | |||
) |
Definition at line 1348 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
pi_result piProgramGetInfo | ( | pi_program | , |
pi_program_info | , | ||
size_t | , | ||
void * | , | ||
size_t * | |||
) |
Definition at line 1325 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
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 1330 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
pi_result piProgramRelease | ( | pi_program | ) |
Definition at line 1355 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
pi_result piProgramRetain | ( | pi_program | ) |
Definition at line 1353 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
pi_result piQueueCreate | ( | pi_context | Context, |
pi_device | Device, | ||
pi_queue_properties | Properties, | ||
pi_queue * | Queue | ||
) |
Definition at line 946 of file pi_esimd_emulator.cpp.
References ARG_UNUSED, _pi_device::CmDevicePtr, _pi_context::Device, and PI_QUEUE_FLAG_OUT_OF_ORDER_EXEC_MODE_ENABLE.
Referenced by piextQueueCreate().
Definition at line 1000 of file pi_esimd_emulator.cpp.
References CONTINUE_NO_IMPLEMENTATION.
Definition at line 1007 of file pi_esimd_emulator.cpp.
References CONTINUE_NO_IMPLEMENTATION.
pi_result piQueueGetInfo | ( | pi_queue | , |
pi_queue_info | , | ||
size_t | , | ||
void * | , | ||
size_t * | |||
) |
Definition at line 974 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
Definition at line 986 of file pi_esimd_emulator.cpp.
References _pi_queue::CmQueuePtr.
Definition at line 978 of file pi_esimd_emulator.cpp.
pi_result piSamplerCreate | ( | pi_context | , |
const pi_sampler_properties * | , | ||
pi_sampler * | |||
) |
Definition at line 1517 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
pi_result piSamplerGetInfo | ( | pi_sampler | , |
pi_sampler_info | , | ||
size_t | , | ||
void * | , | ||
size_t * | |||
) |
Definition at line 1522 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
pi_result piSamplerRelease | ( | pi_sampler | ) |
Definition at line 1529 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
pi_result piSamplerRetain | ( | pi_sampler | ) |
Definition at line 1527 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
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.
PluginParameter | placeholder for future use, currenly not used. |
Definition at line 2059 of file pi_esimd_emulator.cpp.
References PiESimdDeviceAccess, and PiESimdSurfaceMap.
|
static |
Definition at line 116 of file pi_esimd_emulator.cpp.
References std::cout, and PrintPiTrace.
Referenced by _pi_context::checkSurfaceArgument(), piDevicesGet(), piEnqueueMemBufferMap(), piEnqueueMemBufferRead(), piEnqueueMemImageRead(), piEnqueueMemUnmap(), piEventGetProfilingInfo(), piextDeviceSelectBinary(), piGetDeviceAndHostTimer(), piMemBufferCreate(), piMemImageCreate(), piMemRelease(), piPlatformsGet(), and _pi_platform::populateDeviceCacheIfNeeded().
|
static |
Definition at line 157 of file pi_esimd_emulator.cpp.
References ErrorMessage, ErrorMessageCode, and MaxMessageSize.
Referenced by cuda_piContextGetInfo(), cuda_piDeviceGetInfo(), cuda_piEnqueueKernelLaunch(), cuda_piextKernelSetArgMemObj(), cuda_piextUSMEnqueueMemAdvise(), cuda_piextUSMEnqueuePrefetch(), hip_piContextGetInfo(), hip_piDeviceGetInfo(), hip_piEnqueueKernelLaunch(), piContextGetInfo(), piextEnqueueDeviceGlobalVariableRead(), piextEnqueueDeviceGlobalVariableWrite(), and urDeviceGetInfo().
void sycl_get_cm_buffer_params | ( | unsigned int | IndexInput, |
char ** | BaseAddr, | ||
uint32_t * | Width, | ||
std::mutex ** | BufMtxLock | ||
) |
Definition at line 281 of file pi_esimd_emulator.cpp.
References _pi_buffer::MapHostPtr, PiESimdSurfaceMap, PiESimdSurfaceMapLock, _pi_buffer::Size, and _pi_mem::SurfaceLock.
void sycl_get_cm_image_params | ( | unsigned int | IndexInput, |
char ** | BaseAddr, | ||
uint32_t * | Width, | ||
uint32_t * | Height, | ||
uint32_t * | Bpp, | ||
std::mutex ** | ImgMtxLock | ||
) |
Definition at line 298 of file pi_esimd_emulator.cpp.
References _pi_image::BytesPerPixel, _pi_image::Height, _pi_mem::MapHostPtr, PiESimdSurfaceMap, PiESimdSurfaceMapLock, _pi_mem::SurfaceLock, and _pi_image::Width.
unsigned int sycl_get_cm_surface_index | ( | void * | PtrInput | ) |
Definition at line 273 of file pi_esimd_emulator.cpp.
References _pi_mem::SurfaceIndex.
thread_local char ErrorMessage[MaxMessageSize] |
Definition at line 154 of file pi_esimd_emulator.cpp.
Referenced by piPluginGetLastError(), piProgramLink(), and setErrorMessage().
thread_local pi_result ErrorMessageCode = PI_SUCCESS |
Definition at line 153 of file pi_esimd_emulator.cpp.
Referenced by piPluginGetLastError(), and setErrorMessage().
|
static |
Definition at line 149 of file pi_esimd_emulator.cpp.
Referenced by piDeviceGetInfo().
|
constexpr |
Definition at line 152 of file pi_esimd_emulator.cpp.
Referenced by setErrorMessage().
|
static |
Definition at line 127 of file pi_esimd_emulator.cpp.
Referenced by piextPluginGetOpaqueData(), piPluginInit(), and piTearDown().
|
static |
Definition at line 135 of file pi_esimd_emulator.cpp.
Referenced by piMemBufferCreate(), piMemImageCreate(), piMemRelease(), piTearDown(), sycl_get_cm_buffer_params(), and sycl_get_cm_image_params().
|
static |
Definition at line 138 of file pi_esimd_emulator.cpp.
Referenced by piMemBufferCreate(), piMemImageCreate(), piMemRelease(), sycl_get_cm_buffer_params(), and sycl_get_cm_image_params().
|
static |
Definition at line 130 of file pi_esimd_emulator.cpp.
Referenced by piPlatformsGet().
|
static |
Definition at line 132 of file pi_esimd_emulator.cpp.
Referenced by piPlatformsGet().
|
static |
Definition at line 114 of file pi_esimd_emulator.cpp.
Referenced by piPlatformsGet(), and PiTrace().
const char SupportedVersion[] = _PI_ESIMD_PLUGIN_VERSION_STRING |
Definition at line 2080 of file pi_esimd_emulator.cpp.
Referenced by piPluginInit().