Skip to main content

Module tensor

Module tensor 

Source
Expand description

CpuTensorArc-shared handle to a CpuBackendBuffer holding an ndarray::ArrayD<f32>. Cloning the handle is an Arc::clone (O(1) refcount bump); the underlying buffer is owned by the backend and may be pooled or fresh-allocated by CpuBackend.

Storage is ndarray::ArrayD<f32>: heap-dynamic rank, row-major, with broadcasting + axis-walking primitives ndarray already provides. Hot kernels downcast to Ix2 / Ix3 via .into_dimensionality::<...>() for typed-dim performance and return to IxDyn at the boundary.

Phase C scope: f32 only. Backend-side extensions for f64 / i32 / i64 / bool land via the optional extension_opsets() declaration when those types are exercised.

Structs§

CpuBackendBuffer
Backend-owned buffer behind a CpuTensor handle. Holds the ndarray storage plus the byte count charged against the NodeConfig::ingress_byte_budget at materialization time so the slot-table writer can release the charge on overwrite / eviction.
CpuTensor
f32-dense CPU-resident tensor handle. Arc-shared so intra-Node clones (FedAvg’s per-peer buffer insert, slot-table writes, etc.) are refcount bumps rather than Vec<f32> deep copies. The underlying CpuBackendBuffer is owned by the backend, which is free to pool / reuse / free the storage at a later milestone without API churn (the handle shape stays identical).

Enums§

CpuTensorError
Errors CpuTensor::new_checked and from_proto may return.

Constants§

ONNX_FLOAT
ONNX DataType::FLOAT numeric tag.