Files
leleka/crates/cpu-kernels/src/lib.rs
T

19 lines
694 B
Rust

//! Run-time ISA dispatch for the Leleka CPU runtime's kernels (no `unsafe` here).
//!
//! One binary serves every x86-64 CPU: [`Dispatch::best`] picks the highest level the CPU and OS
//! support, and the `LELEKA_CPU_ISA` environment variable can force a lower one (see
//! [`Dispatch::from_env`]). The chosen level is reported by [`Dispatch::isa`] so status endpoints
//! and benchmark records can state which kernels actually ran.
use std::fmt;
pub use leleka_cpu_sys::{AttnShape, KernelError, MAX_DOT_LEN, MULTI_MAX, Q8rRef, ScoreSpec};
#[cfg(test)]
mod tests;
mod isa;
pub use isa::{DispatchError, ISA_ENV, Isa};
mod dispatch;
pub use dispatch::{Dispatch, RowsShape, SwigluOaiParams};