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 authored and kbenzie committed Apr 19, 2024
1 parent 02e7f28 commit 84d7a49
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 84d7a49

Please sign in to comment.