limit gpu compiling threads (#10349)

* limit gpu compiling threads

Signed-off-by: fishbell <bell.song@intel.com>

* switch to 2.0

Signed-off-by: fishbell <bell.song@intel.com>

* clang format

Signed-off-by: fishbell <bell.song@intel.com>
This commit is contained in:
bell
2022-02-15 13:52:49 +08:00
committed by GitHub
parent c3c52bae63
commit f75e50cc88
5 changed files with 32 additions and 1 deletions

View File

@@ -112,7 +112,8 @@ std::vector<std::string> parse_devices(const std::string& device_string) {
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 == "MULTI") || (comma_separated_devices == "HETERO"))
if ((comma_separated_devices == "AUTO") || (comma_separated_devices == "MULTI") ||
(comma_separated_devices == "HETERO"))
return std::vector<std::string>();
auto devices = split(comma_separated_devices, ',');
return devices;