Skip to content

Commit 93ad115

Browse files
fix: PVC dpas caps
Related-To: NEO-10083 Signed-off-by: Dunajski, Bartosz <[email protected]> Source: ec40fdc
1 parent 7343c5b commit 93ad115

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed

opencl/test/unit_test/xe_hpc_core/pvc/cl_gfx_core_helper_tests_pvc.cpp

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,27 @@
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+
1825
namespace NEO {
1926

2027
using 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

shared/source/xe_hpc_core/enable_compiler_product_helper_pvc.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ bool CompilerProductHelperHw<IGFX_PVC>::failBuildProgramWithStatefulAccessPrefer
7171

7272
template <>
7373
bool CompilerProductHelperHw<IGFX_PVC>::isMatrixMultiplyAccumulateSupported(const ReleaseHelper *releaseHelper) const {
74+
if (releaseHelper) {
75+
return releaseHelper->isMatrixMultiplyAccumulateSupported();
76+
}
7477
return true;
7578
}
7679

0 commit comments

Comments
 (0)