mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-19 16:24:18 +08:00
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:
committed by
Compute-Runtime-Automation
parent
f965f0e4fd
commit
01c36a38c6
@@ -31,7 +31,7 @@ components:
|
|||||||
branch: master
|
branch: master
|
||||||
dest_dir: infra
|
dest_dir: infra
|
||||||
fetch_tags: true
|
fetch_tags: true
|
||||||
revision: v6041
|
revision: v6049
|
||||||
type: git
|
type: git
|
||||||
internal:
|
internal:
|
||||||
branch: master
|
branch: master
|
||||||
|
|||||||
@@ -309,6 +309,12 @@ void ProductConfigHelper::initialize() {
|
|||||||
device.rtlIdAcronyms.push_back(NEO::ConstStringRef(acronym));
|
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()) {
|
if (rtlIdAcronymIt != AOT::rtlIdAcronyms.end()) {
|
||||||
return rtlIdAcronymIt->second;
|
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;
|
return AOT::UNKNOWN_ISA;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -268,6 +268,12 @@ TEST_F(AotDeviceInfoTests, givenProductAcronymWhenHelperSearchForAMatchThenCorre
|
|||||||
EXPECT_LT(0u, numSupportedAcronyms);
|
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) {
|
TEST_F(AotDeviceInfoTests, givenProductIpVersionStringWhenHelperSearchForProductConfigThenCorrectValueIsReturned) {
|
||||||
for (const auto &deviceConfig : AOT::deviceAcronyms) {
|
for (const auto &deviceConfig : AOT::deviceAcronyms) {
|
||||||
if (!productConfigHelper->isSupportedProductConfig(deviceConfig.second)) {
|
if (!productConfigHelper->isSupportedProductConfig(deviceConfig.second)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user