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 without ir_version set (lines 70, 121, 265, 304, 340)
test (analyze) — 60+ failures
tests/unit/analyze/test_input_generators.py — test_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
Problem
PR #223 bumps onnx from 1.18 to 1.21.0. CI fails with 63+ test failures across
test (analyze)andtest (optim)jobs.Root cause
onnx 1.21.0 changed
helper.make_model()to defaultir_versionto 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:CI failures
test (optim) — 3 failures
tests/unit/optim/fusions/test_fusion_rmsnorm.py—TestNumericEquivalence(3 tests)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)src/winml/modelkit/pattern/op_input_gen/op_input_gen.py:1017—_create_model()has noir_versionsetvalidate_inputs()→_run_op_on_cpu()creates ORT session → IR version 13 rejectedFix needed
Add
model.ir_version = 11(or8for tests) aftermake_model()in these locations:Source code (2 files):
src/winml/modelkit/pattern/op_input_gen/op_input_gen.pysrc/winml/modelkit/analyze/core/runtime_checker_query.pyTest code (1 file):
tests/unit/optim/fusions/test_fusion_rmsnorm.pyNote: 80+ other test files also have
make_model()withoutir_version, but don't currently fail because they don't run ORT inference. Consider a sweep to future-proof.Related