Skip to content

Commit f6efba9

Browse files
Revert "Use latest sent task count for Linux flush stamp"
This reverts commit 566415a. Signed-off-by: Compute-Runtime-Validation <[email protected]>
1 parent 9f5b3ef commit f6efba9

File tree

7 files changed

+12
-15
lines changed

7 files changed

+12
-15
lines changed

opencl/source/os_interface/linux/drm_command_stream.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ class DrmCommandStreamReceiver : public DeviceCommandStreamReceiver<GfxFamily> {
3232
using BaseClass::requiredScratchSize;
3333
using CommandStreamReceiverHw<GfxFamily>::CommandStreamReceiver::getTagAddress;
3434
using CommandStreamReceiverHw<GfxFamily>::CommandStreamReceiver::getTagAllocation;
35-
using CommandStreamReceiverHw<GfxFamily>::CommandStreamReceiver::latestSentTaskCount;
3635
using CommandStreamReceiverHw<GfxFamily>::CommandStreamReceiver::taskCount;
3736
using CommandStreamReceiverHw<GfxFamily>::CommandStreamReceiver::useNotifyEnableForPostSync;
3837

opencl/source/os_interface/linux/drm_command_stream.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ bool DrmCommandStreamReceiver<GfxFamily>::flush(BatchBuffer &batchBuffer, Reside
116116
}
117117

118118
if (isUserFenceWaitActive()) {
119-
this->flushStamp->setStamp(latestSentTaskCount);
119+
this->flushStamp->setStamp(taskCount);
120120
} else {
121121
this->flushStamp->setStamp(bb->peekHandle());
122122
}

opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_2_tests.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
using namespace NEO;
3434

35-
using CommandStreamReceiverFlushTaskTests = UltCommandStreamReceiverTest;
35+
typedef UltCommandStreamReceiverTest CommandStreamReceiverFlushTaskTests;
3636

3737
HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenBlockedKernelNotRequiringDCFlushWhenUnblockedThenDCFlushIsNotAdded) {
3838
typedef typename FamilyType::PIPE_CONTROL PIPE_CONTROL;
@@ -491,12 +491,8 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCommandStreamReceiverWhenFenc
491491
EXPECT_FALSE(csr.isMadeResident(csr.globalFenceAllocation));
492492
EXPECT_FALSE(csr.isMadeNonResident(csr.globalFenceAllocation));
493493

494-
csr.taskCount = 2u;
495494
flushSmallTask(csr);
496495

497-
EXPECT_EQ(3u, csr.latestSentTaskCount);
498-
EXPECT_EQ(3u, csr.latestFlushedTaskCount);
499-
500496
EXPECT_TRUE(csr.isMadeResident(csr.globalFenceAllocation));
501497
EXPECT_TRUE(csr.isMadeNonResident(csr.globalFenceAllocation));
502498

opencl/test/unit_test/mocks/linux/mock_drm_command_stream_receiver.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ class TestedDrmCommandStreamReceiver : public DrmCommandStreamReceiver<GfxFamily
2121
using CommandStreamReceiver::flushStamp;
2222
using CommandStreamReceiver::getTagAddress;
2323
using CommandStreamReceiver::globalFenceAllocation;
24-
using CommandStreamReceiver::latestSentTaskCount;
2524
using CommandStreamReceiver::makeResident;
2625
using CommandStreamReceiver::taskCount;
2726
using CommandStreamReceiver::useGpuIdleImplicitFlush;

opencl/test/unit_test/mocks/mock_aub_csr.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ struct MockAubCsr : public AUBCommandStreamReceiverHw<GfxFamily> {
7878
return this->tagAllocation;
7979
}
8080

81+
void setLatestSentTaskCount(uint32_t latestSentTaskCount) {
82+
this->latestSentTaskCount = latestSentTaskCount;
83+
}
84+
8185
bool flushBatchedSubmissions() override {
8286
flushBatchedSubmissionsCalled = true;
8387
return true;

opencl/test/unit_test/os_interface/linux/drm_command_stream_tests_2.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,7 @@ HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTest, givenAllocationWithSingleBuffer
789789
}
790790

791791
HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTest,
792-
givenWaitUserFenceFlagAndVmBindAvailableSetWhenDrmCsrFlushedThenExpectLatestSentTaskCountStoredAsFlushStamp) {
792+
givenWaitUserFenceFlagAndVmBindAvailableSetWhenDrmCsrFlushedThenExpectTaskCountStoredAsFlushStamp) {
793793
DebugManagerStateRestore restorer;
794794
DebugManager.flags.EnableUserFenceForCompletionWait.set(1);
795795

@@ -811,7 +811,7 @@ HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTest,
811811
CommandStreamReceiverHw<FamilyType>::alignToCacheLine(cs);
812812
BatchBuffer batchBuffer{cs.getGraphicsAllocation(), 0, 0, nullptr, false, false, QueueThrottle::MEDIUM, QueueSliceCount::defaultSliceCount, cs.getUsed(), &cs, nullptr, false};
813813

814-
testedCsr->latestSentTaskCount = 160u;
814+
testedCsr->taskCount = 160u;
815815
testedCsr->flush(batchBuffer, testedCsr->getResidencyAllocations());
816816

817817
EXPECT_EQ(160u, testedCsr->flushStamp->peekStamp());
@@ -841,7 +841,7 @@ HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTest,
841841

842842
DrmAllocation *alloc = static_cast<DrmAllocation *>(cs.getGraphicsAllocation());
843843
auto boHandle = static_cast<FlushStamp>(alloc->getBO()->peekHandle());
844-
testedCsr->latestSentTaskCount = 160u;
844+
testedCsr->taskCount = 160u;
845845

846846
testedCsr->flush(batchBuffer, testedCsr->getResidencyAllocations());
847847

@@ -875,7 +875,7 @@ HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTest,
875875

876876
DrmAllocation *alloc = static_cast<DrmAllocation *>(cs.getGraphicsAllocation());
877877
auto boHandle = static_cast<FlushStamp>(alloc->getBO()->peekHandle());
878-
testedCsr->latestSentTaskCount = 160u;
878+
testedCsr->taskCount = 160u;
879879

880880
testedCsr->flush(batchBuffer, testedCsr->getResidencyAllocations());
881881

shared/source/command_stream/command_stream_receiver_hw_base.inl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1199,6 +1199,8 @@ void CommandStreamReceiverHw<GfxFamily>::flushPipeControl() {
11991199

12001200
this->flushSmallTask(commandStream, commandStreamStart);
12011201

1202+
this->latestFlushedTaskCount = taskCount + 1;
1203+
this->latestSentTaskCount = taskCount + 1;
12021204
taskCount++;
12031205
}
12041206

@@ -1289,9 +1291,6 @@ void CommandStreamReceiverHw<GfxFamily>::flushSmallTask(LinearStream &commandStr
12891291
makeResident(*globalFenceAllocation);
12901292
}
12911293

1292-
this->latestFlushedTaskCount = taskCount + 1;
1293-
this->latestSentTaskCount = taskCount + 1;
1294-
12951294
BatchBuffer batchBuffer{commandStreamTask.getGraphicsAllocation(), commandStreamStartTask, 0, nullptr, false, false, QueueThrottle::MEDIUM, QueueSliceCount::defaultSliceCount,
12961295
commandStreamTask.getUsed(), &commandStreamTask, endingCmdPtr, false};
12971296

0 commit comments

Comments
 (0)