#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>
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 > &)> |
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 46 of file pi_esimd_emulator.cpp.
#define CASE_PI_UNSUPPORTED | ( | not_supported | ) |
Definition at line 390 of file pi_esimd_emulator.cpp.
#define CONTINUE_NO_IMPLEMENTATION |
Definition at line 382 of file pi_esimd_emulator.cpp.
#define DIE_NO_IMPLEMENTATION |
Definition at line 374 of file pi_esimd_emulator.cpp.
#define ESIMDEmuPluginDataVersion 0 |
Definition at line 141 of file pi_esimd_emulator.cpp.
#define ESIMDEmuPluginInterfaceVersion 1 |
Definition at line 145 of file pi_esimd_emulator.cpp.
using IDBuilder = sycl::detail::Builder |
Definition at line 169 of file pi_esimd_emulator.cpp.
using KernelFunc = std::function<void(const sycl::nd_item<NDims> &)> |
Definition at line 172 of file pi_esimd_emulator.cpp.
cm_support::CM_SURFACE_FORMAT ConvertPiImageFormatToCmFormat | ( | const pi_image_format * | PiFormat | ) |
Definition at line 1128 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 210 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 340 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 1291 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 1297 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 858 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 888 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 878 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 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.
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.
Definition at line 581 of file pi_esimd_emulator.cpp.
References Device.
Definition at line 571 of file pi_esimd_emulator.cpp.
References Device.
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().
Definition at line 1476 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
Definition at line 1481 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 1758 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 1566 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 1572 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 1580 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 1586 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 1486 of file pi_esimd_emulator.cpp.
References ARG_UNUSED, _pi_buffer::MapHostPtr, cl::sycl::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 1544 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 1552 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 1558 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 1740 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 1746 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 1669 of file pi_esimd_emulator.cpp.
References ARG_UNUSED, pi_image_region_struct::height, _pi_mem::MapHostPtr, cl::sycl::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 1734 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 1629 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 1828 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
pi_result piEventCreate | ( | pi_context | , |
pi_event * | |||
) |
Definition at line 1379 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
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.
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().
Definition at line 1433 of file pi_esimd_emulator.cpp.
References _pi_event::CmEventPtr, _pi_event::IsDummyEvent, and _pi_event::OwnerQueue.
Definition at line 1423 of file pi_esimd_emulator.cpp.
Definition at line 1416 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
Definition at line 1421 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
Definition at line 1398 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 872 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 868 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
pi_result piextContextSetExtendedDeleter | ( | pi_context | , |
pi_context_extended_deleter | , | ||
void * | |||
) |
Definition at line 863 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 822 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 818 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 1946 of file pi_esimd_emulator.cpp.
References PiTrace().
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 1458 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 1454 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 1834 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 1819 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 1824 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
Definition at line 1351 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 1912 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
pi_result piextKernelSetArgSampler | ( | pi_kernel | , |
pi_uint32 | , | ||
const pi_sampler * | |||
) |
Definition at line 1356 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 1275 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 1271 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 479 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 475 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
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.
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.
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 1338 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 1334 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 1941 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
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 995 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 991 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 1844 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 1926 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 1921 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 1916 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 1958 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 1888 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 1931 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 1839 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 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().
pi_result piKernelCreate | ( | pi_program | , |
const char * | , | ||
pi_kernel * | |||
) |
Definition at line 1343 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 1364 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 1360 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 1369 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
Definition at line 1377 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
Definition at line 1375 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
Definition at line 1347 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 1936 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 1000 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 1752 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 1073 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 1152 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 1665 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
Definition at line 1085 of file pi_esimd_emulator.cpp.
References PiESimdSurfaceMap, PiESimdSurfaceMapLock, PiTrace(), and _pi_mem::SurfaceIndex.
Definition at line 1077 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 443 of file pi_esimd_emulator.cpp.
References _pi_platform::CmEmuVersion, cl::sycl::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 400 of file pi_esimd_emulator.cpp.
References _pi_platform::CmEmuVersion, PiPlatformCache, PiPlatformCacheLock, PiPlatformCachePopulated, PiTrace(), and PrintPiTrace.
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. |
Definition at line 164 of file pi_esimd_emulator.cpp.
References ErrorMessage, and ErrorMessageCode.
Definition at line 1986 of file pi_esimd_emulator.cpp.
References _PI_H_VERSION_STRING, _PI_PLUGIN_VERSION_CHECK, ESIMDEmuPluginDataVersion, PiESimdDeviceAccess, _pi_plugin::PiVersion, _pi_plugin::PluginVersion, cl::sycl::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 1320 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 1313 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
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.
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 1284 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 1325 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 1302 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 1307 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
pi_result piProgramRelease | ( | pi_program | ) |
Definition at line 1332 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
pi_result piProgramRetain | ( | pi_program | ) |
Definition at line 1330 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 923 of file pi_esimd_emulator.cpp.
References ARG_UNUSED, _pi_device::CmDevicePtr, Device, _pi_context::Device, and PI_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE.
Definition at line 977 of file pi_esimd_emulator.cpp.
References CONTINUE_NO_IMPLEMENTATION.
Definition at line 984 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 951 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
Definition at line 963 of file pi_esimd_emulator.cpp.
References _pi_queue::CmQueuePtr.
Definition at line 955 of file pi_esimd_emulator.cpp.
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.
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.
pi_result piSamplerRelease | ( | pi_sampler | ) |
Definition at line 1474 of file pi_esimd_emulator.cpp.
References DIE_NO_IMPLEMENTATION.
pi_result piSamplerRetain | ( | pi_sampler | ) |
Definition at line 1472 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 1969 of file pi_esimd_emulator.cpp.
References PiESimdDeviceAccess, and PiESimdSurfaceMap.
|
static |
Definition at line 115 of file pi_esimd_emulator.cpp.
References PrintPiTrace.
Referenced by _pi_context::checkSurfaceArgument(), piDevicesGet(), piEnqueueMemBufferMap(), piEnqueueMemBufferRead(), piEnqueueMemImageRead(), piEnqueueMemUnmap(), piEventGetProfilingInfo(), piextDeviceSelectBinary(), piMemBufferCreate(), piMemImageCreate(), piMemRelease(), piPlatformsGet(), and _pi_platform::populateDeviceCacheIfNeeded().
Definition at line 156 of file pi_esimd_emulator.cpp.
References ErrorMessage, ErrorMessageCode, and MaxMessageSize.
Referenced by cuda_piEnqueueKernelLaunch(), cuda_piextUSMEnqueueMemAdvise(), and cuda_piextUSMEnqueuePrefetch().
void sycl_get_cm_buffer_params | ( | unsigned int | IndexInput, |
char ** | BaseAddr, | ||
uint32_t * | Width, | ||
std::mutex ** | BufMtxLock | ||
) |
Definition at line 280 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 297 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 272 of file pi_esimd_emulator.cpp.
References _pi_mem::SurfaceIndex.
thread_local char ErrorMessage[MaxMessageSize] |
Definition at line 153 of file pi_esimd_emulator.cpp.
Referenced by piPluginGetLastError(), and setErrorMessage().
thread_local pi_result ErrorMessageCode = PI_SUCCESS |
Definition at line 152 of file pi_esimd_emulator.cpp.
Referenced by piPluginGetLastError(), and setErrorMessage().
|
static |
Definition at line 148 of file pi_esimd_emulator.cpp.
Referenced by piDeviceGetInfo().
|
constexpr |
Definition at line 151 of file pi_esimd_emulator.cpp.
Referenced by setErrorMessage().
|
static |
Definition at line 126 of file pi_esimd_emulator.cpp.
Referenced by piextPluginGetOpaqueData(), piPluginInit(), and piTearDown().
|
static |
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().
|
static |
Definition at line 137 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 129 of file pi_esimd_emulator.cpp.
Referenced by piPlatformsGet().
|
static |
Definition at line 131 of file pi_esimd_emulator.cpp.
Referenced by piPlatformsGet().
|
static |
Definition at line 113 of file pi_esimd_emulator.cpp.
Referenced by _pi_queue::executeCommandList(), piPlatformsGet(), and PiTrace().
const char SupportedVersion[] = _PI_ESIMD_PLUGIN_VERSION_STRING |
Definition at line 1984 of file pi_esimd_emulator.cpp.
Referenced by piPluginInit().