Wait on timestamps in Event::wait

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2022-10-06 14:45:59 +00:00
committed by Compute-Runtime-Automation
parent af4e3d510e
commit f91047f2ee
5 changed files with 39 additions and 8 deletions

View File

@ -909,6 +909,18 @@ TEST_F(InternalsEventTest, givenPassingEventWhenWaitingForEventsThenWaititingIsS
EXPECT_NE(Event::executionAbortedDueToGpuHang, passingEvent.peekExecutionStatus());
}
TEST_F(InternalsEventTest, givenEventWhenWaitThenWaitForTimestampsCalled) {
MockCommandQueue cmdQ(mockContext, pClDevice, nullptr, false);
MockEvent<Event> event(&cmdQ, CL_COMMAND_NDRANGE_KERNEL, 0, 0);
EXPECT_FALSE(cmdQ.waitForTimestampsCalled);
EXPECT_FALSE(cmdQ.clearDeferredTimestampPacketsCalled);
event.wait(false, false);
EXPECT_TRUE(cmdQ.waitForTimestampsCalled);
EXPECT_TRUE(cmdQ.clearDeferredTimestampPacketsCalled);
}
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);