mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-11 16:45:25 +08:00
Rename levelNotReady to notReady
Change-Id: Id482c6edd36d1bdd63558aa35f13dbb57e0efbad Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
5293b26dc6
commit
7ef2e4304c
@@ -37,7 +37,7 @@ void AsyncEventsHandler::registerEvent(Event *event) {
|
||||
}
|
||||
|
||||
Event *AsyncEventsHandler::processList() {
|
||||
uint32_t lowestTaskCount = CompletionStamp::levelNotReady;
|
||||
uint32_t lowestTaskCount = CompletionStamp::notReady;
|
||||
Event *sleepCandidate = nullptr;
|
||||
pendingList.clear();
|
||||
|
||||
|
||||
@@ -360,7 +360,7 @@ void Event::calculateProfilingDataInternal(uint64_t contextStartTS, uint64_t con
|
||||
}
|
||||
|
||||
inline bool Event::wait(bool blocking, bool useQuickKmdSleep) {
|
||||
while (this->taskCount == CompletionStamp::levelNotReady) {
|
||||
while (this->taskCount == CompletionStamp::notReady) {
|
||||
if (blocking == false) {
|
||||
return false;
|
||||
}
|
||||
@@ -369,7 +369,7 @@ inline bool Event::wait(bool blocking, bool useQuickKmdSleep) {
|
||||
cmdQueue->waitUntilComplete(taskCount.load(), flushStamp->peekStamp(), useQuickKmdSleep);
|
||||
updateExecutionStatus();
|
||||
|
||||
DEBUG_BREAK_IF(this->taskLevel == CompletionStamp::levelNotReady && this->executionStatus >= 0);
|
||||
DEBUG_BREAK_IF(this->taskLevel == CompletionStamp::notReady && this->executionStatus >= 0);
|
||||
|
||||
auto *allocationStorage = cmdQueue->getGpgpuCommandStreamReceiver().getInternalAllocationStorage();
|
||||
allocationStorage->cleanAllocationList(this->taskCount, TEMPORARY_ALLOCATION);
|
||||
@@ -378,7 +378,7 @@ inline bool Event::wait(bool blocking, bool useQuickKmdSleep) {
|
||||
}
|
||||
|
||||
void Event::updateExecutionStatus() {
|
||||
if (taskLevel == CompletionStamp::levelNotReady) {
|
||||
if (taskLevel == CompletionStamp::notReady) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -434,11 +434,11 @@ void Event::unblockEventsBlockedByThis(int32_t transitionStatus) {
|
||||
(void)status;
|
||||
DEBUG_BREAK_IF(!(isStatusCompleted(status) || (peekIsSubmitted(status))));
|
||||
|
||||
uint32_t taskLevelToPropagate = CompletionStamp::levelNotReady;
|
||||
uint32_t taskLevelToPropagate = CompletionStamp::notReady;
|
||||
|
||||
if (isStatusCompletedByTermination(transitionStatus) == false) {
|
||||
//if we are event on top of the tree , obtain taskLevel from CSR
|
||||
if (taskLevel == CompletionStamp::levelNotReady) {
|
||||
if (taskLevel == CompletionStamp::notReady) {
|
||||
this->taskLevel = getTaskLevel(); // NOLINT(clang-analyzer-optin.cplusplus.VirtualCall)
|
||||
taskLevelToPropagate = this->taskLevel;
|
||||
} else {
|
||||
@@ -535,7 +535,7 @@ void Event::submitCommand(bool abortTasks) {
|
||||
} else if (profilingCpuPath && endTimeStamp == 0) {
|
||||
setEndTimeStamp();
|
||||
}
|
||||
if (this->taskCount == CompletionStamp::levelNotReady) {
|
||||
if (this->taskCount == CompletionStamp::notReady) {
|
||||
if (!this->isUserEvent() && this->eventWithoutCommand) {
|
||||
if (this->cmdQueue) {
|
||||
auto lockCSR = this->getCommandQueue()->getGpgpuCommandStreamReceiver().obtainUniqueOwnership();
|
||||
@@ -559,7 +559,7 @@ cl_int Event::waitForEvents(cl_uint numEvents,
|
||||
for (const cl_event *it = eventList, *end = eventList + numEvents; it != end; ++it) {
|
||||
Event *event = castToObjectOrAbort<Event>(*it);
|
||||
if (event->cmdQueue) {
|
||||
if (event->taskLevel != CompletionStamp::levelNotReady) {
|
||||
if (event->taskLevel != CompletionStamp::notReady) {
|
||||
event->cmdQueue->flush();
|
||||
}
|
||||
}
|
||||
@@ -609,7 +609,7 @@ inline void Event::unblockEventBy(Event &event, uint32_t taskLevel, int32_t tran
|
||||
}
|
||||
DBG_LOG(EventsDebugEnable, "Event", this, "is unblocked by", &event);
|
||||
|
||||
if (this->taskLevel == CompletionStamp::levelNotReady) {
|
||||
if (this->taskLevel == CompletionStamp::notReady) {
|
||||
this->taskLevel = std::max(cmdQueue->getGpgpuCommandStreamReceiver().peekTaskLevel(), taskLevel);
|
||||
} else {
|
||||
this->taskLevel = std::max(this->taskLevel.load(), taskLevel);
|
||||
@@ -631,7 +631,7 @@ bool Event::updateStatusAndCheckCompletion() {
|
||||
}
|
||||
|
||||
bool Event::isReadyForSubmission() {
|
||||
return taskLevel != CompletionStamp::levelNotReady ? true : false;
|
||||
return taskLevel != CompletionStamp::notReady ? true : false;
|
||||
}
|
||||
|
||||
void Event::addCallback(Callback::ClbFuncT fn, cl_int type, void *data) {
|
||||
@@ -700,7 +700,7 @@ void Event::tryFlushEvent() {
|
||||
//only if event is not completed, completed event has already been flushed
|
||||
if (cmdQueue && updateStatusAndCheckCompletion() == false) {
|
||||
//flush the command queue only if it is not blocked event
|
||||
if (taskLevel != CompletionStamp::levelNotReady) {
|
||||
if (taskLevel != CompletionStamp::notReady) {
|
||||
cmdQueue->getGpgpuCommandStreamReceiver().flushBatchedSubmissions();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -244,13 +244,13 @@ class Event : public BaseObject<_cl_event>, public IDNode<Event> {
|
||||
virtual void unblockEventBy(Event &event, uint32_t taskLevel, int32_t transitionStatus);
|
||||
|
||||
void updateTaskCount(uint32_t taskCount) {
|
||||
if (taskCount == CompletionStamp::levelNotReady) {
|
||||
if (taskCount == CompletionStamp::notReady) {
|
||||
DEBUG_BREAK_IF(true);
|
||||
return;
|
||||
}
|
||||
|
||||
uint32_t prevTaskCount = this->taskCount.exchange(taskCount);
|
||||
if ((prevTaskCount != CompletionStamp::levelNotReady) && (prevTaskCount > taskCount)) {
|
||||
if ((prevTaskCount != CompletionStamp::notReady) && (prevTaskCount > taskCount)) {
|
||||
this->taskCount = prevTaskCount;
|
||||
DEBUG_BREAK_IF(true);
|
||||
}
|
||||
@@ -322,7 +322,7 @@ class Event : public BaseObject<_cl_event>, public IDNode<Event> {
|
||||
bool calcProfilingData();
|
||||
MOCKABLE_VIRTUAL void calculateProfilingDataInternal(uint64_t contextStartTS, uint64_t contextEndTS, uint64_t *contextCompleteTS, uint64_t globalStartTS);
|
||||
MOCKABLE_VIRTUAL void synchronizeTaskCount() {
|
||||
while (this->taskCount == CompletionStamp::levelNotReady)
|
||||
while (this->taskCount == CompletionStamp::notReady)
|
||||
;
|
||||
};
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ void EventBuilder::finalize() {
|
||||
|
||||
//do not add as child if:
|
||||
//parent has no parents and is not blocked
|
||||
if (!(parent->peekIsBlocked() == false && parent->taskLevel != CompletionStamp::levelNotReady) ||
|
||||
if (!(parent->peekIsBlocked() == false && parent->taskLevel != CompletionStamp::notReady) ||
|
||||
(!parent->isEventWithoutCommand() && !parent->peekIsCmdSubmitted())) {
|
||||
parent->addChild(*this->event);
|
||||
}
|
||||
|
||||
@@ -46,14 +46,14 @@ void EventsTracker::dumpQueue(CommandQueue *cmdQ, std::ostream &out, CmdqSet &du
|
||||
out << label(cmdQ) << "[label=\"{------CmdQueue, ptr=" << cmdQ << "------|task count=";
|
||||
auto taskCount = cmdQ->taskCount;
|
||||
auto taskLevel = cmdQ->taskLevel;
|
||||
if (taskCount == CompletionStamp::levelNotReady) {
|
||||
if (taskCount == CompletionStamp::notReady) {
|
||||
out << "NOT_READY";
|
||||
} else {
|
||||
out << taskCount;
|
||||
}
|
||||
|
||||
out << ", level=";
|
||||
if (taskLevel == CompletionStamp::levelNotReady) {
|
||||
if (taskLevel == CompletionStamp::notReady) {
|
||||
out << "NOT_READY";
|
||||
} else {
|
||||
out << taskLevel;
|
||||
@@ -96,14 +96,14 @@ void EventsTracker::dumpNode(Event *node, std::ostream &out, const EventIdMap &e
|
||||
"|"
|
||||
<< commandType << "|" << status[statusId] << "|"
|
||||
"task count=";
|
||||
if (taskCount == CompletionStamp::levelNotReady) {
|
||||
if (taskCount == CompletionStamp::notReady) {
|
||||
out << "NOT_READY";
|
||||
} else {
|
||||
out << taskCount;
|
||||
}
|
||||
|
||||
out << ", level=";
|
||||
if (taskLevel == CompletionStamp::levelNotReady) {
|
||||
if (taskLevel == CompletionStamp::notReady) {
|
||||
out << "NOT_READY";
|
||||
} else {
|
||||
out << taskLevel;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
namespace NEO {
|
||||
|
||||
UserEvent::UserEvent(Context *ctx)
|
||||
: Event(ctx, nullptr, CL_COMMAND_USER, CompletionStamp::levelNotReady, CompletionStamp::levelNotReady) {
|
||||
: Event(ctx, nullptr, CL_COMMAND_USER, CompletionStamp::notReady, CompletionStamp::notReady) {
|
||||
transitionExecutionStatus(CL_QUEUED);
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ uint32_t UserEvent::getTaskLevel() {
|
||||
if (peekExecutionStatus() == CL_COMPLETE) {
|
||||
return 0;
|
||||
}
|
||||
return CompletionStamp::levelNotReady;
|
||||
return CompletionStamp::notReady;
|
||||
}
|
||||
|
||||
bool UserEvent::isInitialEventStatus() const {
|
||||
@@ -45,7 +45,7 @@ bool UserEvent::isInitialEventStatus() const {
|
||||
}
|
||||
|
||||
VirtualEvent::VirtualEvent(CommandQueue *cmdQ, Context *ctx)
|
||||
: Event(ctx, cmdQ, -1, CompletionStamp::levelNotReady, CompletionStamp::levelNotReady) {
|
||||
: Event(ctx, cmdQ, -1, CompletionStamp::notReady, CompletionStamp::notReady) {
|
||||
transitionExecutionStatus(CL_QUEUED);
|
||||
|
||||
// internal object - no need for API refcount
|
||||
|
||||
Reference in New Issue
Block a user