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.10.8 release tag #2136

Merged
merged 1 commit into from
Sep 26, 2024
Merged
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
26 changes: 10 additions & 16 deletions source/adapters/level_zero/event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,14 +197,13 @@ ur_queue_handle_legacy_t_::enqueueEventsWaitWithBarrier( ///< [in] handle of the
//
if (Queue->isInOrderQueue() && InOrderBarrierBySignal &&
!Queue->isProfilingEnabled()) {
// If we are using driver in order lists, then append wait on events
// is unnecessary IF the cmdlists match.
if (EventWaitList.Length) {
if (CmdList->second.IsInOrderList) {
for (unsigned i = EventWaitList.Length; i-- < 0;) {
// if the events is from the same cmdlist, we can remove it
// from the waitlist.
if (EventWaitList.UrEventList[i]->CommandList == CmdList) {
for (unsigned i = EventWaitList.Length; i-- > 0;) {
// If the event is a multidevice event, then given driver in order
// lists, we cannot include this into the wait event list due to
// driver limitations.
if (EventWaitList.UrEventList[i]->IsMultiDevice) {
EventWaitList.Length--;
if (EventWaitList.Length != i) {
std::swap(EventWaitList.UrEventList[i],
Expand Down Expand Up @@ -1553,16 +1552,11 @@ ur_result_t _ur_ze_event_list_t::createAndRetainUrZeEventList(
const auto &ZeCommandList = CommandList->first;
EventList[I]->RefCount.increment();

ZE2UR_CALL(zeCommandListAppendWaitOnEvents,
(ZeCommandList, 1u, &EventList[I]->ZeEvent));
if (!MultiDeviceEvent->CounterBasedEventsEnabled) {
ZE2UR_CALL(zeEventHostSignal, (MultiDeviceZeEvent));
} else {
ZE2UR_CALL(zeCommandListAppendSignalEvent,
(ZeCommandList, MultiDeviceZeEvent));
}
MultiDeviceEvent->Completed = true;

// Append a Barrier to wait on the original event while signalling the
// new multi device event.
ZE2UR_CALL(
zeCommandListAppendBarrier,
(ZeCommandList, MultiDeviceZeEvent, 1u, &EventList[I]->ZeEvent));
UR_CALL(Queue->executeCommandList(CommandList, /* IsBlocking */ false,
/* OkToBatchCommand */ true));

Expand Down
Loading