API Reference

Rustdoc

The public API is split by responsibility. Start with tenferro-runtime for concrete tensors, traced graphs, compilation, execution, and extension runtime registration; add tenferro-ad when you need eager execution or automatic differentiation.

For contributors, internal crate APIs are also available in the full workspace Rustdoc index.

Workspace Crates

  • tenferro-runtime: concrete tensor helpers, traced tensors, graph compilation/execution, extension runtime registration, and extension cache storage
  • tenferro-ad: eager runtime, eager tensors, and traced AD extension traits
  • tenferro-xla: experimental StableHLO lowering and runtime-loaded PJRT plugin support for static-shaped traced programs
  • tenferro-tensor: dense runtime tensors, typed views, backend traits, and backend-independent contracts
  • tenferro-cpu: public CPU backend, CPU execution sessions, execution context, provider selection, thread policy, and resource-pool controls
  • tenferro-gpu: CubeCL/CUDA backend and GPU transfer helpers
  • tenferro-einsum: subscripts, contraction planning, concrete/traced/eager einsum APIs, extension runtime, and AD rule
  • tenferro-linalg: linear algebra traced APIs, eager helpers, extension runtime, and optional linalg AD rules
  • tenferro-fft: FFT extension runtime and public concrete/traced FFT APIs
  • cubecl-kernel-sample: sample CUDA CubeCL kernel exercising the public raw/cubecl session seams

Extension and Consumer Crates

These crates are not published. They show how an application adds a scalar tenferro does not declare and how it composes that support with the canonical one, and their tests are the executable evidence for those boundaries. The adding an external scalar guide runs the path end to end and names the test behind every claim.

  • tenferro-df16-proof: standard bfloat16 carried as a stored scalar, with the shared elementwise path, directed bfloat16/f32 conversions, and a reduction whose accumulation rule is stated and measured
  • tenferro-df64-proof: an externally defined scalar with its own arithmetic, QR factorisation, extension operations, and first-order AD rules
  • tenferro-scalar-consumer-algorithm: the algorithm role, which states the capabilities it needs and never names a scalar, a provider, or a dtype
  • tenferro-scalar-consumer-application: the application role, which binds those capabilities to canonical support and to the external scalar

Internal Implementation Crates

These crates are documented for contributors and crate-boundary review. They are not the recommended application-facing API surface.