Skip to content

Commit 8edf64f

Browse files
Don't overcomplicate
1 parent 855b410 commit 8edf64f

File tree

2 files changed

+5
-12
lines changed

2 files changed

+5
-12
lines changed

sycl/test-e2e/Graph/ValidUsage/linear_graph_copy.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ int main() {
4444
Queue.get_device()};
4545

4646
T *PtrA = malloc_device<T>(Size, Queue);
47-
T *PtrB = malloc_host<T>(Size, Queue);
47+
T *PtrB = malloc_shared<T>(Size, Queue);
4848
T *PtrC = malloc_device<T>(Size, Queue);
4949

5050
Queue.copy(DataA.data(), PtrA, Size);

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)