Skip to content

Commit 9811ef2

Browse files
[SYCL][L0] Add a barrier before signal of host-visible proxy (#7205)
Signed-off-by: Sergey V Maslov <sergey.v.maslov@intel.com>
1 parent f736d5e commit 9811ef2

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

sycl/plugins/level_zero/pi_level_zero.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1670,11 +1670,10 @@ pi_result _pi_queue::executeCommandList(pi_command_list_ptr_t CommandList,
16701670
HostVisibleEvent->CleanedUp = true;
16711671

16721672
// Finally set to signal the host-visible event at the end of the
1673-
// command-list.
1674-
// TODO: see if we need a barrier here (or explicit wait for all events
1675-
// in the batch).
1676-
ZE_CALL(zeCommandListAppendSignalEvent,
1677-
(CommandList->first, HostVisibleEvent->ZeEvent));
1673+
// command-list after a barrier that waits for all commands
1674+
// completion.
1675+
ZE_CALL(zeCommandListAppendBarrier,
1676+
(CommandList->first, HostVisibleEvent->ZeEvent, 0, nullptr));
16781677
}
16791678
}
16801679

0 commit comments

Comments
 (0)