Skip to content

Commit f5301ac

Browse files
performance: Remove global fence from command stream on BMG
Related-To: NEO-14642 Signed-off-by: Lukasz Jobczyk <[email protected]>
1 parent 7e8acbc commit f5301ac

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

shared/source/xe2_hpg_core/os_agnostic_product_helper_xe2_hpg_core.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ bool ProductHelperHw<gfxProduct>::isBlitterForImagesSupported() const {
2020

2121
template <>
2222
bool ProductHelperHw<gfxProduct>::isGlobalFenceInCommandStreamRequired(const HardwareInfo &hwInfo) const {
23-
return !hwInfo.capabilityTable.isIntegratedDevice;
23+
return false;
2424
}
2525

2626
template <>

shared/test/unit_test/command_stream/command_stream_receiver_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3075,7 +3075,7 @@ HWTEST2_F(CommandStreamReceiverHwTest, givenDeviceToHostCopyWhenFenceIsRequiredT
30753075

30763076
fenceExpected &= getHelper<ProductHelper>().isDeviceToHostCopySignalingFenceRequired();
30773077
size_t expectedFenceCount = fenceExpected ? 1 : 0;
3078-
if (!pDevice->getHardwareInfo().capabilityTable.isIntegratedDevice) {
3078+
if (getHelper<ProductHelper>().isGlobalFenceInCommandStreamRequired(pDevice->getHardwareInfo())) {
30793079
expectedFenceCount += 2;
30803080
}
30813081

shared/test/unit_test/xe2_hpg_core/gfx_core_helper_tests_xe2_hpg_core.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -519,17 +519,14 @@ XE2_HPG_CORETEST_F(GfxCoreHelperTestsXe2HpgCore, givenGfxCoreHelperWhenAskedIfFe
519519
}
520520

521521
XE2_HPG_CORETEST_F(GfxCoreHelperTestsXe2HpgCore, givenDefaultMemorySynchronizationCommandsWhenGettingSizeForAdditionalSynchronizationThenCorrectValueIsReturned) {
522-
using MI_MEM_FENCE = typename FamilyType::MI_MEM_FENCE;
523-
524-
EXPECT_EQ(!pDevice->getHardwareInfo().capabilityTable.isIntegratedDevice * sizeof(MI_MEM_FENCE), MemorySynchronizationCommands<FamilyType>::getSizeForAdditonalSynchronization(pDevice->getRootDeviceEnvironment()));
522+
EXPECT_EQ(0u, MemorySynchronizationCommands<FamilyType>::getSizeForAdditonalSynchronization(pDevice->getRootDeviceEnvironment()));
525523
}
526524

527525
XE2_HPG_CORETEST_F(GfxCoreHelperTestsXe2HpgCore, givenDebugMemorySynchronizationCommandsWhenGettingSizeForAdditionalSynchronizationThenCorrectValueIsReturned) {
528526
DebugManagerStateRestore restorer;
529527
debugManager.flags.DisablePipeControlPrecedingPostSyncCommand.set(1);
530-
using MI_MEM_FENCE = typename FamilyType::MI_MEM_FENCE;
531528

532-
EXPECT_EQ(!pDevice->getHardwareInfo().capabilityTable.isIntegratedDevice * 2 * sizeof(MI_MEM_FENCE), MemorySynchronizationCommands<FamilyType>::getSizeForAdditonalSynchronization(pDevice->getRootDeviceEnvironment()));
529+
EXPECT_EQ(0u, MemorySynchronizationCommands<FamilyType>::getSizeForAdditonalSynchronization(pDevice->getRootDeviceEnvironment()));
533530
}
534531

535532
XE2_HPG_CORETEST_F(GfxCoreHelperTestsXe2HpgCore, givenDontProgramGlobalFenceAsMiMemFenceCommandInCommandStreamWhenGettingSizeForAdditionalSynchronizationThenCorrectValueIsReturned) {
@@ -679,9 +676,9 @@ XE2_HPG_CORETEST_F(ProductHelperTestXe2HpgCore, givenProductHelperWhenCallUseGem
679676
EXPECT_TRUE(productHelper.useGemCreateExtInAllocateMemoryByKMD());
680677
}
681678

682-
XE2_HPG_CORETEST_F(ProductHelperTestXe2HpgCore, givenProductHelperWhenAskingForGlobalFenceSupportThenReturnTrue) {
679+
XE2_HPG_CORETEST_F(ProductHelperTestXe2HpgCore, givenProductHelperWhenAskingForGlobalFenceSupportThenReturnFalse) {
683680
const auto &productHelper = getHelper<ProductHelper>();
684-
EXPECT_EQ(productHelper.isGlobalFenceInCommandStreamRequired(*defaultHwInfo), !defaultHwInfo->capabilityTable.isIntegratedDevice);
681+
EXPECT_FALSE(productHelper.isGlobalFenceInCommandStreamRequired(*defaultHwInfo));
685682
}
686683

687684
XE2_HPG_CORETEST_F(ProductHelperTestXe2HpgCore, givenProductHelperWhenAskingForCooperativeEngineSupportThenReturnTrue) {

0 commit comments

Comments
 (0)