Skip to content

Commit

Permalink
Change default onnx opset to 17 when exporting in torch 1.13 or above (
Browse files Browse the repository at this point in the history
…#937)

Change default onnx opset to 17  when exprting in torch 1.13 or above.
---------

Co-authored-by: reuvenp <reuvenp@altair-semi.com>
  • Loading branch information
reuvenperetz and reuvenp authored Jan 31, 2024
1 parent 872ccf8 commit 61efdfc
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@
# ONNX opset version 16 is supported from PyTorch 1.12
if version.parse(torch.__version__) < version.parse("1.12"):
OPSET_VERSION = 15
else:
elif version.parse("1.12.0") <= version.parse(torch.__version__) < version.parse("1.13.0"):
OPSET_VERSION = 16
else:
# ONNX opset version 17 is supported from PyTorch 1.13
OPSET_VERSION = 17


class FakelyQuantONNXPyTorchExporter(BasePyTorchExporter):
Expand Down

0 comments on commit 61efdfc

Please sign in to comment.