mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-19 16:24:18 +08:00
Remove flushWaitList method.
- No longer needed. Change-Id: I9e255067fb4b0d52a42f6a49145b3a8d591b5e74
This commit is contained in:
committed by
sys_ocldev
parent
eaf72b6098
commit
393ce116e7
2
Jenkinsfile
vendored
2
Jenkinsfile
vendored
@@ -1,4 +1,4 @@
|
||||
#!groovy
|
||||
neoDependenciesRev='794280-1087'
|
||||
strategy='EQUAL'
|
||||
allowedCD=273
|
||||
allowedCD=272
|
||||
|
||||
@@ -320,21 +320,6 @@ void CommandQueue::updateFromCompletionStamp(const CompletionStamp &completionSt
|
||||
this->taskLevel = completionStamp.taskLevel;
|
||||
}
|
||||
|
||||
void CommandQueue::flushWaitList(
|
||||
cl_uint numEventsInWaitList,
|
||||
const cl_event *eventWaitList,
|
||||
bool ndRangeKernel) {
|
||||
|
||||
bool isQBlocked = false;
|
||||
|
||||
//as long as queue is blocked we need to stall.
|
||||
if (!isOOQEnabled()) {
|
||||
while ((isQBlocked = isQueueBlocked()))
|
||||
;
|
||||
}
|
||||
device->getCommandStreamReceiver().flushBatchedSubmissions();
|
||||
}
|
||||
|
||||
bool CommandQueue::setPerfCountersEnabled(bool perfCountersEnabled, cl_uint configuration) {
|
||||
DEBUG_BREAK_IF(device == nullptr);
|
||||
if (perfCountersEnabled == this->perfCountersEnabled) {
|
||||
|
||||
@@ -320,10 +320,6 @@ class CommandQueue : public BaseObject<_cl_command_queue> {
|
||||
|
||||
MOCKABLE_VIRTUAL void waitUntilComplete(uint32_t taskCountToWait, FlushStamp flushStampToWait, bool useQuickKmdSleep);
|
||||
|
||||
void flushWaitList(cl_uint numEventsInWaitList,
|
||||
const cl_event *eventWaitList,
|
||||
bool ndRangeKernel);
|
||||
|
||||
static uint32_t getTaskLevelFromWaitList(uint32_t taskLevel,
|
||||
cl_uint numEventsInWaitList,
|
||||
const cl_event *eventWaitList);
|
||||
|
||||
@@ -634,12 +634,10 @@ void Event::executeCallbacks(int32_t executionStatusIn) {
|
||||
|
||||
void Event::tryFlushEvent() {
|
||||
//only if event is not completed, completed event has already been flushed
|
||||
if (cmdQueue && (updateStatusAndCheckCompletion() == false)) {
|
||||
if (cmdQueue && updateStatusAndCheckCompletion() == false) {
|
||||
//flush the command queue only if it is not blocked event
|
||||
if (taskLevel != Event::eventNotReady) {
|
||||
cl_event ev = this;
|
||||
DBG_LOG(EventsDebugEnable, "tryFlushEvent", this);
|
||||
cmdQueue->flushWaitList(1, &ev, this->getCommandType() == CL_COMMAND_NDRANGE_KERNEL);
|
||||
cmdQueue->getDevice().getCommandStreamReceiver().flushBatchedSubmissions();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,33 +52,3 @@ struct CommandQueueSimpleTest
|
||||
DeviceFixture::TearDown();
|
||||
}
|
||||
};
|
||||
|
||||
HWTEST_F(CommandQueueSimpleTest, flushWaitlistDoesNotFlushSingleEventWhenTaskCountIsAlreadySent) {
|
||||
MockCommandQueue commandQueue(pContext, pDevice, 0);
|
||||
|
||||
MockEvent<Event> event(&commandQueue, CL_COMMAND_NDRANGE_KERNEL, 1, 1);
|
||||
cl_event clEvent = &event;
|
||||
|
||||
auto &csr = pDevice->getUltCommandStreamReceiver<FamilyType>();
|
||||
auto *gfxAllocation = pDevice->getMemoryManager()->allocateGraphicsMemory(4096);
|
||||
IndirectHeap stream(gfxAllocation);
|
||||
|
||||
// Update latestSentTaskCount to == 1
|
||||
DispatchFlags dispatchFlags;
|
||||
dispatchFlags.blocking = true;
|
||||
dispatchFlags.dcFlush = true;
|
||||
|
||||
csr.flushTask(stream, 0, stream, stream, stream, 0, dispatchFlags, *pDevice);
|
||||
|
||||
EXPECT_EQ(1u, csr.peekLatestSentTaskCount());
|
||||
csr.taskCount = 1;
|
||||
// taskLevel less than event's level
|
||||
csr.taskLevel = 0;
|
||||
|
||||
commandQueue.flushWaitList(1, &clEvent, true);
|
||||
|
||||
EXPECT_EQ(0u, csr.peekTaskLevel());
|
||||
EXPECT_EQ(1u, csr.peekTaskCount());
|
||||
|
||||
pDevice->getMemoryManager()->freeGraphicsMemory(gfxAllocation);
|
||||
}
|
||||
|
||||
@@ -438,66 +438,4 @@ HWTEST_F(EnqueueThreading, finish) {
|
||||
|
||||
pCmdQ->finish(false);
|
||||
}
|
||||
|
||||
HWTEST_F(EnqueueThreading, flushWaitList) {
|
||||
createCQ<FamilyType>();
|
||||
auto csr = (CommandStreamReceiverMock<FamilyType> *)&this->pDevice->getCommandStreamReceiver();
|
||||
csr->expectedToFreeCount = 0u;
|
||||
pCmdQ->flushWaitList(0, nullptr, 0);
|
||||
}
|
||||
|
||||
HWTEST_F(EnqueueThreading, flushWaitList_ReleaseOwnershipWhenQueueIsBlocked) {
|
||||
|
||||
class MyMockDevice : public MockDevice {
|
||||
|
||||
public:
|
||||
MyMockDevice() : MockDevice(*platformDevices[0]) {}
|
||||
|
||||
bool takeOwnership(bool waitUntilGet) const override {
|
||||
++takeOwnershipCount;
|
||||
Device::takeOwnership(true);
|
||||
return true;
|
||||
}
|
||||
|
||||
void releaseOwnership() const override {
|
||||
++releaseOwnershipCount;
|
||||
Device::releaseOwnership();
|
||||
}
|
||||
|
||||
mutable uint32_t takeOwnershipCount = 0;
|
||||
mutable uint32_t releaseOwnershipCount = 0;
|
||||
};
|
||||
|
||||
class MockCommandQueue : public CommandQueue {
|
||||
|
||||
public:
|
||||
MockCommandQueue(MyMockDevice *device) : CommandQueue(nullptr, device, 0) {
|
||||
this->myDevice = device;
|
||||
}
|
||||
|
||||
bool isQueueBlocked() override {
|
||||
isQueueBlockedCount++;
|
||||
return (isQueueBlockedCount < 5) ? true : false;
|
||||
}
|
||||
uint32_t isQueueBlockedCount = 0;
|
||||
MyMockDevice *myDevice;
|
||||
};
|
||||
|
||||
auto pMyDevice = new MyMockDevice();
|
||||
ASSERT_NE(nullptr, pMyDevice);
|
||||
|
||||
auto pMyCmdQ = new MockCommandQueue(pMyDevice);
|
||||
ASSERT_NE(nullptr, pMyCmdQ);
|
||||
|
||||
EXPECT_TRUE(pMyCmdQ->isQueueBlocked());
|
||||
|
||||
pMyCmdQ->flushWaitList(0, nullptr, 0);
|
||||
|
||||
EXPECT_EQ(pMyDevice->takeOwnershipCount, 0u);
|
||||
EXPECT_EQ(pMyDevice->releaseOwnershipCount, 0u);
|
||||
|
||||
delete pMyCmdQ;
|
||||
|
||||
delete pMyDevice;
|
||||
}
|
||||
} // namespace ULT
|
||||
|
||||
Reference in New Issue
Block a user