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#![warn(missing_docs)]
15#![allow(clippy::missing_safety_doc)]
16
17pub mod backend;
18pub mod compute;
19pub mod drv;
20
21pub use backend::{LevelZeroBackend, LEVELZERO_BACKEND};
22pub use compute::{Context, DeviceBuffer, Kernel, Module, Pipeline};
23
24/// Registers the Level Zero backend with `reg`.
25pub fn register(reg: &mut ironaccelerator_core::BackendRegistry) {
26 reg.register(&LEVELZERO_BACKEND);
27}