Skip to content

Commit 3c72253

Browse files
Revert "fix: add fallback in setting hw ip version for MTL"
This reverts commit 869f1f3. Signed-off-by: Compute-Runtime-Validation <[email protected]>
1 parent 2f32fe8 commit 3c72253

File tree

2 files changed

+1
-110
lines changed

2 files changed

+1
-110
lines changed

shared/source/xe_hpg_core/enable_compiler_product_helper_mtl.cpp

-45
Original file line numberDiff line numberDiff line change
@@ -11,49 +11,4 @@ constexpr auto gfxProduct = IGFX_METEORLAKE;
1111

1212
#include "shared/source/xe_hpg_core/xe_lpg/compiler_product_helper_xe_lpg.inl"
1313

14-
namespace NEO {
15-
template <>
16-
uint32_t CompilerProductHelperHw<gfxProduct>::getProductConfigFromHwInfo(const HardwareInfo &hwInfo) const {
17-
if (hwInfo.ipVersion.value) {
18-
return hwInfo.ipVersion.value;
19-
}
20-
switch (hwInfo.platform.usDeviceID) {
21-
case 0x7D40:
22-
case 0x7D45: {
23-
switch (hwInfo.platform.usRevId) {
24-
case 0x0:
25-
case 0x2:
26-
return AOT::MTL_M_A0;
27-
case 0x3:
28-
case 0x8:
29-
return AOT::MTL_M_B0;
30-
}
31-
break;
32-
}
33-
case 0x7D55:
34-
case 0X7DD5: {
35-
switch (hwInfo.platform.usRevId) {
36-
case 0x0:
37-
case 0x2:
38-
return AOT::MTL_P_A0;
39-
case 0x3:
40-
case 0x8:
41-
return AOT::MTL_P_B0;
42-
}
43-
break;
44-
}
45-
case 0x7D60: {
46-
switch (hwInfo.platform.usRevId) {
47-
case 0x0:
48-
return AOT::MTL_M_A0;
49-
case 0x2:
50-
return AOT::MTL_M_B0;
51-
}
52-
break;
53-
}
54-
}
55-
return getDefaultHwIpVersion();
56-
}
57-
} // namespace NEO
58-
5914
static NEO::EnableCompilerProductHelper<gfxProduct> enableCompilerProductHelperMTL;

shared/test/unit_test/xe_hpg_core/mtl/product_helper_tests_mtl.cpp

+1-65
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,14 @@
55
*
66
*/
77

8-
#include "shared/source/helpers/compiler_product_helper.h"
98
#include "shared/source/memory_manager/allocation_properties.h"
109
#include "shared/source/memory_manager/allocation_type.h"
1110
#include "shared/source/os_interface/product_helper.h"
1211
#include "shared/source/xe_hpg_core/hw_cmds_mtl.h"
13-
#include "shared/test/common/helpers/default_hw_info.h"
1412
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
1513
#include "shared/test/common/test_macros/test.h"
1614
#include "shared/test/unit_test/os_interface/product_helper_tests.h"
1715

18-
#include "platforms.h"
19-
2016
using namespace NEO;
2117

2218
using MtlProductHelper = ProductHelperTest;
@@ -25,71 +21,11 @@ MTLTEST_F(MtlProductHelper, givenProductHelperWhenCheckDirectSubmissionSupported
2521
EXPECT_TRUE(productHelper->isDirectSubmissionSupported(releaseHelper));
2622
}
2723

28-
MTLTEST_F(MtlProductHelper, givenMtlWithoutHwIpVersionInHwInfoWhenGettingIpVersionThenCorrectValueIsReturnedBasedOnDeviceIdAndRevId) {
29-
auto hwInfo = *defaultHwInfo;
30-
hwInfo.ipVersion = {};
31-
32-
auto mtlMDeviceIds = {0x7D40, 0x7D45};
33-
auto mtlPDeviceIds = {0x7D55, 0X7DD5};
34-
35-
hwInfo.platform.usDeviceID = 0x7D60;
36-
hwInfo.platform.usRevId = 0;
37-
38-
EXPECT_EQ(AOT::MTL_M_A0, compilerProductHelper->getHwIpVersion(hwInfo));
39-
40-
hwInfo.platform.usRevId = 2;
41-
42-
EXPECT_EQ(AOT::MTL_M_B0, compilerProductHelper->getHwIpVersion(hwInfo));
43-
44-
hwInfo.platform.usRevId = 0xdead;
45-
46-
EXPECT_EQ(compilerProductHelper->getDefaultHwIpVersion(), compilerProductHelper->getHwIpVersion(hwInfo));
47-
48-
for (auto &deviceId : mtlMDeviceIds) {
49-
hwInfo.platform.usDeviceID = deviceId;
50-
for (auto &revision : {0, 2}) {
51-
hwInfo.platform.usRevId = revision;
52-
53-
EXPECT_EQ(AOT::MTL_M_A0, compilerProductHelper->getHwIpVersion(hwInfo));
54-
}
55-
for (auto &revision : {3, 8}) {
56-
hwInfo.platform.usRevId = revision;
57-
58-
EXPECT_EQ(AOT::MTL_M_B0, compilerProductHelper->getHwIpVersion(hwInfo));
59-
}
60-
hwInfo.platform.usRevId = 0xdead;
61-
62-
EXPECT_EQ(compilerProductHelper->getDefaultHwIpVersion(), compilerProductHelper->getHwIpVersion(hwInfo));
63-
}
64-
65-
for (auto &deviceId : mtlPDeviceIds) {
66-
hwInfo.platform.usDeviceID = deviceId;
67-
for (auto &revision : {0, 2}) {
68-
hwInfo.platform.usRevId = revision;
69-
70-
EXPECT_EQ(AOT::MTL_P_A0, compilerProductHelper->getHwIpVersion(hwInfo));
71-
}
72-
for (auto &revision : {3, 8}) {
73-
hwInfo.platform.usRevId = revision;
74-
75-
EXPECT_EQ(AOT::MTL_P_B0, compilerProductHelper->getHwIpVersion(hwInfo));
76-
}
77-
hwInfo.platform.usRevId = 0xdead;
78-
79-
EXPECT_EQ(compilerProductHelper->getDefaultHwIpVersion(), compilerProductHelper->getHwIpVersion(hwInfo));
80-
}
81-
82-
hwInfo.platform.usDeviceID = 0;
83-
hwInfo.platform.usRevId = 0xdead;
84-
85-
EXPECT_EQ(compilerProductHelper->getDefaultHwIpVersion(), compilerProductHelper->getHwIpVersion(hwInfo));
86-
}
87-
8824
MTLTEST_F(MtlProductHelper, givenProductHelperWhenCheckOverrideAllocationCacheableThenTrueIsReturnedForCommandBuffer) {
8925
AllocationData allocationData{};
9026
allocationData.type = AllocationType::commandBuffer;
9127
EXPECT_TRUE(productHelper->overrideAllocationCacheable(allocationData));
9228

9329
allocationData.type = AllocationType::buffer;
9430
EXPECT_FALSE(productHelper->overrideAllocationCacheable(allocationData));
95-
}
31+
}

0 commit comments

Comments
 (0)