From 569445fde80ec98efafeb131d93fdded929306f0 Mon Sep 17 00:00:00 2001 From: Abukhoyer Shaik Date: Tue, 14 Oct 2025 08:23:03 +0000 Subject: [PATCH 1/2] onnx opset version updated from 13 to 17 Signed-off-by: Abukhoyer Shaik --- QEfficient/exporter/export_utils.py | 2 +- QEfficient/utils/constants.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/QEfficient/exporter/export_utils.py b/QEfficient/exporter/export_utils.py index f86a0f254..ab219f26a 100644 --- a/QEfficient/exporter/export_utils.py +++ b/QEfficient/exporter/export_utils.py @@ -97,7 +97,7 @@ def export_onnx( input_names=input_names, output_names=output_names, dynamic_axes=dynamic_axes, - opset_version=13, + opset_version=17, custom_opsets={"com.qti.aisw.onnx": 1}, ) except Exception as e: diff --git a/QEfficient/utils/constants.py b/QEfficient/utils/constants.py index 8228b7c0e..ffdced52f 100644 --- a/QEfficient/utils/constants.py +++ b/QEfficient/utils/constants.py @@ -17,7 +17,6 @@ ONNX_EXPORT_EXAMPLE_SEQ_LEN = 32 ONNX_EXPORT_EXAMPLE_FBS = 4 ONNX_EXPORT_EXAMPLE_NLK = 2 # Number of Logits to Keep -ONNX_EXPORT_OPSET = 13 ONNX_EXPORT_MAX_NUM_IMAGES = 1 ONNX_EXPORT_MAX_IMAGE_TILES = 4 ONNX_EXPORT_IMAGE_WIDTH = 560 @@ -84,7 +83,7 @@ def get_models_dir(): ONNX_EXPORT_EXAMPLE_MAX_TOP_K_IDS = 512 ONNX_EXPORT_EXAMPLE_TOP_PS = 0.80 ONNX_EXPORT_EXAMPLE_MIN_PS = 0.99 -ONNX_EXPORT_OPSET = 13 +ONNX_EXPORT_OPSET = 17 COMPILER = ["/opt/qti-aic/exec/qaic-exec", "-aic-hw"] DEFAULT_AIC_HW_VERSION = "ai100" From 5dc08f97e751e5e0c5d0368ab2e19d8f7642fb39 Mon Sep 17 00:00:00 2001 From: Abukhoyer Shaik Date: Wed, 29 Oct 2025 07:49:09 +0000 Subject: [PATCH 2/2] commnets adressed Signed-off-by: Abukhoyer Shaik --- QEfficient/exporter/export_utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/QEfficient/exporter/export_utils.py b/QEfficient/exporter/export_utils.py index ab219f26a..eec756e4b 100644 --- a/QEfficient/exporter/export_utils.py +++ b/QEfficient/exporter/export_utils.py @@ -18,6 +18,7 @@ from onnx import external_data_helper from QEfficient.base.onnx_transforms import FP16ClipTransform +from QEfficient.utils import constants def export_onnx( @@ -97,7 +98,7 @@ def export_onnx( input_names=input_names, output_names=output_names, dynamic_axes=dynamic_axes, - opset_version=17, + opset_version=constants.ONNX_EXPORT_OPSET, custom_opsets={"com.qti.aisw.onnx": 1}, ) except Exception as e: