Skip to content

Commit 6294da0

Browse files
committed
Always Store last event if scheduler was not bypassed
1 parent 1050adc commit 6294da0

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

sycl/source/detail/queue_impl.hpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,14 @@ class queue_impl : public std::enable_shared_from_this<queue_impl> {
750750

751751
synchronizeWithExternalEvent(Handler);
752752

753-
return parseEvent(Handler.finalize());
753+
auto Event = parseEvent(Handler.finalize());
754+
755+
if (Event && !Scheduler::CheckEventReadiness(MContext, Event)) {
756+
MDefaultGraphDeps.LastEventPtr = Event;
757+
MNoLastEventMode = false;
758+
}
759+
760+
return Event;
754761
}
755762

756763
template <typename HandlerType = handler>

0 commit comments

Comments
 (0)