Expand description
CpuTensor — Arc-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§
- CpuBackend
Buffer - Backend-owned buffer behind a
CpuTensorhandle. Holds thendarraystorage plus the byte count charged against theNodeConfig::ingress_byte_budgetat 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 thanVec<f32>deep copies. The underlyingCpuBackendBufferis 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§
- CpuTensor
Error - Errors
CpuTensor::new_checkedandfrom_protomay return.
Constants§
- ONNX_
FLOAT - ONNX
DataType::FLOATnumeric tag.