Skip to content

Commit 99963be

Browse files
Don't overcomplicate
1 parent 855b410 commit 99963be

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

unified-runtime/source/adapters/level_zero/command_buffer.cpp

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -879,23 +879,16 @@ finalizeWaitEventPath(ur_exp_command_buffer_handle_t CommandBuffer) {
879879

880880
// Reset the L0 events we use for command-buffer sync-points to the
881881
// non-signaled state. This is required for multiple submissions.
882-
auto resetEvents = [&CommandBuffer]() -> ur_result_t {
883-
for (auto &Event : CommandBuffer->ZeEventsList) {
884-
ZE2UR_CALL(zeCommandListAppendEventReset,
885-
(CommandBuffer->ZeCommandListResetEvents, Event));
886-
}
887-
return UR_RESULT_SUCCESS;
888-
};
882+
for (auto &Event : CommandBuffer->ZeEventsList) {
883+
ZE2UR_CALL(zeCommandListAppendEventReset,
884+
(CommandBuffer->ZeCommandListResetEvents, Event));
885+
}
889886

890887
if (CommandBuffer->IsInOrderCmdList) {
891-
if (!CommandBuffer->MCopyCommandListEmpty) {
892-
resetEvents();
893-
}
894888
ZE2UR_CALL(zeCommandListAppendSignalEvent,
895889
(CommandBuffer->ZeComputeCommandList,
896890
CommandBuffer->ExecutionFinishedEvent->ZeEvent));
897891
} else {
898-
resetEvents();
899892
// Wait for all the user added commands to complete, and signal the
900893
// command-buffer signal-event when they are done.
901894
ZE2UR_CALL(zeCommandListAppendBarrier,

0 commit comments

Comments
 (0)