diff --git a/opencl/test/unit_test/xe_hpc_core/pvc/cl_gfx_core_helper_tests_pvc.cpp b/opencl/test/unit_test/xe_hpc_core/pvc/cl_gfx_core_helper_tests_pvc.cpp index 29bc0723ef..075fd666dd 100644 --- a/opencl/test/unit_test/xe_hpc_core/pvc/cl_gfx_core_helper_tests_pvc.cpp +++ b/opencl/test/unit_test/xe_hpc_core/pvc/cl_gfx_core_helper_tests_pvc.cpp @@ -1,11 +1,14 @@ /* - * Copyright (C) 2022-2023 Intel Corporation + * Copyright (C) 2022-2024 Intel Corporation * * SPDX-License-Identifier: MIT * */ +#include "shared/source/execution_environment/root_device_environment.h" +#include "shared/source/helpers/compiler_product_helper.h" #include "shared/source/os_interface/product_helper.h" +#include "shared/source/release_helper/release_helper.h" #include "shared/source/xe_hpc_core/hw_cmds_pvc.h" #include "shared/source/xe_hpc_core/pvc/device_ids_configs_pvc.h" #include "shared/test/common/helpers/default_hw_info.h" @@ -13,8 +16,12 @@ #include "shared/test/common/test_macros/header/per_product_test_definitions.h" #include "shared/test/common/test_macros/test.h" +#include "opencl/source/helpers/cl_gfx_core_helper.h" +#include "opencl/test/unit_test/mocks/mock_cl_device.h" #include "opencl/test/unit_test/xe_hpc_core/xe_hpc_core_test_ocl_fixtures.h" +#include "CL/cl_ext.h" + namespace NEO { using ClGfxCoreHelperTestsPvcXt = Test; @@ -34,4 +41,30 @@ PVCTEST_F(ClGfxCoreHelperTestsPvcXt, givenMultiTileCsrOnPvcWhenAllocatingCsrSpec hwInfo.platform.usRevId = productHelper.getHwRevIdFromStepping(REVISION_B, hwInfo); // not BD A0 checkIfMultiTileCsrWhenAllocatingCsrSpecificAllocationsThenStoredInLocalMemoryPool(&hwInfo); } + +PVCTEST_F(ClGfxCoreHelperTestsPvcXt, givenRelease1261WhenAskingForDeviceFeaturesThenReturnDp4a) { + auto rootEnv = pClDevice->getExecutionEnvironment()->rootDeviceEnvironments[0].get(); + + auto deviceHwInfo = rootEnv->getMutableHardwareInfo(); + auto &productHelper = getHelper(); + + deviceHwInfo->platform.usDeviceID = pvcXtVgDeviceIds.front(); + deviceHwInfo->platform.usRevId = productHelper.getHwRevIdFromStepping(REVISION_C, *deviceHwInfo); + deviceHwInfo->ipVersion.architecture = 12; + deviceHwInfo->ipVersion.release = 61; + deviceHwInfo->ipVersion.revision = deviceHwInfo->platform.usRevId; + + rootEnv->releaseHelper.reset(); + rootEnv->initReleaseHelper(); + + auto &clGfxCoreHelper = getHelper(); + + EXPECT_EQ(static_cast(CL_DEVICE_FEATURE_FLAG_DP4A_INTEL), clGfxCoreHelper.getSupportedDeviceFeatureCapabilities(*rootEnv)); + + auto &compilerHelper = getHelper(); + std::string extensions = compilerHelper.getDeviceExtensions(*deviceHwInfo, rootEnv->releaseHelper.get()); + + EXPECT_EQ(std::string::npos, extensions.find("cl_intel_subgroup_matrix_multiply_accumulate")); +} + } // namespace NEO diff --git a/shared/source/xe_hpc_core/enable_compiler_product_helper_pvc.cpp b/shared/source/xe_hpc_core/enable_compiler_product_helper_pvc.cpp index 97c92853ad..2a949b3c27 100644 --- a/shared/source/xe_hpc_core/enable_compiler_product_helper_pvc.cpp +++ b/shared/source/xe_hpc_core/enable_compiler_product_helper_pvc.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022-2023 Intel Corporation + * Copyright (C) 2022-2024 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -71,6 +71,9 @@ bool CompilerProductHelperHw::failBuildProgramWithStatefulAccessPrefer template <> bool CompilerProductHelperHw::isMatrixMultiplyAccumulateSupported(const ReleaseHelper *releaseHelper) const { + if (releaseHelper) { + return releaseHelper->isMatrixMultiplyAccumulateSupported(); + } return true; }