mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-07 12:42:54 +08:00
Revert "fix: add fallback in setting hw ip version for MTL"
This reverts commit fbac74e3c4.
Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
e75499de45
commit
856e9f00f3
@@ -26,49 +26,6 @@ uint32_t CompilerProductHelperHw<gfxProduct>::getDefaultHwIpVersion() const {
|
||||
return AOT::MTL_M_A0;
|
||||
}
|
||||
|
||||
template <>
|
||||
uint32_t CompilerProductHelperHw<gfxProduct>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
|
||||
if (hwInfo.ipVersion.value) {
|
||||
return hwInfo.ipVersion.value;
|
||||
}
|
||||
switch (hwInfo.platform.usDeviceID) {
|
||||
case 0x7D40:
|
||||
case 0x7D45: {
|
||||
switch (hwInfo.platform.usRevId) {
|
||||
case 0x0:
|
||||
case 0x2:
|
||||
return AOT::MTL_M_A0;
|
||||
case 0x3:
|
||||
case 0x8:
|
||||
return AOT::MTL_M_B0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 0x7D55:
|
||||
case 0X7DD5: {
|
||||
switch (hwInfo.platform.usRevId) {
|
||||
case 0x0:
|
||||
case 0x2:
|
||||
return AOT::MTL_P_A0;
|
||||
case 0x3:
|
||||
case 0x8:
|
||||
return AOT::MTL_P_B0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 0x7D60: {
|
||||
switch (hwInfo.platform.usRevId) {
|
||||
case 0x0:
|
||||
return AOT::MTL_M_A0;
|
||||
case 0x2:
|
||||
return AOT::MTL_M_B0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return getDefaultHwIpVersion();
|
||||
}
|
||||
|
||||
static EnableCompilerProductHelper<gfxProduct> enableCompilerProductHelperMTL;
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -269,65 +269,3 @@ MTLTEST_F(ProductHelperTestMtl, givenMtlWhenCheckPreferredAllocationMethodThenAl
|
||||
EXPECT_TRUE(preferredAllocationMethod.has_value());
|
||||
EXPECT_EQ(GfxMemoryAllocationMethod::AllocateByKmd, preferredAllocationMethod.value());
|
||||
}
|
||||
|
||||
MTLTEST_F(ProductHelperTestMtl, givenMtlWithoutHwIpVersionInHwInfoWhenGettingIpVersionThenCorrectValueIsReturnedBasedOnDeviceIdAndRevId) {
|
||||
const auto &compilerProductHelper = getHelper<CompilerProductHelper>();
|
||||
|
||||
auto hwInfo = *defaultHwInfo;
|
||||
hwInfo.ipVersion = {};
|
||||
|
||||
auto mtlMDeviceIds = {0x7D40, 0x7D45};
|
||||
auto mtlPDeviceIds = {0x7D55, 0X7DD5};
|
||||
|
||||
hwInfo.platform.usDeviceID = 0x7D60;
|
||||
hwInfo.platform.usRevId = 0;
|
||||
|
||||
EXPECT_EQ(AOT::MTL_M_A0, compilerProductHelper.getHwIpVersion(hwInfo));
|
||||
|
||||
hwInfo.platform.usRevId = 2;
|
||||
|
||||
EXPECT_EQ(AOT::MTL_M_B0, compilerProductHelper.getHwIpVersion(hwInfo));
|
||||
|
||||
hwInfo.platform.usRevId = 0xdead;
|
||||
|
||||
EXPECT_EQ(compilerProductHelper.getDefaultHwIpVersion(), compilerProductHelper.getHwIpVersion(hwInfo));
|
||||
|
||||
for (auto &deviceId : mtlMDeviceIds) {
|
||||
hwInfo.platform.usDeviceID = deviceId;
|
||||
for (auto &revision : {0, 2}) {
|
||||
hwInfo.platform.usRevId = revision;
|
||||
|
||||
EXPECT_EQ(AOT::MTL_M_A0, compilerProductHelper.getHwIpVersion(hwInfo));
|
||||
}
|
||||
for (auto &revision : {3, 8}) {
|
||||
hwInfo.platform.usRevId = revision;
|
||||
|
||||
EXPECT_EQ(AOT::MTL_M_B0, compilerProductHelper.getHwIpVersion(hwInfo));
|
||||
}
|
||||
hwInfo.platform.usRevId = 0xdead;
|
||||
|
||||
EXPECT_EQ(compilerProductHelper.getDefaultHwIpVersion(), compilerProductHelper.getHwIpVersion(hwInfo));
|
||||
}
|
||||
|
||||
for (auto &deviceId : mtlPDeviceIds) {
|
||||
hwInfo.platform.usDeviceID = deviceId;
|
||||
for (auto &revision : {0, 2}) {
|
||||
hwInfo.platform.usRevId = revision;
|
||||
|
||||
EXPECT_EQ(AOT::MTL_P_A0, compilerProductHelper.getHwIpVersion(hwInfo));
|
||||
}
|
||||
for (auto &revision : {3, 8}) {
|
||||
hwInfo.platform.usRevId = revision;
|
||||
|
||||
EXPECT_EQ(AOT::MTL_P_B0, compilerProductHelper.getHwIpVersion(hwInfo));
|
||||
}
|
||||
hwInfo.platform.usRevId = 0xdead;
|
||||
|
||||
EXPECT_EQ(compilerProductHelper.getDefaultHwIpVersion(), compilerProductHelper.getHwIpVersion(hwInfo));
|
||||
}
|
||||
|
||||
hwInfo.platform.usDeviceID = 0;
|
||||
hwInfo.platform.usRevId = 0xdead;
|
||||
|
||||
EXPECT_EQ(compilerProductHelper.getDefaultHwIpVersion(), compilerProductHelper.getHwIpVersion(hwInfo));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user