From 532f11ef4b3c35eefc30fabef38885c0a438772c Mon Sep 17 00:00:00 2001 From: Adrian Lizarraga Date: Thu, 17 Aug 2023 16:16:51 -0700 Subject: [PATCH] Update onnxruntime/core/optimizer/transpose_optimization/onnx_transpose_optimization.cc Co-authored-by: Scott McKay --- .../transpose_optimization/onnx_transpose_optimization.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/onnxruntime/core/optimizer/transpose_optimization/onnx_transpose_optimization.cc b/onnxruntime/core/optimizer/transpose_optimization/onnx_transpose_optimization.cc index 96e263dc54043..580bd0bded4bc 100644 --- a/onnxruntime/core/optimizer/transpose_optimization/onnx_transpose_optimization.cc +++ b/onnxruntime/core/optimizer/transpose_optimization/onnx_transpose_optimization.cc @@ -1193,7 +1193,12 @@ bool TransposeQuantizeDequantizeAxis(const api::GraphRef& graph, const std::vect constexpr bool HandleQuantizeDequantizeAxis(const api::GraphRef& graph, const std::vector& perm, api::NodeRef& node, int64_t opset) { - if (opset >= 13) { + if (opset < 13) { + // no `axis` value until opset 13 + return true; + } + + return TransposeQuantizeDequantizeAxis(graph, perm, node);; return TransposeQuantizeDequantizeAxis(graph, perm, node); }