[CVS-78727] bug fix for -d AUTO:CPU,GPU the return device should be AUTO only (#10417)
Signed-off-by: xuejun <xuejun.zhai@intel.com>
This commit is contained in:
parent
17311c46b3
commit
2ac15eae3d
@ -402,6 +402,8 @@ int main(int argc, char* argv[]) {
|
||||
setThroughputStreams();
|
||||
} else if (device.find("GNA") != std::string::npos) {
|
||||
set_infer_precision();
|
||||
} else if (device.find("AUTO") != std::string::npos) {
|
||||
device_nstreams.erase(device);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -109,12 +109,17 @@ std::vector<std::string> parse_devices(const std::string& device_string) {
|
||||
std::string comma_separated_devices = device_string;
|
||||
auto colon = comma_separated_devices.find(":");
|
||||
if (colon != std::string::npos) {
|
||||
if (comma_separated_devices.substr(0, colon) == "AUTO") {
|
||||
std::vector<std::string> result;
|
||||
result.push_back("AUTO");
|
||||
return result;
|
||||
}
|
||||
auto bracket = comma_separated_devices.find("("); // e.g. in BATCH:GPU(4)
|
||||
comma_separated_devices = comma_separated_devices.substr(colon + 1, bracket - colon - 1);
|
||||
}
|
||||
if ((comma_separated_devices == "AUTO") || (comma_separated_devices == "MULTI") ||
|
||||
(comma_separated_devices == "HETERO"))
|
||||
if ((comma_separated_devices == "MULTI") || (comma_separated_devices == "HETERO"))
|
||||
return std::vector<std::string>();
|
||||
|
||||
auto devices = split(comma_separated_devices, ',');
|
||||
return devices;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user