From 965e57607acd4a1baa27028490e9af04b4ac49ef Mon Sep 17 00:00:00 2001 From: Hector Li Date: Thu, 5 Dec 2024 11:46:32 -0800 Subject: [PATCH] fix UT --- onnxruntime/core/providers/qnn/qnn_execution_provider.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/onnxruntime/core/providers/qnn/qnn_execution_provider.cc b/onnxruntime/core/providers/qnn/qnn_execution_provider.cc index f157fb13b1f92..3bb069196e31c 100644 --- a/onnxruntime/core/providers/qnn/qnn_execution_provider.cc +++ b/onnxruntime/core/providers/qnn/qnn_execution_provider.cc @@ -1002,9 +1002,11 @@ Status QNNExecutionProvider::Compile(const std::vector& fused auto context_buffer = qnn_backend_manager_->GetContextBinaryBuffer(buffer_size); // Get max spill fill buffer size uint64_t max_spill_fill_buffer_size = 0; - ORT_RETURN_IF_ERROR(qnn_backend_manager_->GetMaxSpillFillBufferSize(context_buffer.get(), - buffer_size, - max_spill_fill_buffer_size)); + if (enable_spill_fill_buffer_) { + ORT_RETURN_IF_ERROR(qnn_backend_manager_->GetMaxSpillFillBufferSize(context_buffer.get(), + buffer_size, + max_spill_fill_buffer_size)); + } qnn_ep_context_model_ = std::make_unique("qnn_ep_context_model", false, logger); ORT_RETURN_IF_ERROR(qnn::CreateEPContextNodes(qnn_ep_context_model_.get(), context_buffer.get(),