diff --git a/onnxruntime/python/onnxruntime_pybind_state.cc b/onnxruntime/python/onnxruntime_pybind_state.cc index 2a713fad30..96f4882e82 100644 --- a/onnxruntime/python/onnxruntime_pybind_state.cc +++ b/onnxruntime/python/onnxruntime_pybind_state.cc @@ -576,10 +576,9 @@ std::unique_ptr CreateExecutionProviderInstance( } } } - - return 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(); #endif } else if (type == kNupharExecutionProvider) { #if USE_NUPHAR