Skip to main content

ironaccelerator_levelzero/
lib.rs

1//! # `ironaccelerator-levelzero`
2//!
3//! Intel accelerator backend via **oneAPI Level Zero**. Level Zero is the
4//! lowest-level user-mode Intel compute API — it sits below SYCL /
5//! OpenCL / oneDNN and exposes GPUs (Arc, Flex, Ponte Vecchio, Battlemage)
6//! and NPUs (Meteor / Arrow / Lunar Lake VPU) through a single device
7//! enumeration and command-queue model.
8//!
9//! We dynamically load `ze_loader` (`libze_loader.so.1` / `ze_loader.dll`),
10//! call `zeInit`, then walk drivers → devices and expose each as a
11//! `DeviceDescriptor`. `ze_device_type_t` distinguishes `GPU` and `VPU`
12//! (NPU) so a single backend instance can surface both.
13
14#![allow(clippy::missing_safety_doc)]
15
16pub mod backend;
17pub mod compute;
18pub mod drv;
19
20pub use backend::{LevelZeroBackend, LEVELZERO_BACKEND};
21
22pub fn register(reg: &mut ironaccelerator_core::BackendRegistry) {
23    reg.register(&LEVELZERO_BACKEND);
24}