Skip to content

Commit

Permalink
Merge pull request #1517 from nrspruit/fix_l0_coverity_sync
Browse files Browse the repository at this point in the history
[L0] Store LastCommandEvent before unlock during queue sync
  • Loading branch information
aarongreig committed Apr 19, 2024
2 parents 601062b + f8c4fac commit 717791b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/adapters/level_zero/queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1635,8 +1635,9 @@ ur_result_t ur_queue_handle_t_::synchronize() {
// event.
if (isInOrderQueue() && !LastCommandEvent->IsDiscarded) {
if (UrL0QueueSyncNonBlocking) {
auto SyncZeEvent = LastCommandEvent->ZeEvent;
this->Mutex.unlock();
ZE2UR_CALL(zeHostSynchronize, (LastCommandEvent->ZeEvent));
ZE2UR_CALL(zeHostSynchronize, (SyncZeEvent));
this->Mutex.lock();
} else {
ZE2UR_CALL(zeHostSynchronize, (LastCommandEvent->ZeEvent));
Expand Down

0 comments on commit 717791b

Please sign in to comment.