MLIR: lib/ExecutionEngine/SyclRuntimeWrappers.cpp File Reference (original) (raw)
#include <level_zero/ze_api.h>
#include <sycl/ext/oneapi/backend/level_zero.hpp>
#include <sycl/sycl.hpp>
Go to the source code of this file.
Functions | |
---|---|
static sycl::device | getDefaultDevice () |
static sycl::context | getDefaultContext () |
static void * | allocDeviceMemory (sycl::queue *queue, size_t size, bool isShared) |
static void | deallocDeviceMemory (sycl::queue *queue, void *ptr) |
static ze_module_handle_t | loadModule (const void *data, size_t dataSize) |
static sycl::kernel * | getKernel (ze_module_handle_t zeModule, const char *name) |
static void | launchKernel (sycl::queue *queue, sycl::kernel *kernel, size_t gridX, size_t gridY, size_t gridZ, size_t blockX, size_t blockY, size_t blockZ, size_t sharedMemBytes, void **params, size_t paramsCount) |
SYCL_RUNTIME_EXPORT sycl::queue * | mgpuStreamCreate () |
SYCL_RUNTIME_EXPORT void | mgpuStreamDestroy (sycl::queue *queue) |
SYCL_RUNTIME_EXPORT void * | mgpuMemAlloc (uint64_t size, sycl::queue *queue, bool isShared) |
SYCL_RUNTIME_EXPORT void | mgpuMemFree (void *ptr, sycl::queue *queue) |
SYCL_RUNTIME_EXPORT ze_module_handle_t | mgpuModuleLoad (const void *data, size_t gpuBlobSize) |
SYCL_RUNTIME_EXPORT sycl::kernel * | mgpuModuleGetFunction (ze_module_handle_t module, const char *name) |
SYCL_RUNTIME_EXPORT void | mgpuLaunchKernel (sycl::kernel *kernel, size_t gridX, size_t gridY, size_t gridZ, size_t blockX, size_t blockY, size_t blockZ, size_t sharedMemBytes, sycl::queue *queue, void **params, void **, size_t paramsCount) |
SYCL_RUNTIME_EXPORT void | mgpuStreamSynchronize (sycl::queue *queue) |
SYCL_RUNTIME_EXPORT void | mgpuModuleUnload (ze_module_handle_t module) |
SYCL_RUNTIME_EXPORT void | mgpuMemcpy (void *dst, void *src, size_t sizeBytes, sycl::queue *queue) |
◆ L0_SAFE_CALL
| #define L0_SAFE_CALL | ( | | call | ) | | ---------------------- | - | | ---- | - |
Value:
{ \
ze_result_t status = (call); \
if (status != ZE_RESULT_SUCCESS) { \
fprintf(stdout, "L0 error %d\n", status); \
fflush(stdout); \
abort(); \
} \
}
Definition at line 40 of file SyclRuntimeWrappers.cpp.
◆ SYCL_RUNTIME_EXPORT
#define SYCL_RUNTIME_EXPORT
◆ allocDeviceMemory()
static void* allocDeviceMemory ( sycl::queue * queue, size_t size, bool isShared ) | static |
---|
◆ deallocDeviceMemory()
static void deallocDeviceMemory ( sycl::queue * queue, void * ptr ) | static |
---|
◆ getDefaultContext()
static sycl::context getDefaultContext ( ) | static |
---|
◆ getDefaultDevice()
static sycl::device getDefaultDevice ( ) | static |
---|
◆ getKernel()
static sycl::kernel* getKernel ( ze_module_handle_t zeModule, const char * name ) | static |
---|
◆ launchKernel()
static void launchKernel ( sycl::queue * queue, sycl::kernel * kernel, size_t gridX, size_t gridY, size_t gridZ, size_t blockX, size_t blockY, size_t blockZ, size_t sharedMemBytes, void ** params, size_t paramsCount ) | static |
---|
◆ loadModule()
static ze_module_handle_t loadModule ( const void * data, size_t dataSize ) | static |
---|
◆ mgpuLaunchKernel()
SYCL_RUNTIME_EXPORT void mgpuLaunchKernel | ( | sycl::kernel * | kernel, |
---|---|---|---|
size_t | gridX, | ||
size_t | gridY, | ||
size_t | gridZ, | ||
size_t | blockX, | ||
size_t | blockY, | ||
size_t | blockZ, | ||
size_t | sharedMemBytes, | ||
sycl::queue * | queue, | ||
void ** | params, | ||
void ** | , | ||
size_t | paramsCount | ||
) |
◆ mgpuMemAlloc()
◆ mgpuMemcpy()
SYCL_RUNTIME_EXPORT void mgpuMemcpy | ( | void * | dst, |
---|---|---|---|
void * | src, | ||
size_t | sizeBytes, | ||
sycl::queue * | queue | ||
) |
◆ mgpuMemFree()
◆ mgpuModuleGetFunction()
SYCL_RUNTIME_EXPORT sycl::kernel* mgpuModuleGetFunction | ( | ze_module_handle_t | module, |
---|---|---|---|
const char * | name | ||
) |
◆ mgpuModuleLoad()
SYCL_RUNTIME_EXPORT ze_module_handle_t mgpuModuleLoad | ( | const void * | data, |
---|---|---|---|
size_t | gpuBlobSize | ||
) |