mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 23:03:02 +08:00
fix: Update acronyms for MTL
This change adds new product config device acronyms available for mtl and changes enum names. Signed-off-by: Daria Hinz <daria.hinz@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
d344945625
commit
865154cdc4
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2022 Intel Corporation
|
||||
* Copyright (C) 2022-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -16,7 +16,7 @@ INSTANTIATE_TEST_CASE_P(ProductConfigHwInfoMtlTests,
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(ProductConfigHwInfoMtlTests,
|
||||
ProductConfigHwInfoBadRevisionTests,
|
||||
::testing::Combine(::testing::Values(AOT::XE_LPG_MD_A0, AOT::XE_LPG_LG_A0),
|
||||
::testing::Combine(::testing::Values(AOT::MTL_M_A0, AOT::MTL_P_A0),
|
||||
::testing::Values(IGFX_METEORLAKE)));
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -18,5 +18,24 @@ using ProductConfigHelperMtlTests = ::testing::Test;
|
||||
MTLTEST_F(ProductConfigHelperMtlTests, givenXeLpgReleaseWhenSearchForDeviceAcronymThenObjectIsFound) {
|
||||
auto productConfigHelper = std::make_unique<ProductConfigHelper>();
|
||||
auto aotInfos = productConfigHelper->getDeviceAotInfo();
|
||||
EXPECT_FALSE(std::any_of(aotInfos.begin(), aotInfos.end(), ProductConfigHelper::findDeviceAcronymForRelease(AOT::XE_LPG_RELEASE)));
|
||||
EXPECT_TRUE(std::any_of(aotInfos.begin(), aotInfos.end(), ProductConfigHelper::findDeviceAcronymForRelease(AOT::XE_LPG_RELEASE)));
|
||||
}
|
||||
|
||||
MTLTEST_F(ProductConfigHelperMtlTests, givenVariousVariantsOfXeLpgAcronymsWhenGetReleaseThenCorrectValueIsReturned) {
|
||||
std::vector<std::string> acronymsVariants = {"xe_lpg_core", "xe_lpg", "xelpg", "XeLpg"};
|
||||
for (auto &acronym : acronymsVariants) {
|
||||
ProductConfigHelper::adjustDeviceName(acronym);
|
||||
auto ret = ProductConfigHelper::getReleaseForAcronym(acronym);
|
||||
EXPECT_EQ(ret, AOT::XE_LPG_RELEASE);
|
||||
}
|
||||
}
|
||||
|
||||
MTLTEST_F(ProductConfigHelperMtlTests, givenMtlConfigsWhenSearchForDeviceAcronymsThenObjectIsFound) {
|
||||
auto productConfigHelper = std::make_unique<ProductConfigHelper>();
|
||||
std::vector<AOT::PRODUCT_CONFIG> mtlConfigs = {AOT::MTL_M_B0, AOT::MTL_P_B0};
|
||||
auto deviceAcronyms = productConfigHelper->getDeviceAcronyms();
|
||||
for (const auto &config : mtlConfigs) {
|
||||
auto acronym = productConfigHelper->getAcronymForProductConfig(config);
|
||||
EXPECT_NE(std::find(deviceAcronyms.begin(), deviceAcronyms.end(), acronym), deviceAcronyms.end());
|
||||
}
|
||||
}
|
||||
@@ -206,47 +206,47 @@ MTLTEST_F(MtlProductHelper, givenMtlLpgWhenIsBFloat16ConversionSupportedIsCalled
|
||||
EXPECT_FALSE(compilerProductHelper.isBFloat16ConversionSupported(hwInfo));
|
||||
}
|
||||
|
||||
MTLTEST_F(MtlProductHelper, givenMtlLpgMdA0WhengetProductMaxPreferredSlmSizeThen96KbValueReturned) {
|
||||
MTLTEST_F(MtlProductHelper, givenMtlMA0WhengetProductMaxPreferredSlmSizeThen96KbValueReturned) {
|
||||
using PREFERRED_SLM_ALLOCATION_SIZE = typename XeHpgCoreFamily::INTERFACE_DESCRIPTOR_DATA::PREFERRED_SLM_ALLOCATION_SIZE;
|
||||
PREFERRED_SLM_ALLOCATION_SIZE preferredEnumValue = PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_0K;
|
||||
auto hwInfo = *defaultHwInfo.get();
|
||||
HardwareIpVersion aotConfig = {0};
|
||||
aotConfig.value = AOT::XE_LPG_MD_A0;
|
||||
aotConfig.value = AOT::MTL_M_A0;
|
||||
auto &compilerProductHelper = this->executionEnvironment->rootDeviceEnvironments[0]->getHelper<CompilerProductHelper>();
|
||||
compilerProductHelper.setProductConfigForHwInfo(hwInfo, aotConfig);
|
||||
preferredEnumValue = static_cast<PREFERRED_SLM_ALLOCATION_SIZE>(productHelper->getProductMaxPreferredSlmSize(hwInfo, preferredEnumValue));
|
||||
EXPECT_EQ(preferredEnumValue, PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_96K);
|
||||
}
|
||||
|
||||
MTLTEST_F(MtlProductHelper, givenMtlLpgLgA0WhengetProductMaxPreferredSlmSizeThen96KbValueReturned) {
|
||||
MTLTEST_F(MtlProductHelper, givenMtlPA0WhengetProductMaxPreferredSlmSizeThen96KbValueReturned) {
|
||||
using PREFERRED_SLM_ALLOCATION_SIZE = typename XeHpgCoreFamily::INTERFACE_DESCRIPTOR_DATA::PREFERRED_SLM_ALLOCATION_SIZE;
|
||||
PREFERRED_SLM_ALLOCATION_SIZE preferredEnumValue = PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_0K;
|
||||
auto hwInfo = *defaultHwInfo.get();
|
||||
HardwareIpVersion aotConfig = {0};
|
||||
aotConfig.value = AOT::XE_LPG_LG_A0;
|
||||
aotConfig.value = AOT::MTL_P_A0;
|
||||
auto &compilerProductHelper = this->executionEnvironment->rootDeviceEnvironments[0]->getHelper<CompilerProductHelper>();
|
||||
compilerProductHelper.setProductConfigForHwInfo(hwInfo, aotConfig);
|
||||
preferredEnumValue = static_cast<PREFERRED_SLM_ALLOCATION_SIZE>(productHelper->getProductMaxPreferredSlmSize(hwInfo, preferredEnumValue));
|
||||
EXPECT_EQ(preferredEnumValue, PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_96K);
|
||||
}
|
||||
MTLTEST_F(MtlProductHelper, givenMtlLpgMdB0WhengetProductMaxPreferredSlmSizeThenPassedValueReturned) {
|
||||
MTLTEST_F(MtlProductHelper, givenMtlMB0WhengetProductMaxPreferredSlmSizeThenPassedValueReturned) {
|
||||
using PREFERRED_SLM_ALLOCATION_SIZE = typename XeHpgCoreFamily::INTERFACE_DESCRIPTOR_DATA::PREFERRED_SLM_ALLOCATION_SIZE;
|
||||
PREFERRED_SLM_ALLOCATION_SIZE preferredEnumValue = PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_0K;
|
||||
auto hwInfo = *defaultHwInfo.get();
|
||||
HardwareIpVersion aotConfig = {0};
|
||||
aotConfig.value = AOT::XE_LPG_MD_B0;
|
||||
aotConfig.value = AOT::MTL_M_B0;
|
||||
auto &compilerProductHelper = this->executionEnvironment->rootDeviceEnvironments[0]->getHelper<CompilerProductHelper>();
|
||||
compilerProductHelper.setProductConfigForHwInfo(hwInfo, aotConfig);
|
||||
preferredEnumValue = static_cast<PREFERRED_SLM_ALLOCATION_SIZE>(productHelper->getProductMaxPreferredSlmSize(hwInfo, preferredEnumValue));
|
||||
EXPECT_EQ(preferredEnumValue, PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_0K);
|
||||
}
|
||||
|
||||
MTLTEST_F(MtlProductHelper, givenMtlLpgLgB0WhengetProductMaxPreferredSlmSizeThenPassedValueReturned) {
|
||||
MTLTEST_F(MtlProductHelper, givenMtlPB0WhengetProductMaxPreferredSlmSizeThenPassedValueReturned) {
|
||||
using PREFERRED_SLM_ALLOCATION_SIZE = typename XeHpgCoreFamily::INTERFACE_DESCRIPTOR_DATA::PREFERRED_SLM_ALLOCATION_SIZE;
|
||||
PREFERRED_SLM_ALLOCATION_SIZE preferredEnumValue = PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_0K;
|
||||
auto hwInfo = *defaultHwInfo.get();
|
||||
HardwareIpVersion aotConfig = {0};
|
||||
aotConfig.value = AOT::XE_LPG_LG_B0;
|
||||
aotConfig.value = AOT::MTL_P_B0;
|
||||
auto &compilerProductHelper = this->executionEnvironment->rootDeviceEnvironments[0]->getHelper<CompilerProductHelper>();
|
||||
compilerProductHelper.setProductConfigForHwInfo(hwInfo, aotConfig);
|
||||
preferredEnumValue = static_cast<PREFERRED_SLM_ALLOCATION_SIZE>(productHelper->getProductMaxPreferredSlmSize(hwInfo, preferredEnumValue));
|
||||
|
||||
Reference in New Issue
Block a user