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:
Daria Hinz
2023-03-20 10:49:31 +00:00
committed by Compute-Runtime-Automation
parent d344945625
commit 865154cdc4
8 changed files with 60 additions and 33 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2022 Intel Corporation
* Copyright (C) 2021-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -19,10 +19,10 @@ DEVICE_CONFIG(PVC_XT_C0, PvcHwConfig, pvcXtDeviceIds, XE_FAMILY, XE_HPC_RELEASE)
#ifdef SUPPORT_XE_HPG_CORE
#ifdef SUPPORT_MTL
DEVICE_CONFIG(XE_LPG_MD_A0, MtlHwConfig, mtlDeviceIds, XE_FAMILY, XE_LPG_RELEASE)
DEVICE_CONFIG(XE_LPG_MD_B0, MtlHwConfig, mtlDeviceIds, XE_FAMILY, XE_LPG_RELEASE)
DEVICE_CONFIG(XE_LPG_LG_A0, MtlHwConfig, mtlDeviceIds, XE_FAMILY, XE_LPG_RELEASE)
DEVICE_CONFIG(XE_LPG_LG_B0, MtlHwConfig, mtlDeviceIds, XE_FAMILY, XE_LPG_RELEASE)
DEVICE_CONFIG(MTL_M_A0, MtlHwConfig, mtlDeviceIds, XE_FAMILY, XE_LPG_RELEASE)
DEVICE_CONFIG(MTL_M_B0, MtlHwConfig, mtlDeviceIds, XE_FAMILY, XE_LPG_RELEASE)
DEVICE_CONFIG(MTL_P_A0, MtlHwConfig, mtlDeviceIds, XE_FAMILY, XE_LPG_RELEASE)
DEVICE_CONFIG(MTL_P_B0, MtlHwConfig, mtlDeviceIds, XE_FAMILY, XE_LPG_RELEASE)
#endif
#ifdef SUPPORT_DG2
DEVICE_CONFIG(DG2_G10_A0, Dg2HwConfig, dg2G10DeviceIds, XE_FAMILY, XE_HPG_RELEASE)

View File

@@ -152,7 +152,7 @@ const HardwareInfo MtlHwConfig::hwInfo = {
&MTL::workaroundTable,
&MtlHwConfig::gtSystemInfo,
MTL::capabilityTable,
AOT::XE_LPG_MD_A0};
AOT::MTL_M_A0};
GT_SYSTEM_INFO MtlHwConfig::gtSystemInfo = {0};
void MtlHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {

View File

@@ -47,18 +47,18 @@ AOT::PRODUCT_CONFIG ProductHelperHw<gfxProduct>::getProductConfigFromHwInfo(cons
case 70:
switch (hwInfo.ipVersion.revision) {
case 0:
return AOT::XE_LPG_MD_A0;
return AOT::MTL_M_A0;
case 4:
return AOT::XE_LPG_MD_B0;
return AOT::MTL_M_B0;
default:
return AOT::UNKNOWN_ISA;
}
case 71:
switch (hwInfo.ipVersion.revision) {
case 0:
return AOT::XE_LPG_LG_A0;
return AOT::MTL_P_A0;
case 4:
return AOT::XE_LPG_LG_B0;
return AOT::MTL_P_B0;
default:
return AOT::UNKNOWN_ISA;
}
@@ -80,7 +80,7 @@ uint32_t ProductHelperHw<gfxProduct>::getSteppingFromHwRevId(const HardwareInfo
template <>
std::pair<bool, bool> ProductHelperHw<gfxProduct>::isPipeControlPriorToNonPipelinedStateCommandsWARequired(const HardwareInfo &hwInfo, bool isRcs) const {
auto isBasicWARequired = getProductConfigFromHwInfo(hwInfo) == AOT::XE_LPG_MD_A0 || getProductConfigFromHwInfo(hwInfo) == AOT::XE_LPG_LG_A0;
auto isBasicWARequired = getProductConfigFromHwInfo(hwInfo) == AOT::MTL_M_A0 || getProductConfigFromHwInfo(hwInfo) == AOT::MTL_P_A0;
auto isExtendedWARequired = false;
return {isBasicWARequired, isExtendedWARequired};
@@ -123,7 +123,7 @@ uint64_t ProductHelperHw<gfxProduct>::overridePatIndex(AllocationType allocation
template <>
int ProductHelperHw<gfxProduct>::getProductMaxPreferredSlmSize(const HardwareInfo &hwInfo, int preferredEnumValue) const {
using PREFERRED_SLM_ALLOCATION_SIZE = typename XeHpgCoreFamily::INTERFACE_DESCRIPTOR_DATA::PREFERRED_SLM_ALLOCATION_SIZE;
if (getProductConfigFromHwInfo(hwInfo) == AOT::XE_LPG_MD_A0 || getProductConfigFromHwInfo(hwInfo) == AOT::XE_LPG_LG_A0) {
if (getProductConfigFromHwInfo(hwInfo) == AOT::MTL_M_A0 || getProductConfigFromHwInfo(hwInfo) == AOT::MTL_P_A0) {
return static_cast<int>(PREFERRED_SLM_ALLOCATION_SIZE::PREFERRED_SLM_ALLOCATION_SIZE_96K);
} else {
return preferredEnumValue;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022 Intel Corporation
* Copyright (C) 2022-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -10,8 +10,8 @@
namespace AOT_MTL {
inline constexpr AOT::PRODUCT_CONFIG productConfigs[] = {
AOT::XE_LPG_MD_A0,
AOT::XE_LPG_MD_B0,
AOT::XE_LPG_LG_A0,
AOT::XE_LPG_LG_B0};
AOT::MTL_M_A0,
AOT::MTL_M_B0,
AOT::MTL_P_A0,
AOT::MTL_P_B0};
}

View File

@@ -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

View File

@@ -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());
}
}

View File

@@ -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));

View File

@@ -48,10 +48,10 @@ enum PRODUCT_CONFIG : uint32_t {
PVC_XT_B0 = 0x030f0005,
PVC_XT_B1 = 0x030f0006,
PVC_XT_C0 = 0x030f0007,
XE_LPG_MD_A0 = 0x03118000,
XE_LPG_MD_B0 = 0x03118004,
XE_LPG_LG_A0 = 0x0311c000,
XE_LPG_LG_B0 = 0x0311c004,
MTL_M_A0 = 0x03118000,
MTL_M_B0 = 0x03118004,
MTL_P_A0 = 0x0311c000,
MTL_P_B0 = 0x0311c004,
CONFIG_MAX_PLATFORM,
};
@@ -112,12 +112,15 @@ inline const std::map<std::string, RELEASE> releaseAcronyms = {
#ifdef SUPPORT_XE_HP_CORE
{"xe-hp", XE_HP_RELEASE},
#endif
#ifdef SUPPORT_XE_HPG_CORE
#if defined(SUPPORT_XE_HPG_CORE) && defined(SUPPORT_DG2)
{"xe-hpg", XE_HPG_RELEASE},
#endif
#ifdef SUPPORT_XE_HPC_CORE
{"xe-hpc", XE_HPC_RELEASE},
#endif
#if defined(SUPPORT_XE_HPG_CORE) && defined(SUPPORT_MTL)
{"xe-lpg", XE_LPG_RELEASE},
#endif
};
inline const std::map<std::string, AOT::PRODUCT_CONFIG> deviceAcronyms = {
@@ -185,5 +188,10 @@ inline const std::map<std::string, AOT::PRODUCT_CONFIG> deviceAcronyms = {
{"pvc-sdv", PVC_XL_A0P},
{"pvc", PVC_XT_C0},
#endif
#ifdef SUPPORT_MTL
{"mtl-s", MTL_M_B0},
{"mtl-m", MTL_M_B0},
{"mtl-p", MTL_P_B0},
#endif
};
} // namespace AOT