5
5
*
6
6
*/
7
7
8
- #include " shared/source/helpers/compiler_product_helper.h"
9
8
#include " shared/source/memory_manager/allocation_properties.h"
10
9
#include " shared/source/memory_manager/allocation_type.h"
11
10
#include " shared/source/os_interface/product_helper.h"
12
11
#include " shared/source/xe_hpg_core/hw_cmds_mtl.h"
13
- #include " shared/test/common/helpers/default_hw_info.h"
14
12
#include " shared/test/common/test_macros/header/per_product_test_definitions.h"
15
13
#include " shared/test/common/test_macros/test.h"
16
14
#include " shared/test/unit_test/os_interface/product_helper_tests.h"
17
15
18
- #include " platforms.h"
19
-
20
16
using namespace NEO ;
21
17
22
18
using MtlProductHelper = ProductHelperTest;
@@ -25,71 +21,11 @@ MTLTEST_F(MtlProductHelper, givenProductHelperWhenCheckDirectSubmissionSupported
25
21
EXPECT_TRUE (productHelper->isDirectSubmissionSupported (releaseHelper));
26
22
}
27
23
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
-
88
24
MTLTEST_F (MtlProductHelper, givenProductHelperWhenCheckOverrideAllocationCacheableThenTrueIsReturnedForCommandBuffer) {
89
25
AllocationData allocationData{};
90
26
allocationData.type = AllocationType::commandBuffer;
91
27
EXPECT_TRUE (productHelper->overrideAllocationCacheable (allocationData));
92
28
93
29
allocationData.type = AllocationType::buffer;
94
30
EXPECT_FALSE (productHelper->overrideAllocationCacheable (allocationData));
95
- }
31
+ }
0 commit comments