Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Candidate for the v0.9.6 release tag #1754

Merged
merged 2 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

cmake_minimum_required(VERSION 3.14.0 FATAL_ERROR)
project(unified-runtime VERSION 0.9.5)
project(unified-runtime VERSION 0.9.6)

include(GNUInstallDirs)
include(CheckCXXSourceCompiles)
Expand Down
17 changes: 8 additions & 9 deletions source/adapters/level_zero/queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1651,15 +1651,9 @@ ur_result_t ur_queue_handle_t_::synchronize() {
// If event is discarded then it can be in reset state or underlying level
// zero handle can have device scope, so we can't synchronize the last
// event.
auto savedLastCommandEvent = LastCommandEvent;
if (isInOrderQueue() && !LastCommandEvent->IsDiscarded) {
if (UrL0QueueSyncNonBlocking) {
auto SyncZeEvent = LastCommandEvent->ZeEvent;
this->Mutex.unlock();
ZE2UR_CALL(zeHostSynchronize, (SyncZeEvent));
this->Mutex.lock();
} else {
ZE2UR_CALL(zeHostSynchronize, (LastCommandEvent->ZeEvent));
}
ZE2UR_CALL(zeHostSynchronize, (LastCommandEvent->ZeEvent));

// clean up all events known to have been completed as well,
// so they can be reused later
Expand Down Expand Up @@ -1699,7 +1693,12 @@ ur_result_t ur_queue_handle_t_::synchronize() {
}
}
}
LastCommandEvent = nullptr;
// If the current version of the LastCommandEvent == savedLastCommandEvent,
// then LastCommandEvent = nullptr; Otherwise, if LastCommandEvent !=
// savedLastCommandEvent, then LastCommandEvent is unchanged.
if (LastCommandEvent == savedLastCommandEvent) {
LastCommandEvent = nullptr;
}
}

// With the entire queue synchronized, the active barriers must be done so we
Expand Down