Skip to main content

Crate tenferro

Crate tenferro 

Source
Expand description

tenferro: traced tensor computation with StableHLO-style IR.

This crate provides a tracing-based tensor computation framework where operations are recorded into a StableHLO-compatible intermediate representation, then compiled and executed on a backend (e.g., CPU).

§Examples

use tenferro::{CpuBackend, Engine, TracedTensor};

let mut engine = Engine::new(CpuBackend::default());
// ... build and execute traced computations

Re-exports§

pub use engine::Engine;
pub use sym_dim::SymDim;
pub use traced::TracedTensor;

Modules§

compiler
eager_einsum
Eager einsum helpers exposed through the tenferro facade.
eager_exec
einsum
N-ary einsum with configurable contraction strategy.
engine
error
Error types for the tenferro crate.
exec
segment
ExecProgram segmentation and segment-based dispatch.
shape_infer
Output-shape and output-dtype inference for StdTensorOp.
sym_dim
traced

Structs§

CpuBackend
CPU execution backend.
DotGeneralConfig
DotGeneral dimension configuration.
EagerContext
Shared eager execution context for tensors on a backend.
EagerTensor
Eager tensor with reverse-mode autodiff over concrete tensor values.
GatherConfig
StableHLO gather dimension configuration.
PadConfig
StableHLO pad configuration.
ScatterConfig
StableHLO scatter dimension configuration.
SliceConfig
Slice configuration.
TypedTensor
Contiguous column-major typed tensor storage.

Enums§

DType
Runtime scalar dtype tag.
Tensor
Dynamic tensor enum over the supported scalar types.

Traits§

TensorBackend
Standard runtime backend over dynamic Tensor values.
TensorScalar
Sealed trait for scalar types that can be stored in a Tensor.

Functions§

cholesky
Cholesky factorization.
convert
Convert a traced tensor to a different dtype.
det
Determinant from slogdet.
eig
Non-symmetric eigendecomposition.
eigh
Hermitian eigenvalue decomposition with a default numerical epsilon.
eigh_with_eps
Hermitian eigenvalue decomposition with an explicit numerical epsilon.
eigvals
General eigenvalues only.
eigvalsh
Hermitian eigenvalues only.
inv
Matrix inverse via solve(a, eye).
lu
LU decomposition with partial pivoting.
matmul
Matrix multiplication helper for rank-2 traced tensors.
norm
Vector or matrix norm.
pinv
Moore-Penrose pseudoinverse via the SVD.
pinv_with_rtol
Moore-Penrose pseudoinverse via the SVD with an explicit relative cutoff.
pow
Elementwise power helper with NumPy-style broadcasting.
qr
QR decomposition.
slogdet
Sign and log-absolute-determinant from the LU factorization.
solve
Solve a linear system using LU decomposition and triangular solves.
svd
Singular value decomposition with a default numerical epsilon.
svd_with_eps
Singular value decomposition with an explicit numerical epsilon.
triangular_solve
Solve a triangular linear system.