Restore old device id design in ocloc

This change removes some of the logic related to
passing device id as an argument in ocloc introduced in
"Setting default device id for acronym".

Signed-off-by: Daria Hinz <daria.hinz@intel.com>
This commit is contained in:
Daria Hinz
2022-07-19 10:28:41 +02:00
committed by Compute-Runtime-Automation
parent fd9a63f49f
commit 91a97dfaea
10 changed files with 96 additions and 98 deletions

View File

@@ -34,15 +34,6 @@ bool ProductConfigHelper::compareConfigs(DeviceAotInfo deviceAotInfo0, DeviceAot
return deviceAotInfo0.aotConfig.ProductConfig < deviceAotInfo1.aotConfig.ProductConfig;
}
AOT::PRODUCT_CONFIG ProductConfigHelper::getProductConfigForDeviceId(unsigned short deviceId) {
for (const auto &device : deviceAotInfo) {
if (std::find(device.deviceIds->begin(), device.deviceIds->end(), deviceId) != device.deviceIds->end()) {
return static_cast<AOT::PRODUCT_CONFIG>(device.aotConfig.ProductConfig);
}
}
return AOT::UNKNOWN_ISA;
}
std::vector<DeviceAotInfo> &ProductConfigHelper::getDeviceAotInfo() {
return deviceAotInfo;
}
@@ -70,14 +61,6 @@ NEO::ConstStringRef ProductConfigHelper::getAcronymForAFamily(AOT::FAMILY family
return {};
}
const std::string ProductConfigHelper::getAcronymForProductConfig(AOT::PRODUCT_CONFIG config) {
auto it = std::find_if(deviceAotInfo.begin(), deviceAotInfo.end(), findProductConfig(config));
if (it == deviceAotInfo.end()) {
return {};
}
return it->acronyms.empty() ? parseMajorMinorRevisionValue(it->aotConfig) : it->acronyms.front().str();
}
AOT::RELEASE ProductConfigHelper::getReleaseForAcronym(const std::string &device) {
auto it = std::find_if(AOT::releaseAcronyms.begin(), AOT::releaseAcronyms.end(), findMapAcronymWithoutDash(device));
if (it == AOT::releaseAcronyms.end())

View File

@@ -105,8 +105,6 @@ struct ProductConfigHelper {
bool isRelease(const std::string &device);
bool isProductConfig(const std::string &device);
AOT::PRODUCT_CONFIG getProductConfigForDeviceId(unsigned short deviceId);
const std::string getAcronymForProductConfig(AOT::PRODUCT_CONFIG config);
std::vector<DeviceAotInfo> &getDeviceAotInfo();
std::vector<NEO::ConstStringRef> getRepresentativeProductAcronyms();
std::vector<NEO::ConstStringRef> getReleasesAcronyms();