From 0888c6cc5926ac5debf85b105264933784591b82 Mon Sep 17 00:00:00 2001 From: George Wu Date: Thu, 23 Sep 2021 10:58:33 -0700 Subject: [PATCH] fix bug introduced by PR9130 (#9166) --- onnxruntime/python/onnxruntime_pybind_state.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/onnxruntime/python/onnxruntime_pybind_state.cc b/onnxruntime/python/onnxruntime_pybind_state.cc index 96f4882e82..f29229dc56 100644 --- a/onnxruntime/python/onnxruntime_pybind_state.cc +++ b/onnxruntime/python/onnxruntime_pybind_state.cc @@ -576,9 +576,10 @@ std::unique_ptr CreateExecutionProviderInstance( } } } + auto p = onnxruntime::CreateExecutionProviderFactory_OpenVINO(¶ms)->CreateProvider(); // Reset global variables config to avoid it being accidentally passed on to the next session openvino_device_type.clear(); - return onnxruntime::CreateExecutionProviderFactory_OpenVINO(¶ms)->CreateProvider(); + return p; #endif } else if (type == kNupharExecutionProvider) { #if USE_NUPHAR