Expand description
The oxmera tensor: shared storage viewed through a layout, with multi-device backends and reverse-mode autograd.
This crate is the hub of the framework:
Tensor— the value type: constructors, zero-copy strided views, element access, and the full differentiable op surface (add,matmul,softmax, …) plusstd::opsoperator sugar.einsum— Einstein-summation contractions lowered ontomatmul,permuteandsum.- Small batched linear algebra on
Tensor:eye,diag,diag_embed,trace,cholesky,logdet,det,eigh. backend— the op vocabulary (backend::UnaryOp,backend::BinaryOp,backend::ReduceOp), thebackend::Backendtrait every device implements, and the registry that resolves aoxmera_core::Devicehandle. The traits live here so tensor methods and operator overloads can dispatch without violating the orphan rule.autograd— the tape: recording switch,autograd::no_grad, and gradient propagation;Tensor::backwarddrives it.
Backends register themselves at load time (linking oxmera-cpu or
oxmera-metal is what makes their device usable); the oxmera
umbrella crate links every backend for the current platform.
Re-exports§
pub use autograd::NoGradGuard;pub use autograd::no_grad;pub use backend::Backend;pub use backend::BinaryOp;pub use backend::ReduceOp;pub use backend::UnaryOp;pub use backend::backend_for;pub use backend::register_backend;pub use storage::CpuStorage;pub use storage::OpaqueBuffer;pub use storage::Storage;pub use storage::StorageData;pub use tensor::Tensor;
Modules§
- autograd
- Reverse-mode autograd plumbing: the tape nodes tensors carry, gradient accumulation, and the recording switch.
- backend
- The backend seam: the op vocabulary every device implements, and the
registry that resolves a
Devicehandle to an implementation. - cpu
- The multi-threaded CPU backend implementation. Lives inside the
tensor crate so it can be registered lazily by
backend_for— the CPU reference is always available, with no link-order or life-before-main caveats. The public face is theoxmera-cpucrate. - ops
- The differentiable operation layer: every method dispatches to the device backend for the forward pass and, when recording is on and an input is tracked, attaches the exact vector-Jacobian product to the output’s tape node.
- overload
std::opssugar for tensors.- storage
- Storage: the owned buffer behind one or more tensors.
- tensor
- The tensor value: a layout over shared storage, with an optional autograd tape node.
Constants§
- CAPABILITIES
- What this crate can do, for
oxmera doctor. - EIGH_
SYMMETRY_ TOL - How far from symmetric an
Tensor::eighinput may be, relative to its own largest magnitude.
Functions§
- einsum
- Einstein summation over one or two operands. See the module docs for the accepted specs.