11/*
2- * Copyright (C) 2022-2023 Intel Corporation
2+ * Copyright (C) 2022-2024 Intel Corporation
33 *
44 * SPDX-License-Identifier: MIT
55 *
66 */
77
8+ #include " shared/source/execution_environment/root_device_environment.h"
9+ #include " shared/source/helpers/compiler_product_helper.h"
810#include " shared/source/os_interface/product_helper.h"
11+ #include " shared/source/release_helper/release_helper.h"
912#include " shared/source/xe_hpc_core/hw_cmds_pvc.h"
1013#include " shared/source/xe_hpc_core/pvc/device_ids_configs_pvc.h"
1114#include " shared/test/common/helpers/default_hw_info.h"
1215#include " shared/test/common/helpers/ult_hw_config.h"
1316#include " shared/test/common/test_macros/header/per_product_test_definitions.h"
1417#include " shared/test/common/test_macros/test.h"
1518
19+ #include " opencl/source/helpers/cl_gfx_core_helper.h"
20+ #include " opencl/test/unit_test/mocks/mock_cl_device.h"
1621#include " opencl/test/unit_test/xe_hpc_core/xe_hpc_core_test_ocl_fixtures.h"
1722
23+ #include " CL/cl_ext.h"
24+
1825namespace NEO {
1926
2027using ClGfxCoreHelperTestsPvcXt = Test<ClGfxCoreHelperXeHpcCoreFixture>;
@@ -34,4 +41,30 @@ PVCTEST_F(ClGfxCoreHelperTestsPvcXt, givenMultiTileCsrOnPvcWhenAllocatingCsrSpec
3441 hwInfo.platform .usRevId = productHelper.getHwRevIdFromStepping (REVISION_B, hwInfo); // not BD A0
3542 checkIfMultiTileCsrWhenAllocatingCsrSpecificAllocationsThenStoredInLocalMemoryPool (&hwInfo);
3643}
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+
3770} // namespace NEO
0 commit comments