﻿# ONNX Runtime Arm NHWC Conv: a transformer must not select a kernel that rejects its rank

The 1.32 NhwcFusedConv addition aligns 1-D graph rewriting with kernel coverage; test the transformed path, not only the original Conv.

Author: Retrivium team
Updated: 2026-11-15
Canonical URL: https://retrivium.ai/journal/week46-engine-ort-arm-nhwc-one-dimensional-convolution/
Language: en

ONNX Runtime 1.32.0 adds one-dimensional kernel support to float channels-last NhwcFusedConv. The linked report describes an Arm64 transformer rewriting a valid 1-D Conv into a path that previously accepted only 2-D kernels. A graph optimizer’s successful rewrite therefore needs alignment with the execution kernel’s actual rank coverage.

## A valid source graph can fail after optimization

The original Conv can be supported while its transformed channels-last target is not. A proposed regression runs the same model with the relevant transformation disabled and enabled, preserving inputs and weights. The first establishes source execution; the second tests the new target path. A load-only check misses a rejection raised during compute, so the test must invoke inference and verify the output rather than merely create a session.

## Layout and spatial rank are independent axes

Channels-last layout does not imply two spatial dimensions. A one-dimensional convolution still has channels, batch and spatial positions with their own indexing. A proposed reference uses distinguishable channels and nontrivial kernel values, checking the full output against the original layout. Include padding and stride cases actually used by the application. An all-ones input can conceal a layout permutation while producing plausible convolution values.

## Verify the target kernel actually runs

A fallback or skipped rewrite can make the model pass without exercising NhwcFusedConv. Inspect the optimized graph and provider profile. Preserve the Arm64 build configuration that selects the path, because an x64 comparison may legitimately avoid it. A structural assertion and numerical comparison complement each other: the former establishes coverage, while the latter establishes that the newly supported rank computes the intended result.

## Support is not an automatic speed claim

The release removes a rank-coverage gap. Whether the transformed path is faster depends on the model and CPU. Measure only after correctness and actual dispatch are established, separating layout-conversion cost if present. This article reports the transformer-kernel compatibility issue and proposed tests without new Arm benchmarks. The practical result is a valid transformed 1-D execution path, rather than a promise that all convolution workloads improve.

## Sources

- [ONNX Runtime v1.32.0 release](https://github.com/microsoft/onnxruntime/releases/tag/v1.32.0)
- [ONNX Runtime pull request #33690](https://github.com/microsoft/onnxruntime/pull/33690)

## Related reading

- [ONNX Runtime offline optimization: a saved optimized graph inherits a target contract](/journal/fg2-onnxruntime-offline-graph-target-compatibility/)
- [ONNX Runtime provider order: graph partition priority is not request failover](/journal/fg2-onnxruntime-provider-priority-subgraph-partition/)
