microsoft / microsoft/winml-cli

onnx 1.21.0 upgrade: fix IR version 13 incompatibility with onnxruntime

Open
#245 3 comments 1 reaction 2 assignees View on GitHub

Nobody has claimed this yet.

bug dependencies infrastructure triaged
Dominant language
Python
Stars
40
Forks
11
Avg merge
1d 8h
Merged PRs (30d)
50

Description

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

  • PR #223 (dependabot/pip/onnx-1.21.0)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.