Blog · November 17, 2026 · by Maxime Carriere

ONNX opsets: same layer, different file, different chip

Before deploying to an NPU, you check the vendor’s list of supported operators. The list is written in ONNX names, and which names your model contains is decided earlier, by the exporter and by the opset it targets, the version of the ONNX operator set. Export the same PyTorch model a few years apart and the check can pass for one file and fail for the other.

ONNX opsets, 2017 to 2026

ONNX groups its operators into opsets, numbered versions of the operator set. A release of the onnx package usually defines a new opset, and each version of an operator belongs to the opset that introduced it. A model file does not tag its nodes one by one: it declares one opset per operator domain, and every node in that domain follows that version. The onnx package holds the whole history, so the standard can be counted opset by opset.

Two panels on the same time axis, December 2017 to September 2026. Panel A, operators in the ONNX default domain: a step line from 95 at opset 1 to 160 at opset 12 in May 2020, a shaded band labelled plus 65 in two years: Resize, NMS, RoiAlign, quantization, loops, then a slow climb to 201 at opset 28. Green dots mark the opsets that added single-node layers: LayerNormalization at 17, GroupNormalization at 18, Gelu at 20, Attention, RMSNormalization and RotaryEmbedding at 23, Swish at 24, LinearAttention at 27 and SwiGLU at 28. Panel B, a pair of bars per opset at its release date, green for operators introduced and grey for new versions of existing ones. Until 2020 the green bars are large: 19 new at opsets 9 and 11, 14 at opset 10. After that the grey bars dominate: 79 revisions and no new operator at opset 13, 48 revisions at opset 22, and zero to eight new operators per opset.
Panel A: operators in the ai.onnx domain at each opset, deprecated ones not counted. Panel B: operators introduced and revised at each opset; opsets 2 to 4 were never the newest opset of a release, so their six revisions are counted with opset 5. Counted with onnx 1.23.2.

Panel A counts the default ai.onnx domain, not the separate machine-learning and training domains, and shows one burst. Between May 2018 and May 2020 the standard went from 95 operators to 160, adding what detection and quantized models needed: Resize, NonMaxSuppression, RoiAlign, gather and scatter, quantize and dequantize. In the six years since, 41 more arrived. Nine of them, the green dots, are whole layers written as one node, mostly from transformers; the rest cover signal processing, bitwise and string operations.

Panel B shows what replaced the burst: revisions. Opset 13 added nothing and revised 79 operators, moving several attributes to inputs, and most opsets since 2024 revise about twenty each. An operator has three versions on average; Pad, Constant and Cast have ten. For a vendor toolchain, a known name with a new signature can fail as surely as an unknown one. For a model, each new opset changes what an exporter can write.

Same layer, different ONNX file

The same PyTorch layer can become different ONNX operators depending on the exporter, the opset it targets and the clean-up passes run afterwards. Below, two layers exported in 2020, with PyTorch’s classic exporter at opset 13, and in 2025, with its newer exporter, dynamo=True, at opset 25.

Two PyTorch layers and the ONNX operators PyTorch writes for each, exported in 2020 with the classic exporter at opset 13 and in 2025 with the new exporter at opset 25. nn.LayerNorm: in 2020 a chain of nine operators, ReduceMean, Sub, Pow, ReduceMean, Add, Sqrt, Div, Mul, Add; in 2025 one operator, LayerNormalization. nn.Softplus goes the other way: in 2020 one operator, Softplus; in 2025 three, Softplus and Greater both feeding a Where. Green boxes mark a whole layer written as one ONNX operator.
Two layers that change in opposite directions, from our exports. PyTorch 2.13.0, onnx 1.22.0, onnxscript 0.7.2; each layer exported alone.

LayerNorm shows the common direction: once an opset defines a layer as one operator, the export collapses to it. LayerNorm does at opset 17, GELU at 20, GroupNorm at 21, RMSNorm and attention at 23. Softplus goes the other way: the newer exporter adds a guard against large inputs.

The tools change the file as much as the standard does. The newer exporter unrolls a 16-step RNN into 99 nodes where the classic one keeps a single RNN node. The ONNX Simplifier, onnxsim, which many pipelines run just before the vendor’s converter, turns ZeroPad2d’s eight nodes into one Pad. And a new operator is not always used: SiLU stays Sigmoid and Mul although Swish exists since opset 24.

Convolutions, pooling and plain activations export the same everywhere; the differences sit mostly in normalization, attention and recurrent layers. These are single layers exported alone. Inside a full model, the exporter can also fuse across layers.

Same ONNX file, different chips

A smaller graph can be easier for a compiler to recognise, but only if the target toolchain supports the newer operator. Each vendor toolchain rewrites the ONNX graph its own way before deciding what runs on the NPU, and the two translations can cancel each other out.

A flow in four steps. 1, the PyTorch layer nn.LayerNorm. Exported at opset 17, it becomes 2, an ONNX file with one node, LayerNormalization. The same file then goes to three toolchains. Rockchip's RKNN turns it into one operation of its own, exNorm, on the RK3588. TI's TIDL turns it into three operations on the AM68A: LayerNorm, then EltWise, then EltWise, to normalize, scale and shift. onnx2tf and TensorFlow Lite turn it into ten operations on the NXP i.MX 8M Plus: Mean, SquaredDifference, Mean, Add, Rsqrt, Mul, Mul, Mul, Sub, Add.
RK3588: RKNN's build log and run-time profile, ViT-Tiny. AM68A: TIDL's layer log, ViT-Tiny. i.MX 8M Plus: the deployed MobileViT model, one LayerNorm traced operation by operation.

Each toolchain gives the same node a different shape. RKNN replaces it with exNorm, a normalization operation of its own, and runs it on the NPU as one step. TI’s TIDL splits it into three: a normalization, then the scale and the shift as two element-wise operations. On the i.MX 8M Plus, the model goes through onnx2tf into TensorFlow Lite, which spells the maths out again in ten operations: MobileViT’s 21 LayerNorms become 210, and the compact export does not translate into a simpler implementation on this toolchain.

The newest operators carry the opposite risk. An Attention node at opset 23 replaces eight, but a toolchain that has not implemented it must reject it or send it to the CPU, while the eight-node form might have run on the NPU. We have not yet tested Attention, RMSNormalization or GroupNormalization on an NPU; they are next on our list.

Checklist before deploying

Four habits keep the export from deciding for you:

  • Treat the exporter, the opset and the simplifier as dependencies: pin their versions and record them next to every model file.
  • Before reading a vendor’s support list, check which opset and which operators your file actually contains, with the snippet below.
  • Compare that opset with the range the vendor’s toolchain accepts. A newer opset gives a smaller graph, not necessarily a better-supported one.
  • Test the exact file you ship, on the board: the toolchain, not the file, decides whether a node runs as one operation or ten.
import collections, onnx
m = onnx.load("model.onnx", load_external_data=False)
print({o.domain or "ai.onnx": o.version for o in m.opset_import})
print(collections.Counter(n.op_type for n in m.graph.node))

Where we fit

  • We export your model the way your pipeline does, and list the ONNX operators the file really contains.
  • We run that file through the toolchain of every board on your list and show what each layer becomes: one operation, several, or a fallback to the CPU.
  • We measure speed and accuracy on the boards themselves, not from support lists.
  • When a layer does not map well, we change the export or the model until it runs on the NPU.

Send us your model and the boards on your list. Talk to us.