This repository was archived by the owner on Jun 3, 2025. It is now read-only.
Commit a574de1
authored
Add:Support for ONNX versions 1.8.*, 1.9.* upto 1.10.1 (#365)
* Replaced usage of onnx.helpers.make_model(model.graph) to deepcopy(model) in [file](https://github.com/neuralmagic/sparseml/blob/main/src/sparseml/onnx/utils/helpers.py) because opset and ir_versions were lost in the process initially which broke Tests when using onnx versions>=1.8.0
* Added explicit IR_VERSION=6 in usages of onnx.helpers.make_model(...) in [file](https://github.com/neuralmagic/sparseml/blob/main/tests/sparseml/onnx/optim/quantization/helpers.py)
* Updated setup.py to install latest onnx version(at the time of this PR) when installing using pip -e ...
Tested on `Python 3.6.9`, and Linux/Debian system,
Tests ran:`make test TARGETS=onnx`1 parent 2a19442 commit a574de1
File tree
3 files changed
+7
-6
lines changed- src/sparseml/onnx/utils
- tests/sparseml/onnx/optim/quantization
3 files changed
+7
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | | - | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
240 | 241 | | |
241 | 242 | | |
242 | 243 | | |
243 | | - | |
| 244 | + | |
244 | 245 | | |
245 | 246 | | |
246 | 247 | | |
| |||
277 | 278 | | |
278 | 279 | | |
279 | 280 | | |
280 | | - | |
| 281 | + | |
281 | 282 | | |
282 | 283 | | |
283 | 284 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
| 138 | + | |
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
| 177 | + | |
178 | 178 | | |
0 commit comments