mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 23:03:02 +08:00
Do not use peekIsCompleted in isQueueBlocked.
- This causes event tree update if virtual event is holding commands or callbacks - That causes race between other threads that may be updating the tree Change-Id: Ic80a8b71ed1e1c1deab8af1bc64f8ce81c21de1b
This commit is contained in:
@@ -164,7 +164,7 @@ bool CommandQueue::isQueueBlocked() {
|
||||
TakeOwnershipWrapper<CommandQueue> takeOwnershipWrapper(*this);
|
||||
//check if we have user event and if so, if it is in blocked state.
|
||||
if (this->virtualEvent) {
|
||||
if (this->virtualEvent->peekIsCompleted()) {
|
||||
if (this->virtualEvent->peekExecutionStatus() <= CL_COMPLETE) {
|
||||
UNRECOVERABLE_IF(this->virtualEvent == nullptr);
|
||||
|
||||
if (this->virtualEvent->peekIsCompletedByTermination() == false) {
|
||||
|
||||
@@ -534,7 +534,11 @@ inline void Event::unblockEventBy(Event &event, uint32_t taskLevel, int32_t tran
|
||||
}
|
||||
DBG_LOG(EventsDebugEnable, "Event", this, "is unblocked by", &event);
|
||||
|
||||
this->taskLevel = taskLevel;
|
||||
if (this->taskLevel == Event::eventNotReady) {
|
||||
this->taskLevel = taskLevel;
|
||||
} else {
|
||||
this->taskLevel = std::max(this->taskLevel.load(), taskLevel);
|
||||
}
|
||||
|
||||
int32_t statusToPropagate = CL_SUBMITTED;
|
||||
if (peekIsCompletedByTermination(&blockerStatus)) {
|
||||
|
||||
Reference in New Issue
Block a user