feature: add support for generic id acronyms in ocloc

Related-To: NEO-11568
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski 2024-06-06 09:30:04 +00:00 committed by Compute-Runtime-Automation
parent f965f0e4fd
commit 01c36a38c6
3 changed files with 18 additions and 1 deletions

View File

@ -31,7 +31,7 @@ components:
branch: master
dest_dir: infra
fetch_tags: true
revision: v6041
revision: v6049
type: git
internal:
branch: master

View File

@ -309,6 +309,12 @@ void ProductConfigHelper::initialize() {
device.rtlIdAcronyms.push_back(NEO::ConstStringRef(acronym));
}
}
for (const auto &[acronym, value] : AOT::genericIdAcronyms) {
if (value == device.aotConfig.value) {
device.deviceAcronyms.push_back(NEO::ConstStringRef(acronym));
}
}
}
}
@ -322,5 +328,10 @@ AOT::PRODUCT_CONFIG ProductConfigHelper::getProductConfigFromAcronym(const std::
if (rtlIdAcronymIt != AOT::rtlIdAcronyms.end()) {
return rtlIdAcronymIt->second;
}
auto genericIdAcronymIt = std::find_if(AOT::genericIdAcronyms.begin(), AOT::genericIdAcronyms.end(), findMapAcronymWithoutDash(device));
if (genericIdAcronymIt != AOT::genericIdAcronyms.end()) {
return genericIdAcronymIt->second;
}
return AOT::UNKNOWN_ISA;
}

View File

@ -268,6 +268,12 @@ TEST_F(AotDeviceInfoTests, givenProductAcronymWhenHelperSearchForAMatchThenCorre
EXPECT_LT(0u, numSupportedAcronyms);
}
TEST_F(AotDeviceInfoTests, givenGenericAcronymWhenHelperSearchForAMatchThenCorrespondingValueIsReturned) {
for (const auto &[acronym, value] : AOT::genericIdAcronyms) {
EXPECT_EQ(productConfigHelper->getProductConfigFromDeviceName(acronym), value);
}
}
TEST_F(AotDeviceInfoTests, givenProductIpVersionStringWhenHelperSearchForProductConfigThenCorrectValueIsReturned) {
for (const auto &deviceConfig : AOT::deviceAcronyms) {
if (!productConfigHelper->isSupportedProductConfig(deviceConfig.second)) {