Skip to main content

Crate oxmera_tensor

Crate oxmera_tensor 

Source
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:

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 Device handle 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 the oxmera-cpu crate.
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::ops sugar 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.