ruxla_transforms/lib.rs
1//! Transformations of the IR: `vmap`, `jvp`, partial evaluation,
2//! transposition, `vjp`, and `grad`.
3//!
4//! [`vmap`] batches a function with each primitive's batching rule. [`jvp`]
5//! differentiates in forward mode with each primitive's JVP rule; [`vjp`]
6//! linearizes ([`jvp`] and [`partial_eval`]) and [`transpose`]s the linear
7//! part, as JAX does; [`value_and_grad`] builds a gradient function.
8
9mod ad;
10mod batching;
11
12pub use ad::{PartialEval, Vjp, jvp, partial_eval, transpose, value_and_grad, vjp};
13pub use batching::{vmap, vmap_with_out_axes};