From 9072919ac32e57903e01e94867b992ccbdec7c6e Mon Sep 17 00:00:00 2001 From: Artur Gainullin Date: Thu, 25 Aug 2022 00:46:02 -0700 Subject: [PATCH] [SYCL] Make checks more robust in the level_zero_device_scope_events.cpp --- .../Plugin/level_zero_device_scope_events.cpp | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/SYCL/Plugin/level_zero_device_scope_events.cpp b/SYCL/Plugin/level_zero_device_scope_events.cpp index d4b7904072..425b6e0eeb 100644 --- a/SYCL/Plugin/level_zero_device_scope_events.cpp +++ b/SYCL/Plugin/level_zero_device_scope_events.cpp @@ -9,27 +9,26 @@ // event created is at the end of all kernels submission, when host waits for // the last kernel's event. // +// clang-format off // MODE1-LABEL: Submitted all kernels // MODE1: ---> piEventsWait( // MODE1-NEXT: : 1 -// MODE1: PI ---> EventCreate(Queue->Context, Queue, ForceHostVisible +// MODE1: ze_event_pool_desc_t flags set to: 1 // MODE1: ZE ---> zeEventCreate(ZeEventPool, &ZeEventDesc, &ZeEvent) -// MODE1: ZE ---> zeCommandListAppendWaitOnEvents(CommandList->first, 1, -// &ZeEvent) MODE1-NEXT: ZE ---> -// zeCommandListAppendSignalEvent(CommandList->first, HostVisibleEvent->ZeEvent) +// MODE1: ZE ---> zeCommandListAppendWaitOnEvents(CommandList->first, 1, &ZeEvent) +// MODE1-NEXT: ZE ---> zeCommandListAppendSignalEvent(CommandList->first, HostVisibleEvent->ZeEvent) // MODE1: Completed all kernels // With the SYCL_PI_LEVEL_ZERO_DEVICE_SCOPE_EVENTS=2 mode look for pattern that // creates host-visible event just before command-list submission. // -// MODE2: PI ---> EventCreate(Queue->Context, Queue, ForceHostVisible +// MODE2: ze_event_pool_desc_t flags set to: 1 // MODE2: ZE ---> zeEventCreate(ZeEventPool, &ZeEventDesc, &ZeEvent) -// MODE2: ZE ---> zeCommandListAppendSignalEvent(CommandList->first, -// HostVisibleEvent->ZeEvent) MODE2: ZE ---> -// zeCommandListClose(CommandList->first) MODE2: ZE ---> -// zeCommandQueueExecuteCommandLists(ZeCommandQueue, 1, &ZeCommandList, -// CommandList->second.ZeFence) -/// +// MODE2: ZE ---> zeCommandListAppendSignalEvent(CommandList->first, HostVisibleEvent->ZeEvent) +// MODE2: ZE ---> zeCommandListClose(CommandList->first) +// MODE2: ZE ---> zeCommandQueueExecuteCommandLists(ZeCommandQueue, 1, &ZeCommandList, CommandList->second.ZeFence) +// clang-format on + #include #include