1pub mod backend;
16pub mod buffer_pool;
17pub mod config;
18pub mod cpu;
19pub mod error;
20#[cfg(feature = "provider-inject")]
21pub mod inject;
22mod typed_linalg;
23pub mod types;
24pub mod validate;
25
26#[cfg(feature = "cuda")]
27pub mod cuda;
28
29#[cfg(feature = "rocm")]
30pub mod rocm;
31
32#[cfg(feature = "cubecl")]
33pub mod cubecl;
34
35pub use backend::{
36 default_exec_session, ElementwiseFusionInst, ElementwiseFusionOp, ElementwiseFusionPlan,
37 SemiringBackend, TensorBackend, TensorExec,
38};
39pub use config::*;
40pub use error::*;
41pub use types::*;
42
43#[cfg(not(any(feature = "cpu-faer", feature = "cpu-blas")))]
44compile_error!("enable at least one CPU backend: cpu-faer or cpu-blas");
45
46#[cfg(all(feature = "cpu-faer", feature = "cpu-blas"))]
47compile_error!("enable exactly one CPU backend: cpu-faer or cpu-blas");
48
49#[cfg(all(feature = "provider-inject", not(feature = "cpu-blas")))]
50compile_error!("provider-inject requires cpu-blas");
51
52#[cfg(feature = "provider-src")]
53extern crate blas_src as _;
54#[cfg(feature = "provider-inject")]
55extern crate cblas_inject as _;
56#[cfg(feature = "provider-src")]
57extern crate cblas_src as _;
58#[cfg(feature = "provider-src")]
59extern crate lapack_src as _;
60
61#[cfg(test)]
62mod tests;