1
1
/*
2
- * Copyright (C) 2022-2023 Intel Corporation
2
+ * Copyright (C) 2022-2024 Intel Corporation
3
3
*
4
4
* SPDX-License-Identifier: MIT
5
5
*
6
6
*/
7
7
8
+ #include " shared/source/execution_environment/root_device_environment.h"
9
+ #include " shared/source/helpers/compiler_product_helper.h"
8
10
#include " shared/source/os_interface/product_helper.h"
11
+ #include " shared/source/release_helper/release_helper.h"
9
12
#include " shared/source/xe_hpc_core/hw_cmds_pvc.h"
10
13
#include " shared/source/xe_hpc_core/pvc/device_ids_configs_pvc.h"
11
14
#include " shared/test/common/helpers/default_hw_info.h"
12
15
#include " shared/test/common/helpers/ult_hw_config.h"
13
16
#include " shared/test/common/test_macros/header/per_product_test_definitions.h"
14
17
#include " shared/test/common/test_macros/test.h"
15
18
19
+ #include " opencl/source/helpers/cl_gfx_core_helper.h"
20
+ #include " opencl/test/unit_test/mocks/mock_cl_device.h"
16
21
#include " opencl/test/unit_test/xe_hpc_core/xe_hpc_core_test_ocl_fixtures.h"
17
22
23
+ #include " CL/cl_ext.h"
24
+
18
25
namespace NEO {
19
26
20
27
using ClGfxCoreHelperTestsPvcXt = Test<ClGfxCoreHelperXeHpcCoreFixture>;
@@ -34,4 +41,30 @@ PVCTEST_F(ClGfxCoreHelperTestsPvcXt, givenMultiTileCsrOnPvcWhenAllocatingCsrSpec
34
41
hwInfo.platform .usRevId = productHelper.getHwRevIdFromStepping (REVISION_B, hwInfo); // not BD A0
35
42
checkIfMultiTileCsrWhenAllocatingCsrSpecificAllocationsThenStoredInLocalMemoryPool (&hwInfo);
36
43
}
44
+
45
+ PVCTEST_F (ClGfxCoreHelperTestsPvcXt, givenRelease1261WhenAskingForDeviceFeaturesThenReturnDp4a) {
46
+ auto rootEnv = pClDevice->getExecutionEnvironment ()->rootDeviceEnvironments [0 ].get ();
47
+
48
+ auto deviceHwInfo = rootEnv->getMutableHardwareInfo ();
49
+ auto &productHelper = getHelper<ProductHelper>();
50
+
51
+ deviceHwInfo->platform .usDeviceID = pvcXtVgDeviceIds.front ();
52
+ deviceHwInfo->platform .usRevId = productHelper.getHwRevIdFromStepping (REVISION_C, *deviceHwInfo);
53
+ deviceHwInfo->ipVersion .architecture = 12 ;
54
+ deviceHwInfo->ipVersion .release = 61 ;
55
+ deviceHwInfo->ipVersion .revision = deviceHwInfo->platform .usRevId ;
56
+
57
+ rootEnv->releaseHelper .reset ();
58
+ rootEnv->initReleaseHelper ();
59
+
60
+ auto &clGfxCoreHelper = getHelper<ClGfxCoreHelper>();
61
+
62
+ EXPECT_EQ (static_cast <cl_device_feature_capabilities_intel>(CL_DEVICE_FEATURE_FLAG_DP4A_INTEL), clGfxCoreHelper.getSupportedDeviceFeatureCapabilities (*rootEnv));
63
+
64
+ auto &compilerHelper = getHelper<CompilerProductHelper>();
65
+ std::string extensions = compilerHelper.getDeviceExtensions (*deviceHwInfo, rootEnv->releaseHelper .get ());
66
+
67
+ EXPECT_EQ (std::string::npos, extensions.find (" cl_intel_subgroup_matrix_multiply_accumulate" ));
68
+ }
69
+
37
70
} // namespace NEO
0 commit comments