From b26e0ea598667dbb7e617d9247598116f73c68b7 Mon Sep 17 00:00:00 2001 From: Jing Fang Date: Mon, 8 Jul 2024 15:25:48 -0700 Subject: [PATCH] fix ut --- .../optimizer/qdq_transformer/selectors_actions/qdq_actions.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/onnxruntime/core/optimizer/qdq_transformer/selectors_actions/qdq_actions.cc b/onnxruntime/core/optimizer/qdq_transformer/selectors_actions/qdq_actions.cc index c1216d4c73ae9..657218b44dc91 100644 --- a/onnxruntime/core/optimizer/qdq_transformer/selectors_actions/qdq_actions.cc +++ b/onnxruntime/core/optimizer/qdq_transformer/selectors_actions/qdq_actions.cc @@ -288,7 +288,6 @@ DQMatMulReplaceWithMatMulNBits::DQMatMulReplaceWithMatMulNBits(int64_t accuracy_ }()}, intra_op_thread_pool_{intra_op_thread_pool} { ORT_ENFORCE(accuracy_level_ >= 0 && accuracy_level_ <= 4, "MatMulNBits accuracy level must be between 0 and 4"); - ORT_ENFORCE(intra_op_thread_pool_, "Intra op thread pool cannot be null"); } NodeAttributes @@ -312,6 +311,8 @@ DQMatMulReplaceWithMatMulNBits::ExtraAttributes(const RuntimeState& runtime_stat Status DQMatMulReplaceWithMatMulNBits::ProcessNewNode(Graph& graph, const NodesToOptimize& selected_nodes, Node& replacement_node) const { + ORT_ENFORCE(intra_op_thread_pool_, "Intra op thread pool cannot be null"); + const auto* dq_node = selected_nodes.Input(0); const auto* weight_arg = dq_node->InputDefs()[0]; const auto* scale_arg = dq_node->InputDefs()[1];