Skip to main content

ruxla_ir/
lib.rs

1//! The intermediate representation (IR) of ruxla: a static SSA form like
2//! JAX's jaxpr, with typed abstract values.
3//!
4//! # Examples
5//!
6//! ```
7//! use ruxla_ir::{AVal, DType, Function, Var};
8//!
9//! let x = Var::new(AVal::new([2], DType::F32));
10//! let f = Function { invars: vec![x.clone()], outvars: vec![x.into()], ..Function::default() };
11//! f.check().unwrap();
12//! assert_eq!(f.to_string(), "{ lambda ; a:f32[2]. let\n  in (a,) }");
13//! ```
14
15pub mod ad;
16pub mod batching;
17pub mod callback;
18mod error;
19mod function;
20mod host;
21pub mod lowering;
22mod primitive;
23mod print;
24pub mod serialize;
25mod shape;
26
27pub use error::{Error, Result};
28pub use function::{
29    Atom, EighImplementation, Eqn, Function, Literal, Params, Precision, RoundingMethod,
30    SelectPrim, SrcLoc, SvdAlgorithm, Var,
31};
32pub use host::HostArray;
33pub use primitive::{EvalCx, Prim, Primitive};
34pub use ruxla_kernels::array::{DotDims, GatherDims, GatherScatterMode, ScatterDims};
35pub use ruxla_kernels::fft::FftType;
36pub use ruxla_kernels::window::ConvDims;
37pub use ruxla_kernels::{DType, DTypeKind, Element, Value};
38pub use shape::{AVal, Shape};