oxionnx-core
Core types for OxiONNX -- Tensor, Graph, OpKind, Operator trait, and error types.
This crate provides the foundational data structures and abstractions used throughout
the OxiONNX inference engine. It is no_std-compatible (with the std feature disabled)
and has minimal dependencies.
Key Types
Tensor-- N-dimensional tensor with f32 storage, shape, strides, and layout support (NCHW/NHWC/RowMajor).DType/TypedTensor-- Multi-dtype tensor support covering F32, F16, BF16, F64, I8/I16/I32/I64, U8/U16/U32/U64, and Bool.Graph-- Represents an ONNX computation graph as a list ofNodes with input/output names.OpKind-- Enum of all supported ONNX operators (147).Operatortrait -- Stateless interface for operator implementations; receives anOpContextwith resolved inputs.OperatorRegistry-- Maps ONNX op_type strings toOperatortrait objects.OnnxError-- Unified error type for the engine.
Usage
[]
= "0.1.0"
use ;
// Create a 2x3 tensor
let t = new;
assert_eq!;
// Layout conversion
use ;
let img = new; // [N,C,H,W]
let nhwc = nchw_to_nhwc.expect;
assert_eq!; // [N,H,W,C]
Feature Flags
| Feature | Default | Description |
|---|---|---|
std |
Yes | Enables standard library support. Disable for no_std environments. |
Part of oxionnx
A Pure Rust ONNX inference engine.
License
Apache-2.0