Expand description
Hand-rolled Level Zero (ze_*) FFI, dynamically loaded with libloading.
Only the subset RLX needs is bound: init + driver/device enumeration and
properties (for availability + device name), context/queue/command-list
lifecycle, USM-shared allocation, and SPIR-V module → kernel → launch. The
loader (libze_loader) is opened at runtime, so the crate links and builds
on hosts with no oneAPI runtime (macOS, CI) — Lib::load simply returns
Err there and the whole backend reports itself unavailable.
⚠️ The ZE_STRUCTURE_TYPE_* enum values and descriptor field layouts are
transcribed from ze_api.h (Level Zero spec v1.x). They are exercised only
on real Intel hardware (Arc / Data Center Max) during bring-up; verify them
against the installed loader version there. Nothing in this module runs on
the macOS dev box — the backend falls through to the CPU reference path.
Structs§
- Command
List Desc - Command
Queue Desc - Context
Desc - Device
MemAlloc Desc - Device
Properties - Device
Uuid - Group
Count - Host
MemAlloc Desc - Kernel
Desc - Lib
- Resolved Level Zero entry points. Keeps the loaded
Libraryalive so the copied function pointers stay valid for the process lifetime. - Module
Desc
Constants§
- ZE_
COMMAND_ QUEUE_ MODE_ DEFAULT ze_command_queue_mode_t: DEFAULT = 0.- ZE_
COMMAND_ QUEUE_ MODE_ SYNCHRONOUS ze_command_queue_mode_t: SYNCHRONOUS = 1 (execute blocks until complete).- ZE_
DEVICE_ TYPE_ GPU ze_device_type_t: GPU = 1.- ZE_
MAX_ DEVICE_ NAME - ZE_
MAX_ DEVICE_ UUID_ SIZE - ZE_
MODULE_ FORMAT_ IL_ SPIRV ze_module_format_t: IL_SPIRV = 0.- ZE_
RESULT_ SUCCESS - ZE_
STRUCTURE_ TYPE_ COMMAND_ LIST_ DESC - ZE_
STRUCTURE_ TYPE_ COMMAND_ QUEUE_ DESC - ZE_
STRUCTURE_ TYPE_ CONTEXT_ DESC - ZE_
STRUCTURE_ TYPE_ DEVICE_ MEM_ ALLOC_ DESC - ZE_
STRUCTURE_ TYPE_ DEVICE_ PROPERTIES - ZE_
STRUCTURE_ TYPE_ HOST_ MEM_ ALLOC_ DESC - ZE_
STRUCTURE_ TYPE_ KERNEL_ DESC - ZE_
STRUCTURE_ TYPE_ MODULE_ DESC