fix: remove no longer needed flush l3 after cpu read

Related-To: NEO-13163
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
Kamil Kopryk
2025-08-13 19:22:02 +00:00
committed by Compute-Runtime-Automation
parent 7185e5bfbe
commit d86cc127ea
5 changed files with 0 additions and 58 deletions

View File

@@ -547,7 +547,6 @@ class CommandQueue : public BaseObject<_cl_command_queue> {
bool heaplessModeEnabled = false;
bool heaplessStateInitEnabled = false;
bool isForceStateless = false;
bool l3FlushedAfterCpuRead = true;
bool l3FlushAfterPostSyncEnabled = false;
bool isWalkerWithProfilingEnqueued = false;
bool shouldRegisterEnqueuedWalkerWithProfiling = false;

View File

@@ -76,7 +76,6 @@ cl_int CommandQueueHw<GfxFamily>::enqueueReadBufferImpl(
if (isCpuCopyAllowed) {
if (isMemTransferNeeded) {
this->l3FlushedAfterCpuRead = false;
return enqueueReadWriteBufferOnCpuWithMemoryTransfer(cmdType, buffer, offset, size, ptr,
numEventsInWaitList, eventWaitList, event);
} else {

View File

@@ -25,20 +25,6 @@ cl_int CommandQueueHw<GfxFamily>::finish() {
bool waitForTaskCountRequired = false;
if (!l3FlushedAfterCpuRead && l3FlushAfterPostSyncEnabled) {
csr.flushTagUpdate();
CompletionStamp completionStamp = {
csr.peekTaskCount(),
csr.peekTaskLevel(),
csr.obtainCurrentFlushStamp()};
this->updateFromCompletionStamp(completionStamp, nullptr);
this->l3FlushedAfterCpuRead = true;
waitForTaskCountRequired = true;
}
// Stall until HW reaches taskCount on all its engines
const auto waitStatus = waitForAllEngines(true, nullptr, waitForTaskCountRequired);
if (waitStatus == WaitStatus::gpuHang) {

View File

@@ -96,44 +96,3 @@ HWTEST_F(FinishTest, givenFreshQueueWhenFinishIsCalledThenCommandStreamIsNotAllo
EXPECT_EQ(nullptr, cmdQ.peekCommandStream());
}
HWTEST_F(FinishTest, givenL3FlushAfterPostSyncEnabledWhenFlushTagUpdateIsCalledThenPipeControlIsAddedWithDcFlushEnabled) {
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
DebugManagerStateRestore dbgRestorer;
debugManager.flags.EnableL3FlushAfterPostSync.set(true);
auto &productHelper = pClDevice->getDevice().getProductHelper();
if (!productHelper.isL3FlushAfterPostSyncRequired(true)) {
GTEST_SKIP();
}
MockContext contextWithMockCmdQ(pClDevice, true);
MockCommandQueueHw<FamilyType> cmdQ(&contextWithMockCmdQ, pClDevice, 0);
cmdQ.l3FlushedAfterCpuRead = false;
cmdQ.l3FlushAfterPostSyncEnabled = true;
auto &csr = cmdQ.getUltCommandStreamReceiver();
auto used = csr.commandStream.getUsed();
auto taskCount = csr.taskCount.load();
auto retVal = cmdQ.finish();
EXPECT_EQ(taskCount + 1, csr.taskCount.load());
EXPECT_EQ(taskCount + 1, cmdQ.taskCount);
ASSERT_EQ(CL_SUCCESS, retVal);
EXPECT_FALSE(cmdQ.recordedSkipWait);
HardwareParse hwParse;
hwParse.parseCommands<FamilyType>(csr.commandStream, used);
auto itorCmd = find<PIPE_CONTROL *>(hwParse.cmdList.begin(), hwParse.cmdList.end());
EXPECT_NE(hwParse.cmdList.end(), itorCmd);
// Verify DC flush is enabled
auto pipeControl = genCmdCast<PIPE_CONTROL *>(*itorCmd);
ASSERT_NE(nullptr, pipeControl);
EXPECT_EQ(csr.dcFlushSupport, pipeControl->getDcFlushEnable());
}

View File

@@ -283,7 +283,6 @@ class MockCommandQueueHw : public CommandQueueHw<GfxFamily> {
using BaseClass::isCompleted;
using BaseClass::isGpgpuSubmissionForBcsRequired;
using BaseClass::l3FlushAfterPostSyncEnabled;
using BaseClass::l3FlushedAfterCpuRead;
using BaseClass::latestSentEnqueueType;
using BaseClass::minimalSizeForBcsSplit;
using BaseClass::obtainCommandStream;