diff --git a/onnxruntime/core/providers/openvino/onnx_ctx_model_helper.cc b/onnxruntime/core/providers/openvino/onnx_ctx_model_helper.cc index 60a461f7159f3..b6cb183b79869 100644 --- a/onnxruntime/core/providers/openvino/onnx_ctx_model_helper.cc +++ b/onnxruntime/core/providers/openvino/onnx_ctx_model_helper.cc @@ -134,7 +134,7 @@ std::unique_ptr EPCtxHandler::GetModelBlobStream(const std::fi result.reset(); // Release the stream as we will get the native blob from SharedContext auto shared_context = shared_context_manager_->GetOrCreateSharedContext(native_blob_path); - return std::make_unique(shared_context->GetNativeBlobAsStream(partition_name), shared_context->GetNativeBlob(partition_name)); + return std::make_unique(shared_context->GetNativeBlob(partition_name)); } LOGS_DEFAULT(VERBOSE) << "[OpenVINO EP] Read blob from EPContext Node"; diff --git a/onnxruntime/core/providers/openvino/onnx_ctx_model_helper.h b/onnxruntime/core/providers/openvino/onnx_ctx_model_helper.h index fce88005a0605..eb750ee2f3db9 100644 --- a/onnxruntime/core/providers/openvino/onnx_ctx_model_helper.h +++ b/onnxruntime/core/providers/openvino/onnx_ctx_model_helper.h @@ -16,7 +16,8 @@ namespace onnxruntime { namespace openvino_ep { struct ModelBlobWrapper { - ModelBlobWrapper(std::unique_ptr stream, const ov::Tensor& tensor) : stream_(std::move(stream)), tensor_(tensor) {} + explicit ModelBlobWrapper(std::unique_ptr stream, const ov::Tensor& tensor) : stream_(std::move(stream)), tensor_(tensor) {} + explicit ModelBlobWrapper(const ov::Tensor& tensor) : tensor_(tensor) {}; std::unique_ptr stream_; ov::Tensor tensor_; // May be empty if model blob is provided as stream only. };