Skip to content

Commit 6e4ac67

Browse files
Revert "performance: Remove global fence from command stream on BMG"
This reverts commit f5301ac. Signed-off-by: Compute-Runtime-Validation <[email protected]> Source: a6b4e61
1 parent 3b65cc0 commit 6e4ac67

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
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 false;
23+
return !hwInfo.capabilityTable.isIntegratedDevice;
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 (getHelper<ProductHelper>().isGlobalFenceInCommandStreamRequired(pDevice->getHardwareInfo())) {
3078+
if (!pDevice->getHardwareInfo().capabilityTable.isIntegratedDevice) {
30793079
expectedFenceCount += 2;
30803080
}
30813081

shared/test/unit_test/xe2_hpg_core/gfx_core_helper_tests_xe2_hpg_core.cpp

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

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

526528
XE2_HPG_CORETEST_F(GfxCoreHelperTestsXe2HpgCore, givenDebugMemorySynchronizationCommandsWhenGettingSizeForAdditionalSynchronizationThenCorrectValueIsReturned) {
527529
DebugManagerStateRestore restorer;
528530
debugManager.flags.DisablePipeControlPrecedingPostSyncCommand.set(1);
531+
using MI_MEM_FENCE = typename FamilyType::MI_MEM_FENCE;
529532

530-
EXPECT_EQ(0u, MemorySynchronizationCommands<FamilyType>::getSizeForAdditonalSynchronization(pDevice->getRootDeviceEnvironment()));
533+
EXPECT_EQ(!pDevice->getHardwareInfo().capabilityTable.isIntegratedDevice * 2 * sizeof(MI_MEM_FENCE), MemorySynchronizationCommands<FamilyType>::getSizeForAdditonalSynchronization(pDevice->getRootDeviceEnvironment()));
531534
}
532535

533536
XE2_HPG_CORETEST_F(GfxCoreHelperTestsXe2HpgCore, givenDontProgramGlobalFenceAsMiMemFenceCommandInCommandStreamWhenGettingSizeForAdditionalSynchronizationThenCorrectValueIsReturned) {
@@ -677,9 +680,9 @@ XE2_HPG_CORETEST_F(ProductHelperTestXe2HpgCore, givenProductHelperWhenCallUseGem
677680
EXPECT_TRUE(productHelper.useGemCreateExtInAllocateMemoryByKMD());
678681
}
679682

680-
XE2_HPG_CORETEST_F(ProductHelperTestXe2HpgCore, givenProductHelperWhenAskingForGlobalFenceSupportThenReturnFalse) {
683+
XE2_HPG_CORETEST_F(ProductHelperTestXe2HpgCore, givenProductHelperWhenAskingForGlobalFenceSupportThenReturnTrue) {
681684
const auto &productHelper = getHelper<ProductHelper>();
682-
EXPECT_FALSE(productHelper.isGlobalFenceInCommandStreamRequired(*defaultHwInfo));
685+
EXPECT_EQ(productHelper.isGlobalFenceInCommandStreamRequired(*defaultHwInfo), !defaultHwInfo->capabilityTable.isIntegratedDevice);
683686
}
684687

685688
XE2_HPG_CORETEST_F(ProductHelperTestXe2HpgCore, givenProductHelperWhenAskingForCooperativeEngineSupportThenReturnTrue) {

0 commit comments

Comments
 (0)