All notable changes to OxiONNX will be documented in this file.
The format is based on Keep a Changelog.
0.1.4 - 2026-06-08
-
feat: Subgraph parsing + end-to-end execution for
If,Loop,Scanoperators — ONNX models containing control-flow nodes now parse and execute correctly from real.onnxfiles. Previously theIf/Loop/Scankernels existed and passed in-memory unit tests but were never reachable from a loaded model due to two disconnects:oxionnx-proto:AttributeValuenow carriesg: Option<Box<GraphProto>>for graph-valued attributes (wire field 6);parse_attributeparses nested subgraphs via the existingparse_graphrecursively (both eager and streaming parser paths fixed simultaneously).build_subgraphinmodel.rsconverts a nestedGraphProtointo a runtimeGraph, synthesisingConstantnodes for subgraph-local initializers without touching the 48-literalGraphstruct.oxionnx-core:OpContextgains aweights: Option<&'a HashMap<String, Tensor>>field so model weights can be accessed by subgraph nodes without cloning.Session::dispatch_nodenow populatesouter_scope,weights, andregistryin all three dispatch paths (slot-write, inplace, default-execute) and the parallel rayon path.oxionnx-opscontrol-flow kernels (IfOp,LoopOp,ScanOp) passctx.weightsthrough toexecute_subgraph, giving subgraph nodes access to outer-model initializers at zero allocation cost.
-
feat: 9 new end-to-end integration tests (
tests/control_flow_e2e.rs):Iftrue/false branch,Loopaccumulation,Loopzero-iteration,Loopwith outer-scope weight,Scanelement-wise map,Scanwith running-state,Ifwith sequential subgraph ops,Ifwith subgraph-local initializer. -
feat: 2 new
oxionnx-protounit tests:test_subgraph_attribute_parsed(parser round-trip),test_subgraph_attribute_wired_into_graph(build_subgraph populates Attributes.graphs). -
perf: Phase F.13 complete — zero-copy
execute_into_slotsforAttentionOpandMultiHeadAttentionOp, the last two ops in the Phase F sweep. Backed bysdpa_into/sdpa_output_shape/reshape_from_heads_into/multi_head_attention_intoinattention/core.rs(allocation-free kernels; existing public APIs unchanged). Theno-outprojMHA path now skips theconcatallocation entirely viareshape_from_heads_into; thewith-outprojpath writes the projected output directly into the caller's pooled buffer. Phase F slot-write sweep closed at 58 of 121 ops. -
fix: SIMD path in
scaled_dot_product_attentiondid not zerorow_outbetween query rows —weighted_sum_vaccumulates, so forseq_q > 1with thesimdfeature enabled the result was incorrect. The extraction intosdpa_intonaturally fixed this by writing directly into per-row slices of the caller buffer (no sharedrow_outtemp at all). -
feat: 21 new tests in
oxionnx-ops/tests/output_slots_attention_test.rs: AttentionOp and MultiHeadAttentionOp slot-write correctness vsexecute, broadcast mask, custom scale,seq_k ≠ seq_q, 4D Q, second-call resize (grow and shrink), qkv-projection, out-projection with/without bias, error parity, batch > 1. -
perf: Phase F.14 complete — zero-copy
execute_into_slotsfor 47 additional operators, bringing the total to 105 of 121 ops with hand-coded slot-write bodies. True zero-copy (no output Vec allocation): LayerNorm/GroupNorm/BatchNorm/RmsNorm/InstanceNorm/Softmax/LogSoftmax via new_intokernel variants innn/normalization.rs; Not/IsInf/IsNaN/BitwiseNot/Shape/Size/Constant/ConstantOfShape inline into slot; CumSum inline (same-size as input). Reduced-allocation: ReduceSum/Mean/Max/Min/Prod/L1/L2/LogSum/LogSumExp/SumSquare via newreduce_with_into+reduce_output_shapeinmath/reduce.rs; ArgMax/ArgMin viaarg_reduce_into; TopK (2 outputs) viatop_k_into; variadic ops and comparison/bitwise binary ops via macro update (call+move avoiding Vec wrapper). 41 new tests inoutput_slots_f14_test.rs. -
feat:
NodeInfoandSession::nodes(): public per-node graph introspection — enumerate a model's compute nodes (name, op type, inputs, outputs, and a deterministic attribute summary) in topological order;NodeInfore-exported asoxionnx::NodeInfo(#2). -
ReshapeOpnow reads the ONNXallowzeroattribute: whenallowzero=0(default) a0in the target shape copies the corresponding input dimension; whenallowzero=1a0is a literal zero-size dimension. A newresolve_reshape(input_dims, numel, shape, allowzero)helper is re-exported fromoxionnx-ops::shape. 7 new unit tests cover allallowzerocode paths (test_reshape_allowzero_*inoxionnx-ops/src/shape/tests.rs). -
console_error_panic_hook = "0.1.7"added as an optional workspace dependency wired into thewasmfeature for improved panic messages in WebAssembly environments.
- Updated CUDA / OxiCUDA dependencies to 0.1.8.
oxifftupdated from 0.3 to 0.3.2.- wasm32 compatibility: thread-pool initialization in
src/session/loading.rsis now skipped under#[cfg(target_arch = "wasm32")]; all rayon imports and parallel-execution functions insrc/session/run/parallel.rsare likewise gated with#[cfg(not(target_arch = "wasm32"))]. WASM sessions now build cleanly without a thread pool.
SplitOpnow honors the opset-1..12splitattribute for chunk sizes when nosplitinput tensor is present, fixing YOLO11 (opset 11) models that failed withreshape: element count mismatch (33600 vs [1, 128, 20, 20])in the C2PSA attention block (#1).
0.1.3 - 2026-05-16
- feat:
ProviderKind::DirectMlvariant (behinddirectmlfeature) —ProviderKindenum now covers CPU, GPU (wgpu), CUDA, and DirectML - feat:
SessionBuilder::with_provider_kinds()— non-trivial ordered execution provider list that routes dispatch at runtime; CPU is always the implicit terminal fallback - feat:
SessionBuilder::provider_kinds()accessor — returns the configured provider list for introspection - feat:
Session::provider_kinds()accessor — returns the provider list stored in the session - feat: provider-list dispatch loop in
run_sequential_inner— whenprovidersis non-empty, each node is attempted through the list in order; falls back to legacy heuristic path when list is empty (backward compatible) - feat:
try_provider_list_dispatchhelper — encapsulates CUDA / DirectML / GPU / CPU provider dispatch for the provider-list path; all providers returnNone-graceful results with CPU fallback guaranteed ProviderKindre-exported fromoxionnxcrate root
0.1.2 - 2026-04-19
- Phase D — Operator-Native TypedTensor Dispatch:
native_dtypes()+execute_typed()opt-in hooks on theOperatortrait; 40 pilot operators (23 math, 14 NN, Identity, Cast, Reshape) execute natively without f32 round-trips; all other operators fall back transparently via a correct default implementation - Phase E — DirectML Execution Provider (Windows): new
oxionnx-directmlsubcrate withDirectMLContext::try_new()cross-platform shim; Windows D3D12 context skeleton; HLSL compute shader scaffolds for MatMul, Add, Mul, Relu, Sigmoid; feature-gated behinddirectml; CPU fallback on non-Windows and unsupported ops - Phase F — Operator-Level IOBinding Reuse:
supports_output_slots()+execute_into_slots()opt-in hooks on theOperatortrait;SizeClassPool::acquire()integrated on the slot path; pilot implementations for 40 operators;IoBinding::take_output_buffer/put_output_bufferhelpers for caller-owned buffer management OnnxError::DTypeMismatch— new error variant for dtype validation in the typed dispatch pathTypedOpContext<'a>— parallel context struct for typed operator dispatch- Phase F complete — F.10 remainder sweep: all 121 operators opt into
supports_output_slots = true; full slot-write path with pointer-identity pool reuse across the entire operator set - Phase F.12 — zero-copy
execute_into_slotshand-coded bodies for 30 operators: 22 pilot ops (Phase D/F pilot), plus 9 shape ops (Squeeze/Unsqueeze/Flatten/Expand/Split/Tile/DepthToSpace/SpaceToDepth/ReverseSequence), 12 elementwise NN ops (Clip/LeakyRelu/PRelu/HardSigmoid/Celu/Elu/Selu/ThresholdedRelu/LpNorm/MeanVarianceNorm/Hardmax/Shrink), 6 conv/pool ops (MaxPool/AveragePool/GlobalAveragePool/GlobalMaxPool/Pad/Resize), and Gather/ScatterND/ScatterElements - D.3 scoped slice —
MatMulOp::execute_typedwith native dispatch for F32, F16, BF16, I8→I32, I32 dtypes;native_dtypes()declared; INT8×INT8→I32 triple-loop GEMM kernel; F16/BF16 kernels with f32 accumulator — no round-trip through f32 for quantized or half-precision matmul oxionnx-ops/src/conv.rsrefactored into six focused submodules (conv2d,im2col,winograd,pooling,tests) to clear headroom for D.3 Conv native typed kernels (v0.1.9+)- Integration test
full_slot_coverage_smoke.rs: pointer-identity across 100 iterations + pool reuse assertions for the slot-write infrastructure
- 100 new tests across typed dispatch, IOBinding, DirectML EP, and session slot paths (1074 total)
- Operator trait is fully backward-compatible: all four new methods carry correct default implementations
0.1.1 - 2026-04-14
- RNN operators: GRU, LSTM, RNN, and sequence processing ops (
oxionnx-ops/src/rnn.rs) - Extended ML operators: SVM, tree ensemble, decision tree classifiers/regressors (
oxionnx-ops/src/ml_svm.rs,ml_tree.rs) - Attention operators: expanded multi-head attention and transformer support (
oxionnx-ops/src/attention.rs) - Indexing operators: additional gather/scatter/slice variants (
oxionnx-ops/src/indexing.rs) - Quantized inference ops: extended quantized operator coverage (
oxionnx-ops/src/quantized.rs) - Spatial operators: additional convolution and pooling variants (
oxionnx-ops/src/spatial.rs)
- Fusion optimizer: major expansion of graph fusion rules and pattern matching (
src/optimizer/fusion.rs) - Session API: improved execution flow and error handling (
src/session.rs) - GPU compute context: refined WebGPU context management and kernel dispatch (
oxionnx-gpu/src/context.rs) - GPU shaders: additional WGSL shader kernels (
oxionnx-gpu/src/shaders.rs) - CUDA backend: conv, elementwise, and quantized op refinements (
oxionnx-cuda/src/conv.rs,elementwise.rs) - Proto streaming parser and mmap loader improvements (
oxionnx-proto/src/streaming_parser.rs,mmap_loader.rs) - SIMD ops: extended SIMD-accelerated operator paths (
oxionnx-ops/src/simd_ops.rs) - Math and NN ops: expanded coverage (
oxionnx-ops/src/math.rs,nn.rs)
0.1.0 - 2026-03-26
- Initial release of OxiONNX pure Rust ONNX inference engine
- 147 ONNX operator implementations
- GPU acceleration via wgpu (MatMul, Softmax, ReLU, Sigmoid, GELU, Reduce)
- SIMD optimization (NEON aarch64, AVX2 x86_64)
- Graph optimization: constant folding, operator fusion, CSE, dead code elimination
- Multi-dtype support (DType enum, TypedTensor, TensorStorage)
- INT8 quantized MatMul with per-channel scale/zero-point
- Mixed-precision inference (f16 activations, f32 accumulation)
- Control flow operators: If, Loop, Scan with nested subgraphs
- Streaming token generation for autoregressive models
- Async inference API (run_async)
- Session serialization (save/load pre-optimized graphs)
- Memory-mapped weight loading (mmap feature)
- Tensor arena allocator with buffer pooling
- Strided tensor views (zero-copy transpose, slice, squeeze)
- Broadcasting iterator (zero-allocation)
- AES-GCM model encryption (encryption feature)
- WebAssembly support via wasm-bindgen
- no_std support for oxionnx-core
- Execution provider abstraction with CPU/GPU fallback chain
- ONNX-ML operators: Linear, TreeEnsemble, SVM, Normalizer, Scaler, LabelEncoder, TfIdf
- Model metadata extraction API
- Model validation and schema checking
- Graph diff utility for debugging optimizations
- Model pruning (strip unused weights)
- Symbolic shape propagation
- Opset coverage report generator
- Benchmark-based CPU/GPU path selection
- Numerical tolerance validation
- CI pipeline (GitHub Actions)
- Property-based testing with proptest
- Fuzz testing for protobuf parser
- 595 tests, 0 clippy warnings