Fix issues on Windows for Vitis AI (#15810)

### Description
Fix two errors that is only encountered on windows


### Motivation and Context
For onnxruntime::VitisAIProviderFactoryCreator::Create, it would cause
the compile error.
For if (it == provider_options_map.end()), it would cause an error but
execute as normal

Co-authored-by: Zhang <yueqingz@amd.com>
This commit is contained in:
BoarQing 2023-05-05 05:42:19 +08:00 committed by GitHub
parent 412d05a1d2
commit 272aab4afa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -50,7 +50,7 @@ void addGlobalSchemaFunctions(pybind11::module& m) {
onnxruntime::MIGraphXProviderFactoryCreator::Create(0),
#endif
#ifdef USE_VITISAI
onnxruntime::VitisAIProviderFactoryCreator::Create(),
onnxruntime::VitisAIProviderFactoryCreator::Create(ProviderOptions{}),
#endif
#ifdef USE_ACL
onnxruntime::ACLProviderFactoryCreator::Create(0),

View file

@ -762,7 +762,7 @@ std::unique_ptr<IExecutionProvider> CreateExecutionProviderInstance(
} else if (type == kVitisAIExecutionProvider) {
#if USE_VITISAI
const auto it = provider_options_map.find(type);
if (it != provider_options_map.end()) {
if (it == provider_options_map.end()) {
LOGS_DEFAULT(FATAL) << "cannot find provider options for VitisAIExecutionProvider";
}
const auto& vitis_option_map = it->second;