From 7865975aca8ca16f1015ffb4efea6abb2f6c49d9 Mon Sep 17 00:00:00 2001 From: Rafal Maziejuk Date: Mon, 17 Oct 2022 14:48:32 +0000 Subject: [PATCH] Correct check for symmetrical SKU on XE_HPC_CORE Signed-off-by: Rafal Maziejuk Related-To: NEO-6989 --- .../source/xe_hpc_core/command_encoder_xe_hpc_core.cpp | 2 +- .../unit_test/xe_hpc_core/test_encode_xe_hpc_core.cpp | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/shared/source/xe_hpc_core/command_encoder_xe_hpc_core.cpp b/shared/source/xe_hpc_core/command_encoder_xe_hpc_core.cpp index cf832cce05..96a906763b 100644 --- a/shared/source/xe_hpc_core/command_encoder_xe_hpc_core.cpp +++ b/shared/source/xe_hpc_core/command_encoder_xe_hpc_core.cpp @@ -37,7 +37,7 @@ void EncodeDispatchKernel::adjustInterfaceDescriptorData(INTERFACE_DESCR if (hwInfoConfig.isDisableOverdispatchAvailable(hwInfo)) { interfaceDescriptor.setThreadGroupDispatchSize(INTERFACE_DESCRIPTOR_DATA::THREAD_GROUP_DISPATCH_SIZE_TG_SIZE_1); - if (hwInfo.gtSystemInfo.SliceCount % 2 == 0) { + if (hwInfo.gtSystemInfo.MaxDualSubSlicesSupported == hwInfo.gtSystemInfo.DualSubSliceCount) { UNRECOVERABLE_IF(numGrf == 0u); constexpr uint32_t maxThreadsInTGForTGDispatchSize8 = 16u; diff --git a/shared/test/unit_test/xe_hpc_core/test_encode_xe_hpc_core.cpp b/shared/test/unit_test/xe_hpc_core/test_encode_xe_hpc_core.cpp index d3fbc80c14..9383df1447 100644 --- a/shared/test/unit_test/xe_hpc_core/test_encode_xe_hpc_core.cpp +++ b/shared/test/unit_test/xe_hpc_core/test_encode_xe_hpc_core.cpp @@ -510,13 +510,13 @@ XE_HPC_CORETEST_F(EncodeKernelXeHpcCoreTest, givenCleanHeapsAndSlmNotChangedAndU (gmmHelper->getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER_CACHELINE_MISALIGNED))); } -XE_HPC_CORETEST_F(EncodeKernelXeHpcCoreTest, givenInterfaceDescriptorDataAndOddSliceCountWhenAdjustInterfaceDescriptorDataIsCalledThenThreadGroupDispatchSizeIsCorrectlySet) { +XE_HPC_CORETEST_F(EncodeKernelXeHpcCoreTest, givenInterfaceDescriptorDataAndNonSymmetricalSkuWhenAdjustInterfaceDescriptorDataIsCalledThenThreadGroupDispatchSizeIsCorrectlySet) { using INTERFACE_DESCRIPTOR_DATA = typename FamilyType::INTERFACE_DESCRIPTOR_DATA; INTERFACE_DESCRIPTOR_DATA iddArg = FamilyType::cmdInitInterfaceDescriptorData; const auto &hwInfoConfig = *HwInfoConfig::get(productFamily); auto hwInfo = pDevice->getHardwareInfo(); - hwInfo.gtSystemInfo.SliceCount = 7u; + hwInfo.gtSystemInfo.DualSubSliceCount = 32u; for (const auto &revision : {REVISION_A0, REVISION_B}) { hwInfo.platform.usRevId = hwInfoConfig.getHwRevIdFromStepping(revision, hwInfo); @@ -569,7 +569,11 @@ XE_HPC_CORETEST_F(EncodeKernelXeHpcCoreTest, givenNumberOfThreadsInThreadGroupWh EncodeDispatchKernel::adjustInterfaceDescriptorData(iddArg, hwInfo, threadGroupCount, numGrf); - EXPECT_EQ(expectedThreadGroupDispatchSize, iddArg.getThreadGroupDispatchSize()); + if (hwInfo.gtSystemInfo.MaxDualSubSlicesSupported == hwInfo.gtSystemInfo.DualSubSliceCount) { + EXPECT_EQ(expectedThreadGroupDispatchSize, iddArg.getThreadGroupDispatchSize()); + } else { + EXPECT_EQ(INTERFACE_DESCRIPTOR_DATA::THREAD_GROUP_DISPATCH_SIZE_TG_SIZE_1, iddArg.getThreadGroupDispatchSize()); + } } }