Expand description
Pure-Rust reference CPU backend. Implements bb::Backend for
the ai.onnx v1 51-op subset over ndarray. Gated by the
cpu-backend feature.
Re-exports§
pub use opset::ONNX_DOMAIN;pub use opset::ONNX_V1_OPSET;pub use opset::ONNX_VERSION;pub use tensor::CpuTensor;pub use tensor::CpuTensorError;pub use graph_walker::execute_graph;pub use graph_walker::BackendError;
Modules§
- graph_
walker CpuBackend::execute_graph— walk aGraphProtobody (the kind the compiler’scollapse_backend_subgraphspass emits inside everyBackendSubgraph_*FunctionProto) and run each NodeProto through the existing kernel dispatch.- ops
- Per-op kernel dispatch for the
CpuBackend. - opset
- Opset declaration for the
CpuBackend. - tensor
CpuTensor—Arc-shared handle to aCpuBackendBufferholding anndarray::ArrayD<f32>. Cloning the handle is anArc::clone(O(1) refcount bump); the underlying buffer is owned by the backend and may be pooled or fresh-allocated byCpuBackend.
Structs§
- CpuBackend
- Reference CPU backend. Dispatches its opset onto ndarray
kernels; storage is
ArrayD<f32>end-to-end.
Functions§
- dispatch_
count - Read the current per-thread invocation count.
- reset_
dispatch_ count - Reset the per-thread invocation count to zero.