mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-20 00:24:58 +08:00
Ocloc: Support for various variants of acronyms
In addition to supporting the official -device acronyms (e.g. xe-hpg), support for shorter and deprecated acronyms has also been added. An example of supported variances: - xehpg - xe_hpg - xe_hpg_core Signed-off-by: Daria Hinz <daria.hinz@intel.com> Related-To: NEO-6910
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
9996228281
commit
2637ae5816
@@ -568,6 +568,28 @@ TEST_F(MockOfflineCompilerTests, givenProductConfigValueWhenInitHwInfoThenBaseHa
|
||||
EXPECT_NE(mockOfflineCompiler.hwInfo.gtSystemInfo.MaxSubSlicesSupported, 0u);
|
||||
}
|
||||
|
||||
TEST_F(MockOfflineCompilerTests, givenDeprecatedAcronymsWithRevisionWhenInitHwInfoThenValuesAreSetAndSuccessIsReturned) {
|
||||
MockOfflineCompiler mockOfflineCompiler;
|
||||
auto deprecatedAcronyms = mockOfflineCompiler.getDeprecatedDevicesTypes();
|
||||
if (deprecatedAcronyms.empty()) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
auto acronyms = CompilerOptions::tokenize(deprecatedAcronyms, ',');
|
||||
|
||||
for (const auto &deprecatedAcronym : acronyms) {
|
||||
if (deprecatedAcronym.contains(" ")) {
|
||||
auto name = deprecatedAcronym.str();
|
||||
auto space = name.find(" ");
|
||||
mockOfflineCompiler.deviceName = name.substr(++space, name.size());
|
||||
} else {
|
||||
mockOfflineCompiler.deviceName = deprecatedAcronym.str();
|
||||
}
|
||||
mockOfflineCompiler.revisionId = 0x3;
|
||||
EXPECT_EQ(mockOfflineCompiler.initHardwareInfo(mockOfflineCompiler.deviceName), OclocErrorCode::SUCCESS);
|
||||
EXPECT_EQ(mockOfflineCompiler.hwInfo.platform.usRevId, mockOfflineCompiler.revisionId);
|
||||
}
|
||||
}
|
||||
|
||||
HWTEST2_F(MockOfflineCompilerTests, givenProductConfigValueWhenInitHwInfoThenMaxDualSubSlicesSupportedIsSet, IsAtLeastGen12lp) {
|
||||
MockOfflineCompiler mockOfflineCompiler;
|
||||
auto allEnabledDeviceConfigs = mockOfflineCompiler.argHelper->getAllSupportedDeviceConfigs();
|
||||
|
||||
Reference in New Issue
Block a user