Skip to content

Commit 1b762a8

Browse files
[SYCL] Remove the w/a for hanging zeEventHostSynchronize (#2023)
Signed-off-by: Sergey V Maslov <[email protected]>
1 parent aad7c1c commit 1b762a8

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

sycl/plugins/level_zero/pi_level0.cpp

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2382,7 +2382,6 @@ pi_result piEventGetProfilingInfo(pi_event Event, pi_profiling_info ParamName,
23822382
}
23832383

23842384
pi_result piEventsWait(pi_uint32 NumEvents, const pi_event *EventList) {
2385-
ze_result_t ZeResult;
23862385

23872386
if (NumEvents && !EventList) {
23882387
return PI_INVALID_EVENT;
@@ -2391,15 +2390,7 @@ pi_result piEventsWait(pi_uint32 NumEvents, const pi_event *EventList) {
23912390
for (uint32_t I = 0; I < NumEvents; I++) {
23922391
ze_event_handle_t ZeEvent = EventList[I]->ZeEvent;
23932392
zePrint("ZeEvent = %lx\n", pi_cast<std::uintptr_t>(ZeEvent));
2394-
// TODO: Using UINT32_MAX for timeout should have the desired
2395-
// effect of waiting until the event is trigerred, but it seems that
2396-
// it is causing an OS crash, so use an interruptable loop for now.
2397-
do {
2398-
ZeResult = ZE_CALL_NOCHECK(zeEventHostSynchronize(ZeEvent, 100000));
2399-
} while (ZeResult == ZE_RESULT_NOT_READY);
2400-
2401-
// Check the result to be success.
2402-
ZE_CALL(ZeResult);
2393+
ZE_CALL(zeEventHostSynchronize(ZeEvent, UINT32_MAX));
24032394

24042395
// NOTE: we are destroying associated command lists here to free
24052396
// resources sooner in case RT is not calling piEventRelease soon enough.

0 commit comments

Comments
 (0)