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

Revert "Fix potential deadlock in the WaitEvent path of CmdBuffers" #2519

Merged
merged 1 commit into from
Jan 6, 2025
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
15 changes: 6 additions & 9 deletions source/adapters/level_zero/command_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1682,28 +1682,25 @@ ur_result_t enqueueWaitEventPath(ur_exp_command_buffer_handle_t CommandBuffer,
(ZeCopyCommandQueue, 1, &CommandBuffer->ZeCopyCommandList, nullptr));
}

ZE2UR_CALL(zeCommandListAppendBarrier,
(SignalCommandList->first, nullptr, 1,
&(CommandBuffer->ExecutionFinishedEvent->ZeEvent)));

// Reset the wait-event for the UR command-buffer that is signaled when its
// submission dependencies have been satisfied.
ZE2UR_CALL(zeCommandListAppendEventReset,
(SignalCommandList->first, CommandBuffer->WaitEvent->ZeEvent));

// Reset the all-reset-event for the UR command-buffer that is signaled when
// all events of the main command-list have been reset.
ZE2UR_CALL(zeCommandListAppendEventReset,
(SignalCommandList->first, CommandBuffer->AllResetEvent->ZeEvent));

if (DoProfiling) {
UR_CALL(appendProfilingQueries(CommandBuffer, SignalCommandList->first,
nullptr, nullptr));
*Event,
CommandBuffer->ExecutionFinishedEvent));
} else {
ZE2UR_CALL(zeCommandListAppendBarrier,
(SignalCommandList->first, (*Event)->ZeEvent, 1,
&(CommandBuffer->ExecutionFinishedEvent->ZeEvent)));
}

ZE2UR_CALL(zeCommandListAppendBarrier,
(SignalCommandList->first, (*Event)->ZeEvent, 0, nullptr));

UR_CALL(Queue->executeCommandList(SignalCommandList, false /*IsBlocking*/,
false /*OKToBatchCommand*/));

Expand Down
Loading