Fix a bug for Openvino Python binding (#9130)

This commit is contained in:
Changming Sun 2021-09-20 20:39:17 -07:00 committed by GitHub
parent dae37dc946
commit 02b9213736
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -576,10 +576,9 @@ std::unique_ptr<IExecutionProvider> CreateExecutionProviderInstance(
}
}
}
return onnxruntime::CreateExecutionProviderFactory_OpenVINO(&params)->CreateProvider();
// Reset global variables config to avoid it being accidentally passed on to the next session
openvino_device_type.clear();
return onnxruntime::CreateExecutionProviderFactory_OpenVINO(&params)->CreateProvider();
#endif
} else if (type == kNupharExecutionProvider) {
#if USE_NUPHAR