From 572fc24cf52703ad1433e6fb091a0dc845e35b65 Mon Sep 17 00:00:00 2001 From: Compute-Runtime-Validation Date: Fri, 2 Sep 2022 02:11:53 +0200 Subject: [PATCH] Revert "Wait on timestamps in Event::wait" This reverts commit 5d4aca361ff9f136588ae5962eb054f3d415f867. Signed-off-by: Compute-Runtime-Validation --- opencl/source/event/event.cpp | 3 +-- opencl/test/unit_test/event/event_tests.cpp | 10 ---------- opencl/test/unit_test/mocks/mock_command_queue.h | 7 ++----- 3 files changed, 3 insertions(+), 17 deletions(-) diff --git a/opencl/source/event/event.cpp b/opencl/source/event/event.cpp index 3f2bb60735..956ec73a36 100644 --- a/opencl/source/event/event.cpp +++ b/opencl/source/event/event.cpp @@ -428,8 +428,7 @@ inline WaitStatus Event::wait(bool blocking, bool useQuickKmdSleep) { } Range states{&bcsState, bcsState.isValid() ? 1u : 0u}; - auto waitedOnTimestamps = cmdQueue->waitForTimestamps(states, taskCount.load()); - const auto waitStatus = cmdQueue->waitUntilComplete(taskCount.load(), states, flushStamp->peekStamp(), useQuickKmdSleep, true, waitedOnTimestamps); + const auto waitStatus = cmdQueue->waitUntilComplete(taskCount.load(), states, flushStamp->peekStamp(), useQuickKmdSleep); if (waitStatus == WaitStatus::GpuHang) { return WaitStatus::GpuHang; } diff --git a/opencl/test/unit_test/event/event_tests.cpp b/opencl/test/unit_test/event/event_tests.cpp index caf1a01e34..ef9e6fa011 100644 --- a/opencl/test/unit_test/event/event_tests.cpp +++ b/opencl/test/unit_test/event/event_tests.cpp @@ -909,16 +909,6 @@ TEST_F(InternalsEventTest, givenPassingEventWhenWaitingForEventsThenWaititingIsS EXPECT_NE(Event::executionAbortedDueToGpuHang, passingEvent.peekExecutionStatus()); } -TEST_F(InternalsEventTest, givenEventWhenWaitThenWaitForTimestampsCalled) { - MockCommandQueue cmdQ(mockContext, pClDevice, nullptr, false); - MockEvent event(&cmdQ, CL_COMMAND_NDRANGE_KERNEL, 0, 0); - EXPECT_FALSE(cmdQ.waitForTimestampsCalled); - - event.wait(false, false); - - EXPECT_TRUE(cmdQ.waitForTimestampsCalled); -} - TEST_F(InternalsEventTest, GivenProfilingWHENMapOperationTHENTimesSet) { const cl_queue_properties props[3] = {CL_QUEUE_PROPERTIES, CL_QUEUE_PROFILING_ENABLE, 0}; MockCommandQueue *pCmdQ = new MockCommandQueue(mockContext, pClDevice, props, false); diff --git a/opencl/test/unit_test/mocks/mock_command_queue.h b/opencl/test/unit_test/mocks/mock_command_queue.h index d7a011ac70..5d9ddbe2e4 100644 --- a/opencl/test/unit_test/mocks/mock_command_queue.h +++ b/opencl/test/unit_test/mocks/mock_command_queue.h @@ -212,13 +212,10 @@ class MockCommandQueue : public CommandQueue { bool obtainTimestampPacketForCacheFlush(bool isCacheFlushRequired) const override { return isCacheFlushRequired; } - bool waitForTimestamps(Range copyEnginesToWait, uint32_t taskCount) override { - waitForTimestampsCalled = true; - return false; - }; + bool waitForTimestamps(Range copyEnginesToWait, uint32_t taskCount) override { return false; }; bool releaseIndirectHeapCalled = false; - bool waitForTimestampsCalled = false; + cl_int writeBufferRetValue = CL_SUCCESS; uint32_t writeBufferCounter = 0; bool writeBufferBlocking = false;