Skip to content

onnx 1.21.0 upgrade: fix IR version 13 incompatibility with onnxruntime #245

Description

@timenick

Problem

PR #223 bumps onnx from 1.18 to 1.21.0. CI fails with 63+ test failures across test (analyze) and test (optim) jobs.

Root cause

onnx 1.21.0 changed helper.make_model() to default ir_version to 13 (was 8/9 in 1.18). onnxruntime only supports up to IR version 11, so any code path that creates a model and runs it through ORT fails with:

Unsupported model IR version: 13, max supported IR version: 11

CI failures

test (optim) — 3 failures

  • tests/unit/optim/fusions/test_fusion_rmsnorm.pyTestNumericEquivalence (3 tests)
  • 5 make_model() calls without ir_version set (lines 70, 121, 265, 304, 340)

test (analyze) — 60+ failures

  • tests/unit/analyze/test_input_generators.pytest_operator_validation for all opsets (17, 22, 23)
  • Root: src/winml/modelkit/pattern/op_input_gen/op_input_gen.py:1017_create_model() has no ir_version set
  • validate_inputs()_run_op_on_cpu() creates ORT session → IR version 13 rejected

Fix needed

Add model.ir_version = 11 (or 8 for tests) after make_model() in these locations:

Source code (2 files):

File Line
src/winml/modelkit/pattern/op_input_gen/op_input_gen.py 1017
src/winml/modelkit/analyze/core/runtime_checker_query.py 1120

Test code (1 file):

File Lines
tests/unit/optim/fusions/test_fusion_rmsnorm.py 70, 121, 265, 304, 340

Note: 80+ other test files also have make_model() without ir_version, but don't currently fail because they don't run ORT inference. Consider a sweep to future-proof.

Related

Metadata

Metadata

Labels

bugSomething isn't workingdependenciesPull requests that update a dependency fileinfrastructureCI/CD and infrastructuretriagedIssue has been triaged

Type

No fields configured for Bug.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions