|
MLIR 24.0.0git
|
#include "level_zero/ze_api.h"#include <cassert>#include <cstring>#include <deque>#include <exception>#include <functional>#include <iostream>#include <limits>#include <memory>#include <stdexcept>#include <string>#include <unordered_map>#include <vector>Go to the source code of this file.
Classes | |
| struct | ZeContextDeleter |
| struct | ZeCommandListDeleter |
| struct | L0RTContextWrapper |
| struct | ZeEventDeleter |
| struct | ZeEventPoolDeleter |
| struct | DynamicEventPool |
| struct | StreamWrapper |
Macros | |
| #define | MLIR_LEVELZERO_WRAPPERS_EXPORT __attribute__((visibility("default"))) |
| #define | L0_SAFE_CALL(call) |
Typedefs | |
| using | UniqueZeContext |
| using | UniqueZeCommandList |
| using | UniqueZeEvent |
| using | UniqueZeEventPool |
| #define L0_SAFE_CALL | ( | call | ) |
Definition at line 47 of file LevelZeroRuntimeWrappers.cpp.
Referenced by DynamicEventPool::createNewPool(), getContext(), getDevice(), getDriver(), L0RTContextWrapper::L0RTContextWrapper(), loadModule(), mgpuEventRecord(), mgpuEventSynchronize(), mgpuLaunchKernel(), mgpuMemAlloc(), mgpuMemcpy(), mgpuMemFree(), mgpuMemset(), mgpuModuleGetFunction(), mgpuModuleUnload(), ZeCommandListDeleter::operator()(), ZeContextDeleter::operator()(), ZeEventDeleter::operator()(), ZeEventPoolDeleter::operator()(), DynamicEventPool::releaseEvent(), StreamWrapper::sync(), and DynamicEventPool::takeEvent().
| #define MLIR_LEVELZERO_WRAPPERS_EXPORT __attribute__((visibility("default"))) |
Definition at line 30 of file LevelZeroRuntimeWrappers.cpp.
Referenced by mgpuEventCreate(), and mgpuStreamCreate().
| using UniqueZeCommandList |
Definition at line 153 of file LevelZeroRuntimeWrappers.cpp.
| using UniqueZeContext |
Definition at line 150 of file LevelZeroRuntimeWrappers.cpp.
| using UniqueZeEvent |
Definition at line 251 of file LevelZeroRuntimeWrappers.cpp.
| using UniqueZeEventPool |
Definition at line 254 of file LevelZeroRuntimeWrappers.cpp.
|
static |
Definition at line 122 of file LevelZeroRuntimeWrappers.cpp.
References L0_SAFE_CALL.
|
static |
Definition at line 99 of file LevelZeroRuntimeWrappers.cpp.
References getDriver(), and L0_SAFE_CALL.
Referenced by L0RTContextWrapper::L0RTContextWrapper().
|
static |
Definition at line 76 of file LevelZeroRuntimeWrappers.cpp.
References L0_SAFE_CALL.
Referenced by getDevice(), and L0RTContextWrapper::L0RTContextWrapper().
|
static |
Definition at line 353 of file LevelZeroRuntimeWrappers.cpp.
References getRtContext().
Referenced by mgpuEventCreate(), mgpuEventDestroy(), mgpuSetDefaultDevice(), and mgpuStreamCreate().
|
static |
Definition at line 348 of file LevelZeroRuntimeWrappers.cpp.
Referenced by getDynamicEventPool(), loadModule(), mgpuEventRecord(), mgpuLaunchKernel(), mgpuMemAlloc(), mgpuMemcpy(), mgpuMemFree(), mgpuMemset(), mgpuSetDefaultDevice(), and zeDriverGetLastErrorDescriptionWrapper().
|
static |
Definition at line 406 of file LevelZeroRuntimeWrappers.cpp.
References L0RTContextWrapper::context, L0RTContextWrapper::device, getRtContext(), L0_SAFE_CALL, and result.
Referenced by mgpuModuleLoad(), and mgpuModuleLoadJIT().
| MLIR_LEVELZERO_WRAPPERS_EXPORT ze_event_handle_t mgpuEventCreate | ( | ) |
Definition at line 457 of file LevelZeroRuntimeWrappers.cpp.
References getDynamicEventPool(), MLIR_LEVELZERO_WRAPPERS_EXPORT, and DynamicEventPool::takeEvent().
| MLIR_LEVELZERO_WRAPPERS_EXPORT void mgpuEventDestroy | ( | ze_event_handle_t | event | ) |
Definition at line 462 of file LevelZeroRuntimeWrappers.cpp.
References getDynamicEventPool(), and DynamicEventPool::releaseEvent().
| MLIR_LEVELZERO_WRAPPERS_EXPORT void mgpuEventRecord | ( | ze_event_handle_t | event, |
| StreamWrapper * | stream ) |
Definition at line 474 of file LevelZeroRuntimeWrappers.cpp.
References getRtContext(), L0RTContextWrapper::immCmdListCompute, L0RTContextWrapper::immCmdListCopy, and L0_SAFE_CALL.
| MLIR_LEVELZERO_WRAPPERS_EXPORT void mgpuEventSynchronize | ( | ze_event_handle_t | event | ) |
Definition at line 467 of file LevelZeroRuntimeWrappers.cpp.
References L0_SAFE_CALL.
| MLIR_LEVELZERO_WRAPPERS_EXPORT void mgpuLaunchKernel | ( | ze_kernel_handle_t | kernel, |
| size_t | gridX, | ||
| size_t | gridY, | ||
| size_t | gridZ, | ||
| size_t | blockX, | ||
| size_t | blockY, | ||
| size_t | blockZ, | ||
| int32_t | sharedMemBytes, | ||
| StreamWrapper * | stream, | ||
| void ** | params, | ||
| void ** | , | ||
| size_t | paramsCount ) |
Definition at line 583 of file LevelZeroRuntimeWrappers.cpp.
References StreamWrapper::enqueueOp(), getRtContext(), L0RTContextWrapper::immCmdListCompute, and L0_SAFE_CALL.
| MLIR_LEVELZERO_WRAPPERS_EXPORT void * mgpuMemAlloc | ( | uint64_t | size, |
| StreamWrapper * | stream, | ||
| bool | isShared ) |
Definition at line 482 of file LevelZeroRuntimeWrappers.cpp.
References L0RTContextWrapper::context, L0RTContextWrapper::device, getRtContext(), and L0_SAFE_CALL.
| MLIR_LEVELZERO_WRAPPERS_EXPORT void mgpuMemcpy | ( | void * | dst, |
| void * | src, | ||
| size_t | sizeBytes, | ||
| StreamWrapper * | stream ) |
Definition at line 513 of file LevelZeroRuntimeWrappers.cpp.
References StreamWrapper::enqueueOp(), getRtContext(), L0RTContextWrapper::immCmdListCopy, and L0_SAFE_CALL.
| MLIR_LEVELZERO_WRAPPERS_EXPORT void mgpuMemFree | ( | void * | ptr, |
| StreamWrapper * | stream ) |
Definition at line 506 of file LevelZeroRuntimeWrappers.cpp.
References L0RTContextWrapper::context, getRtContext(), L0_SAFE_CALL, and StreamWrapper::sync().
|
static |
Definition at line 523 of file LevelZeroRuntimeWrappers.cpp.
References L0RTContextWrapper::copyEngineMaxMemoryFillPatternSize, StreamWrapper::enqueueOp(), getRtContext(), L0RTContextWrapper::immCmdListCompute, L0RTContextWrapper::immCmdListCopy, and L0_SAFE_CALL.
Referenced by mgpuMemset16(), and mgpuMemset32().
| MLIR_LEVELZERO_WRAPPERS_EXPORT void mgpuMemset16 | ( | void * | dst, |
| unsigned short | value, | ||
| size_t | count, | ||
| StreamWrapper * | stream ) |
Definition at line 544 of file LevelZeroRuntimeWrappers.cpp.
References mgpuMemset().
| MLIR_LEVELZERO_WRAPPERS_EXPORT void mgpuMemset32 | ( | void * | dst, |
| unsigned int | value, | ||
| size_t | count, | ||
| StreamWrapper * | stream ) |
Definition at line 538 of file LevelZeroRuntimeWrappers.cpp.
References mgpuMemset().
| MLIR_LEVELZERO_WRAPPERS_EXPORT ze_kernel_handle_t mgpuModuleGetFunction | ( | ze_module_handle_t | module, |
| const char * | name ) |
Definition at line 573 of file LevelZeroRuntimeWrappers.cpp.
References L0_SAFE_CALL.
| MLIR_LEVELZERO_WRAPPERS_EXPORT ze_module_handle_t mgpuModuleLoad | ( | const void * | data, |
| size_t | gpuBlobSize ) |
Definition at line 550 of file LevelZeroRuntimeWrappers.cpp.
References loadModule().
| MLIR_LEVELZERO_WRAPPERS_EXPORT ze_module_handle_t mgpuModuleLoadJIT | ( | void * | data, |
| int | optLevel, | ||
| size_t | assemblySize ) |
Definition at line 555 of file LevelZeroRuntimeWrappers.cpp.
References loadModule().
| MLIR_LEVELZERO_WRAPPERS_EXPORT void mgpuModuleUnload | ( | ze_module_handle_t | module | ) |
Definition at line 610 of file LevelZeroRuntimeWrappers.cpp.
References L0_SAFE_CALL.
| MLIR_LEVELZERO_WRAPPERS_EXPORT void mgpuSetDefaultDevice | ( | int32_t | devIdx | ) |
Definition at line 615 of file LevelZeroRuntimeWrappers.cpp.
References getDynamicEventPool(), getRtContext(), and L0RTContextWrapper::L0RTContextWrapper().
| MLIR_LEVELZERO_WRAPPERS_EXPORT StreamWrapper * mgpuStreamCreate | ( | ) |
Definition at line 435 of file LevelZeroRuntimeWrappers.cpp.
References getDynamicEventPool(), and MLIR_LEVELZERO_WRAPPERS_EXPORT.
| MLIR_LEVELZERO_WRAPPERS_EXPORT void mgpuStreamDestroy | ( | StreamWrapper * | stream | ) |
Definition at line 446 of file LevelZeroRuntimeWrappers.cpp.
| MLIR_LEVELZERO_WRAPPERS_EXPORT void mgpuStreamSynchronize | ( | StreamWrapper * | stream | ) |
Definition at line 440 of file LevelZeroRuntimeWrappers.cpp.
References StreamWrapper::sync().
| MLIR_LEVELZERO_WRAPPERS_EXPORT void mgpuStreamWaitEvent | ( | StreamWrapper * | stream, |
| ze_event_handle_t | event ) |
Definition at line 451 of file LevelZeroRuntimeWrappers.cpp.
References StreamWrapper::sync().
|
static |
Definition at line 359 of file LevelZeroRuntimeWrappers.cpp.
References L0RTContextWrapper::driver, and getRtContext().