﻿# ONNX compatibility: distinguish IR version, domain opsets and model revision

Diagnose ONNX loading failures by separating serialization format, imported operator semantics and the publisher’s own model revision instead of editing one version field.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/fg2-onnx-ir-version-opset-domain-separation/
Language: en

## The filename says nothing about operator semantics

A deployment receives a newer export with the same filename. Its consumer rejects the model before GPU execution. Changing the publisher’s revision label cannot resolve an unsupported representation field or operator definition. Start by inspecting the model header and the imported domains. Keep the exporting tool’s version separately: that identifies the producer, while the other fields describe what the consumer must understand. This distinction prevents a misleading diagnosis that treats every version number as interchangeable.

## Representation and operators evolve separately

The [ONNX versioning policy](https://onnx.ai/onnx/repo-docs/Versioning.html) distinguishes representation, operator and model versioning. The first describes the graph format; operator imports select semantic versions within domains. A model can therefore require a familiar operator set while using a representation feature that an older reader cannot parse. Conversely, successfully parsing the graph does not demonstrate support for every imported operation. Compatibility needs evidence at both boundaries, rather than a single comparison against the package release number.

## Domain imports belong to the release contract

The [IR specification](https://onnx.ai/onnx/repo-docs/IR.html) defines the model’s imports and producer metadata. Record custom domains alongside the standard domain, because matching a short operator name is insufficient to establish its meaning. When reviewing an export, compare the complete import map and the actual nodes. The [tokenizer release manifest](/journal/tokenizer-artifact-release-manifest/) illustrates why the surrounding artifacts also need explicit identities, although tokenizer consistency cannot repair an unsupported graph schema.

## Conversion is a transformation, not a relabel

The [version converter API](https://onnx.ai/onnx/api/version_converter.html) can raise an error when a required conversion is unsupported. Merely replacing an import number skips that transformation and may reinterpret an operator under incompatible rules. Preserve the original export, produce a separate converted artifact and compare representative outputs. Include cases that exercise changed attributes and boundary dimensions; accepting the converted file is weaker evidence than reproducing its intended computation.

## Report the failing layer precisely

An actionable incident states whether parsing, operator resolution, backend compilation or numerical validation failed. Attach the actual model digest, import map, consumer build and conversion procedure. Use [artifact verification](/journal/artifact-signature-verification/) to connect that evidence to the deployed bytes. This makes a later consumer upgrade or re-export reviewable without claiming that every newer ONNX model is automatically compatible with every older runtime.
