Fix the AUTO loadnetwork failure triggered by AUTO:-xxx (#15747)

* Check if the device is supported when AUTO retrieves the device list based on the ov::device::priorities.

* Update the logic to handle the situation like -d AUTO:-CPU to benchmark APP.

* Remove MYRIAD and add NVIDIA for AUTO supported devices.

---------

Co-authored-by: Chen Peter <peter.chen@intel.com>
Co-authored-by: Shen, Wanglei <wanglei.shen@intel.com>
This commit is contained in:
Wang, Yang
2023-03-02 13:16:12 +08:00
committed by GitHub
parent c09b2ff8b1
commit 99a1800901
5 changed files with 19 additions and 9 deletions

View File

@@ -828,9 +828,6 @@ std::string MultiDeviceInferencePlugin::GetDeviceList(const std::map<std::string
continue;
allDevices += device + ",";
}
// remove the last ',' if exist
if (allDevices.back() == ',')
allDevices.pop_back();
} else {
auto priorities = deviceListConfig->second;
// parsing the string and splitting the comma-separated tokens
@@ -887,12 +884,17 @@ std::string MultiDeviceInferencePlugin::GetDeviceList(const std::map<std::string
updateDeviceVec(iter);
}
for (auto&& device : deviceVec) {
allDevices += device;
allDevices += ((device == deviceVec[deviceVec.size()-1]) ? "" : ",");
if (!_pluginConfig.isSupportedDevice(device))
continue;
allDevices += device + ",";
}
}
}
// remove the last ',' if exist
if (allDevices.back() == ',')
allDevices.pop_back();
if (allDevices.empty()) {
IE_THROW() << "Please, check environment due to no supported devices can be used";
}

View File

@@ -303,6 +303,6 @@ struct PluginConfig {
std::map<std::string, std::string> _passThroughConfig;
std::map<std::string, std::string> _keyConfigMap;
const std::set<std::string> _availableDevices =
{"AUTO", "CPU", "GPU", "TEMPLATE", "MYRIAD", "VPUX", "MULTI", "HETERO", "mock"};
{"AUTO", "CPU", "GPU", "TEMPLATE", "NVIDIA", "VPUX", "MULTI", "HETERO", "mock"};
};
} // namespace MultiDevicePlugin