mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Remove redundant code from flushWaitList.
Change-Id: Iab4cb856ce324a785b052b8638ef23aef43c9bc9
This commit is contained in:

committed by
sys_ocldev

parent
d6b5433f14
commit
d563059c14
@ -81,32 +81,4 @@ HWTEST_F(CommandQueueSimpleTest, flushWaitlistDoesNotFlushSingleEventWhenTaskCou
|
||||
EXPECT_EQ(1u, csr.peekTaskCount());
|
||||
|
||||
pDevice->getMemoryManager()->freeGraphicsMemory(gfxAllocation);
|
||||
}
|
||||
|
||||
TEST_F(CommandQueueSimpleTest, flushWaitlistFlushesSingleEventWhenTaskCountIsNotYetSent) {
|
||||
MockCommandQueue commandQueue(pContext, pDevice, 0);
|
||||
|
||||
// Event has 2 taskLevel and 2 taskCount
|
||||
MockEvent<Event> event(&commandQueue, CL_COMMAND_NDRANGE_KERNEL, 1, 2);
|
||||
cl_event clEvent = &event;
|
||||
|
||||
auto &csr = pDevice->getCommandStreamReceiver();
|
||||
auto *gfxAllocation = pDevice->getMemoryManager()->allocateGraphicsMemory(4096);
|
||||
LinearStream stream(gfxAllocation);
|
||||
|
||||
// Update latestSentTaskCount to == 1
|
||||
DispatchFlags dispatchFlags;
|
||||
dispatchFlags.blocking = true;
|
||||
dispatchFlags.dcFlush = true;
|
||||
|
||||
csr.flushTask(stream, 0, stream, stream, stream, stream, 0, dispatchFlags);
|
||||
|
||||
EXPECT_EQ(1u, csr.peekLatestSentTaskCount());
|
||||
|
||||
commandQueue.flushWaitList(1, &clEvent, true);
|
||||
|
||||
EXPECT_EQ(1u + 1u, csr.peekTaskLevel()); // event's plus one
|
||||
EXPECT_EQ(2u, csr.peekTaskCount());
|
||||
|
||||
pDevice->getMemoryManager()->freeGraphicsMemory(gfxAllocation);
|
||||
}
|
||||
}
|
@ -525,8 +525,8 @@ HWTEST_F(EnqueueThreading, flushWaitList_ReleaseOwnershipWhenQueueIsBlocked) {
|
||||
|
||||
pMyCmdQ->flushWaitList(0, nullptr, 0);
|
||||
|
||||
EXPECT_EQ(pMyDevice->takeOwnershipCount, 1u);
|
||||
EXPECT_EQ(pMyDevice->releaseOwnershipCount, 1u);
|
||||
EXPECT_EQ(pMyDevice->takeOwnershipCount, 0u);
|
||||
EXPECT_EQ(pMyDevice->releaseOwnershipCount, 0u);
|
||||
|
||||
delete pMyCmdQ;
|
||||
|
||||
|
@ -1229,20 +1229,6 @@ TEST_F(EventTest, GivenCL_SUBMITTEDWhenpeekIsSubmittedThenTrue) {
|
||||
EXPECT_EQ(true, executionStatus);
|
||||
}
|
||||
|
||||
TEST_F(EventTest, GivenNotCompletedEventWhenQueryingExecutionStatusAfterFlushThenCsrGetsFlushedWithProperTaskLevel) {
|
||||
cl_int ret;
|
||||
*pDevice->getTagAddress() = 2;
|
||||
Event ev(this->pCmdQ, CL_COMMAND_COPY_BUFFER, 3, 3);
|
||||
auto &csr = this->pCmdQ->getDevice().getCommandStreamReceiver();
|
||||
EXPECT_GT(3u, csr.peekTaskLevel());
|
||||
ret = clFlush(this->pCmdQ);
|
||||
ASSERT_EQ(CL_SUCCESS, ret);
|
||||
cl_int execState;
|
||||
ret = clGetEventInfo(&ev, CL_EVENT_COMMAND_EXECUTION_STATUS, sizeof(execState), &execState, nullptr);
|
||||
ASSERT_EQ(CL_SUCCESS, ret);
|
||||
EXPECT_EQ(4u, csr.peekTaskLevel());
|
||||
}
|
||||
|
||||
TEST_F(EventTest, GivenCompletedEventWhenQueryingExecutionStatusAfterFlushThenCsrIsNotFlushed) {
|
||||
cl_int ret;
|
||||
*pDevice->getTagAddress() = 3;
|
||||
|
Reference in New Issue
Block a user