Skip to content

Commit 7865975

Browse files
Correct check for symmetrical SKU on XE_HPC_CORE
Signed-off-by: Rafal Maziejuk <[email protected]> Related-To: NEO-6989
1 parent 2dd3c11 commit 7865975

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

shared/source/xe_hpc_core/command_encoder_xe_hpc_core.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ void EncodeDispatchKernel<Family>::adjustInterfaceDescriptorData(INTERFACE_DESCR
3737
if (hwInfoConfig.isDisableOverdispatchAvailable(hwInfo)) {
3838
interfaceDescriptor.setThreadGroupDispatchSize(INTERFACE_DESCRIPTOR_DATA::THREAD_GROUP_DISPATCH_SIZE_TG_SIZE_1);
3939

40-
if (hwInfo.gtSystemInfo.SliceCount % 2 == 0) {
40+
if (hwInfo.gtSystemInfo.MaxDualSubSlicesSupported == hwInfo.gtSystemInfo.DualSubSliceCount) {
4141
UNRECOVERABLE_IF(numGrf == 0u);
4242

4343
constexpr uint32_t maxThreadsInTGForTGDispatchSize8 = 16u;

shared/test/unit_test/xe_hpc_core/test_encode_xe_hpc_core.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -510,13 +510,13 @@ XE_HPC_CORETEST_F(EncodeKernelXeHpcCoreTest, givenCleanHeapsAndSlmNotChangedAndU
510510
(gmmHelper->getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER_CACHELINE_MISALIGNED)));
511511
}
512512

513-
XE_HPC_CORETEST_F(EncodeKernelXeHpcCoreTest, givenInterfaceDescriptorDataAndOddSliceCountWhenAdjustInterfaceDescriptorDataIsCalledThenThreadGroupDispatchSizeIsCorrectlySet) {
513+
XE_HPC_CORETEST_F(EncodeKernelXeHpcCoreTest, givenInterfaceDescriptorDataAndNonSymmetricalSkuWhenAdjustInterfaceDescriptorDataIsCalledThenThreadGroupDispatchSizeIsCorrectlySet) {
514514
using INTERFACE_DESCRIPTOR_DATA = typename FamilyType::INTERFACE_DESCRIPTOR_DATA;
515515

516516
INTERFACE_DESCRIPTOR_DATA iddArg = FamilyType::cmdInitInterfaceDescriptorData;
517517
const auto &hwInfoConfig = *HwInfoConfig::get(productFamily);
518518
auto hwInfo = pDevice->getHardwareInfo();
519-
hwInfo.gtSystemInfo.SliceCount = 7u;
519+
hwInfo.gtSystemInfo.DualSubSliceCount = 32u;
520520

521521
for (const auto &revision : {REVISION_A0, REVISION_B}) {
522522
hwInfo.platform.usRevId = hwInfoConfig.getHwRevIdFromStepping(revision, hwInfo);
@@ -569,7 +569,11 @@ XE_HPC_CORETEST_F(EncodeKernelXeHpcCoreTest, givenNumberOfThreadsInThreadGroupWh
569569

570570
EncodeDispatchKernel<FamilyType>::adjustInterfaceDescriptorData(iddArg, hwInfo, threadGroupCount, numGrf);
571571

572-
EXPECT_EQ(expectedThreadGroupDispatchSize, iddArg.getThreadGroupDispatchSize());
572+
if (hwInfo.gtSystemInfo.MaxDualSubSlicesSupported == hwInfo.gtSystemInfo.DualSubSliceCount) {
573+
EXPECT_EQ(expectedThreadGroupDispatchSize, iddArg.getThreadGroupDispatchSize());
574+
} else {
575+
EXPECT_EQ(INTERFACE_DESCRIPTOR_DATA::THREAD_GROUP_DISPATCH_SIZE_TG_SIZE_1, iddArg.getThreadGroupDispatchSize());
576+
}
573577
}
574578
}
575579

0 commit comments

Comments
 (0)