feature: debug flag to sync copy only in-order signaling

Related-To: HSD-18043173360

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2025-08-21 13:43:46 +00:00
committed by Compute-Runtime-Automation
parent 1a58b0e380
commit 584e176126
5 changed files with 52 additions and 1 deletions

View File

@@ -3314,6 +3314,11 @@ void CommandListCoreFamily<gfxCoreFamily>::appendSignalInOrderDependencyCounter(
auto cmdStream = commandContainer.getCommandStream();
if (isCopyOnly(copyOffloadOperation) && !this->useAdditionalBlitProperties && NEO::debugManager.flags.InOrderCopyMiFlushSync.get() == 1) {
NEO::MiFlushArgs args{this->dummyBlitWa};
encodeMiFlush(0, 0, args);
}
if (stall) {
NEO::PipeControlArgs args;
args.dcFlushEnable = true;

View File

@@ -213,6 +213,7 @@ struct WhiteBox<L0::CommandListCoreFamilyImmediate<gfxCoreFamily>>
using BaseClass::disablePatching;
using BaseClass::dispatchEventRemainingPacketsPostSyncOperation;
using BaseClass::doubleSbaWa;
using BaseClass::dummyBlitWa;
using BaseClass::duplicatedInOrderCounterStorageEnabled;
using BaseClass::enablePatching;
using BaseClass::engineGroupType;

View File

@@ -8,6 +8,7 @@
#include "shared/source/command_container/command_encoder.h"
#include "shared/source/direct_submission/dispatchers/blitter_dispatcher.h"
#include "shared/source/gmm_helper/gmm_helper.h"
#include "shared/source/helpers/blit_commands_helper.h"
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/constants.h"
#include "shared/source/helpers/register_offsets.h"
@@ -5973,6 +5974,48 @@ HWTEST_F(InOrderCmdListTests, givenExternalSyncStorageWhenCallingAppendSignalInO
context->freeMem(devAddress);
}
HWTEST_F(InOrderCmdListTests, givenCopyOnlyCmdListAndDebugFlagWhenCounterSignaledThenProgramMiFlush) {
using MI_FLUSH_DW = typename FamilyType::MI_FLUSH_DW;
auto immCmdList = createCopyOnlyImmCmdList<FamilyType::gfxCoreFamily>();
auto cmdStream = immCmdList->getCmdContainer().getCommandStream();
auto offset = cmdStream->getUsed();
immCmdList->appendSignalInOrderDependencyCounter(nullptr, false, false, false);
{
GenCmdList cmdList;
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(cmdList, ptrOffset(cmdStream->getCpuBase(), offset), (cmdStream->getUsed() - offset)));
auto it = find<MI_FLUSH_DW *>(cmdList.begin(), cmdList.end());
EXPECT_EQ(cmdList.end(), it);
}
debugManager.flags.InOrderCopyMiFlushSync.set(1);
offset = cmdStream->getUsed();
immCmdList->appendSignalInOrderDependencyCounter(nullptr, false, false, false);
{
GenCmdList cmdList;
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(cmdList, ptrOffset(cmdStream->getCpuBase(), offset), (cmdStream->getUsed() - offset)));
if (immCmdList->useAdditionalBlitProperties) {
auto it = find<MI_FLUSH_DW *>(cmdList.begin(), cmdList.end());
EXPECT_EQ(cmdList.end(), it);
} else {
auto it = cmdList.begin();
if (BlitCommandsHelper<FamilyType>::isDummyBlitWaNeeded(immCmdList->dummyBlitWa)) {
it++;
}
auto miFlush = genCmdCast<MI_FLUSH_DW *>(*it);
EXPECT_NE(nullptr, miFlush);
}
}
}
HWTEST_F(InOrderCmdListTests, givenExternalSyncStorageAndCopyOnlyCmdListWhenCallingAppendMemoryCopyWithDisabledInOrderSignalingThenSignalAtomicStorage) {
using MI_ATOMIC = typename FamilyType::MI_ATOMIC;
using ATOMIC_OPCODES = typename FamilyType::MI_ATOMIC::ATOMIC_OPCODES;