Repository navigation
Commit 609f1be
committed
onnxsim: pin ir_version in test_profiling's _foldable_model
cp312-manylinux_riscv64's test step failed all 10 tests in
tests/test_profiling.py:
RuntimeError: Your model ir_version 14 is higher than the
checker's (13).
_foldable_model() builds its onnx.ModelProto via helper.make_model()
with no ir_version, so the model is stamped with whatever
onnx.IR_VERSION the installed onnx package currently defines - and
our registry's newest riscv64 onnx build for cp312 is 1.23.0. onnxsim
statically links a vendored onnx (via the onnx-optimizer git
submodule, frozen at a pinned commit) whose checker only recognizes up
to ir_version 13, so any onnx installed newer than that submodule's
pin breaks every caller of _foldable_model() before the test gets to
what it actually checks.
Every other test file in the suite (test_python_api.py,
test_function_rewriter.py, test_constant_fold_determinism.py, ...)
already pins ir_version explicitly for exactly this reason -
test_profiling.py is the one file that didn't. Not riscv64-specific:
the same break reproduces on any platform the moment pip resolves an
onnx release newer than the vendored submodule tolerates. Patches
tests/test_profiling.py to pin ir_version=10, matching the convention
already used throughout the rest of the suite, and wires the
`Checkout python-wheels` + `Apply patches` steps (mirroring
build-py-spy.yml) into build-onnxsim.yml so the patch actually lands
during CI.1 parent d6481a8 commit 609f1be
3 files changed
Lines changed: 79 additions & 0 deletions
File tree
- .github/workflows
- docs/packages
- patches/onnxsim/0.7.3
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| 25 | + | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
| |||
79 | 81 | | |
80 | 82 | | |
81 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
82 | 93 | | |
83 | 94 | | |
84 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
Lines changed: 67 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
0 commit comments