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:
parent
f965f0e4fd
commit
01c36a38c6
|
@ -31,7 +31,7 @@ components:
|
|||
branch: master
|
||||
dest_dir: infra
|
||||
fetch_tags: true
|
||||
revision: v6041
|
||||
revision: v6049
|
||||
type: git
|
||||
internal:
|
||||
branch: master
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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)) {
|
||||
|
|
Loading…
Reference in New Issue