fix: Improved reporting of incorrect device

We want to report unrecognized device only after verifying
all possible variants, including deprecated ones.

Signed-off-by: Daria Hinz <daria.hinz@intel.com>
Related-To: NEO-7903
This commit is contained in:
Daria Hinz
2023-04-21 10:58:23 +00:00
committed by Compute-Runtime-Automation
parent 1a1bd04d4a
commit a2bc1d82e4
2 changed files with 14 additions and 8 deletions

View File

@@ -473,7 +473,6 @@ int OfflineCompiler::initHardwareInfoForProductConfig(std::string deviceName) {
productConfig = argHelper->productConfigHelper->getProductConfigFromDeviceName(deviceName);
}
if (productConfig == AOT::UNKNOWN_ISA) {
argHelper->printf("Could not determine device target: %s.\n", deviceName.c_str());
return INVALID_DEVICE;
}
@@ -499,7 +498,9 @@ int OfflineCompiler::initHardwareInfo(std::string deviceName) {
}
retVal = initHardwareInfoForDeprecatedAcronyms(deviceName, std::move(compilerProductHelper));
if (retVal != SUCCESS) {
argHelper->printf("Could not determine device target: %s.\n", deviceName.c_str());
}
return retVal;
}