fix: In order signaling with pipe control for fill operation

Related-To: NEO-15192
Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
This commit is contained in:
Maciej Plewka
2025-06-16 12:36:06 +00:00
committed by Compute-Runtime-Automation
parent 0a8248fc9f
commit cd27bb32c5
3 changed files with 36 additions and 3 deletions

View File

@@ -2389,6 +2389,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendMemoryFill(void *ptr,
launchParams.isKernelSplitOperation = (fillArguments.leftRemainingBytes > 0 || fillArguments.rightRemainingBytes > 0);
bool singlePipeControlPacket = eventSignalPipeControl(launchParams.isKernelSplitOperation, dcFlush);
launchParams.pipeControlSignalling = (signalEvent && singlePipeControlPacket) || getDcFlushRequired(dstAllocation.needsFlush);
appendEventForProfilingAllWalkers(signalEvent, nullptr, nullptr, true, singlePipeControlPacket, false, isCopyOnly(false));
@@ -2536,7 +2537,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendMemoryFill(void *ptr,
bool nonWalkerInOrderCmdChaining = false;
if (this->isInOrderExecutionEnabled()) {
if (launchParams.isKernelSplitOperation) {
if (launchParams.isKernelSplitOperation || launchParams.pipeControlSignalling) {
dispatchInOrderPostOperationBarrier(signalEvent, dcFlush, isCopyOnly(false));
appendSignalInOrderDependencyCounter(signalEvent, false, false, false);
} else {

View File

@@ -4238,7 +4238,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, InOrderCmdListTests, givenInOrderModeWhenProgrammin
auto cmdStream = immCmdList->getCmdContainer().getCommandStream();
constexpr size_t size = 128 * sizeof(uint32_t);
auto data = allocHostMem(size);
auto data = allocDeviceMem(size);
immCmdList->appendMemoryFill(data, data, 1, size, nullptr, 0, nullptr, copyParams);
@@ -4265,6 +4265,38 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, InOrderCmdListTests, givenInOrderModeWhenProgrammin
context->freeMem(data);
}
HWCMDTEST_F(IGFX_XE_HP_CORE, InOrderCmdListTests, givenInOrderModeWhenProgrammingFillWithoutSplitAndWithEventThenDoNotSignalByWalker) {
using WalkerType = typename FamilyType::DefaultWalkerType;
auto immCmdList = createImmCmdList<FamilyType::gfxCoreFamily>();
immCmdList->dcFlushSupport = true;
auto cmdStream = immCmdList->getCmdContainer().getCommandStream();
constexpr size_t size = 128 * sizeof(uint32_t);
auto data = allocDeviceMem(size);
auto eventPool = createEvents<FamilyType>(1, true);
immCmdList->appendMemoryFill(data, data, 1, size, events[0]->toHandle(), 0, nullptr, copyParams);
GenCmdList cmdList;
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(cmdList, cmdStream->getCpuBase(), cmdStream->getUsed()));
auto walkerItor = find<WalkerType *>(cmdList.begin(), cmdList.end());
ASSERT_NE(cmdList.end(), walkerItor);
auto walker = genCmdCast<WalkerType *>(*walkerItor);
auto &postSync = walker->getPostSync();
using PostSyncType = std::decay_t<decltype(postSync)>;
if (!immCmdList->inOrderAtomicSignalingEnabled) {
EXPECT_EQ(PostSyncType::OPERATION::OPERATION_NO_WRITE, postSync.getOperation());
EXPECT_EQ(0u, postSync.getImmediateData());
}
EXPECT_EQ(0u, postSync.getDestinationAddress());
context->freeMem(data);
}
HWCMDTEST_F(IGFX_XE_HP_CORE, InOrderCmdListTests, givenCopyOnlyInOrderModeWhenProgrammingCopyRegionThenSignalInOrderAllocation) {
using XY_COPY_BLT = typename std::remove_const<decltype(FamilyType::cmdInitXyCopyBlt)>::type;
using MI_STORE_DATA_IMM = typename FamilyType::MI_STORE_DATA_IMM;

View File

@@ -1885,7 +1885,7 @@ HWTEST2_F(InOrderRegularCmdListTests, givenInOrderModeWhenDispatchingRegularCmdL
EXPECT_NE(nullptr, regularCmdList->inOrderExecInfo.get());
constexpr size_t size = 128 * sizeof(uint32_t);
auto data = allocHostMem(size);
auto data = allocDeviceMem(size);
ze_copy_region_t region = {0, 0, 0, 1, 1, 1};