feature: Enable support for cl_intel_subgroup_matrix_multiply_accumulate_tf32

This change enables support for
`cl_intel_subgroup_matrix_multiply_accumulate_tf32` extension for PVC B0
and later.

Related-To: GSD-7825
Signed-off-by: Ratajewski, Andrzej <andrzej.ratajewski@intel.com>
This commit is contained in:
Ratajewski, Andrzej
2024-06-18 10:29:24 +02:00
committed by Compute-Runtime-Automation
parent ce0047de39
commit f7888fac0d
8 changed files with 79 additions and 1 deletions

View File

@@ -168,6 +168,20 @@ HWTEST2_F(CompilerProductHelperFixture, GivenReleaseHelperThenMatrixMultiplyAccu
}
}
HWTEST2_F(CompilerProductHelperFixture, GivenXeHpcAndLaterThenMatrixMultiplyAccumulateTF32IsSupported, IsAtLeastXeHpcCore) {
auto &compilerProductHelper = pDevice->getCompilerProductHelper();
auto hwInfo = *defaultHwInfo;
EXPECT_TRUE(compilerProductHelper.isMatrixMultiplyAccumulateTF32Supported(hwInfo));
}
HWTEST2_F(CompilerProductHelperFixture, GivenPreXeHpcThenMatrixMultiplyAccumulateTF32IsNotSupported, IsAtMostXeHpgCore) {
auto &compilerProductHelper = pDevice->getCompilerProductHelper();
auto hwInfo = *defaultHwInfo;
EXPECT_FALSE(compilerProductHelper.isMatrixMultiplyAccumulateTF32Supported(hwInfo));
}
HWTEST2_F(CompilerProductHelperFixture, GivenReleaseHelperThenDotProductAccumulateSystolicIsSupportedBasedOnReleaseHelper, IsNotXeHpcCore) {
auto &compilerProductHelper = pDevice->getCompilerProductHelper();
auto releaseHelper = pDevice->getReleaseHelper();

View File

@@ -1,12 +1,14 @@
/*
* Copyright (C) 2023 Intel Corporation
* Copyright (C) 2023-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/os_interface/product_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/mocks/mock_execution_environment.h"
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
#include "shared/test/common/test_macros/test.h"
@@ -42,3 +44,40 @@ PVCTEST_F(CompilerProductHelperPvcTest, givenPvcWhenFailBuildProgramWithStateful
auto &compilerProductHelper = rootDeviceEnvironment.getHelper<CompilerProductHelper>();
EXPECT_FALSE(compilerProductHelper.failBuildProgramWithStatefulAccessPreference());
}
PVCTEST_F(CompilerProductHelperPvcTest, givenPvcB0AndLaterThenMatrixMultiplyAccumulateTF32IsSupported) {
MockExecutionEnvironment executionEnvironment{};
auto &rootDeviceEnvironment = *executionEnvironment.rootDeviceEnvironments[0];
auto &compilerProductHelper = rootDeviceEnvironment.getHelper<CompilerProductHelper>();
auto &productHelper = rootDeviceEnvironment.getHelper<ProductHelper>();
auto hwInfo = *rootDeviceEnvironment.getHardwareInfo();
for (auto revision : {REVISION_A0, REVISION_B}) {
for (auto deviceId : pvcXlDeviceIds) {
hwInfo.platform.usDeviceID = deviceId;
hwInfo.platform.usRevId = productHelper.getHwRevIdFromStepping(revision, hwInfo);
EXPECT_FALSE(compilerProductHelper.isMatrixMultiplyAccumulateTF32Supported(hwInfo));
}
}
for (auto deviceId : pvcXtDeviceIds) {
hwInfo.platform.usDeviceID = deviceId;
hwInfo.platform.usRevId = productHelper.getHwRevIdFromStepping(REVISION_A0, hwInfo);
EXPECT_FALSE(compilerProductHelper.isMatrixMultiplyAccumulateTF32Supported(hwInfo));
}
for (auto revision : {REVISION_B, REVISION_C}) {
for (auto deviceId : pvcXtDeviceIds) {
hwInfo.platform.usDeviceID = deviceId;
hwInfo.platform.usRevId = productHelper.getHwRevIdFromStepping(revision, hwInfo);
EXPECT_TRUE(compilerProductHelper.isMatrixMultiplyAccumulateTF32Supported(hwInfo));
}
}
for (auto deviceId : pvcXtVgDeviceIds) {
hwInfo.platform.usDeviceID = deviceId;
hwInfo.platform.usRevId = productHelper.getHwRevIdFromStepping(REVISION_C, hwInfo);
EXPECT_FALSE(compilerProductHelper.isMatrixMultiplyAccumulateTF32Supported(hwInfo));
}
}