microsoft / microsoft/winml-cli
onnx 1.21.0 upgrade: fix IR version 13 incompatibility with onnxruntime
Nobody has claimed this yet.
- 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.py—TestNumericEquivalence(3 tests)- 5
make_model()calls withoutir_versionset (lines 70, 121, 265, 304, 340)
test (analyze) — 60+ failures
tests/unit/analyze/test_input_generators.py—test_operator_validationfor all opsets (17, 22, 23)- Root:
src/winml/modelkit/pattern/op_input_gen/op_input_gen.py:1017—_create_model()has noir_versionset 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.