Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion sycl/source/detail/queue_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,6 @@ queue_impl::submit_impl(const detail::type_erased_cgfo_ty &CGF,
#else
handler Handler(shared_from_this(), SecondaryQueue, CallerNeedsEvent);
#endif
detail::handler_impl &HandlerImpl = *detail::getSyclObjImpl(Handler);

#ifdef XPTI_ENABLE_INSTRUMENTATION
if (xptiTraceEnabled()) {
Expand All @@ -326,6 +325,10 @@ queue_impl::submit_impl(const detail::type_erased_cgfo_ty &CGF,
CGF(Handler);
}

// We might swap handlers as part of the CGH(Handler) call in the reduction
// case, so need to retrieve the handler_impl reference after that.
detail::handler_impl &HandlerImpl = *detail::getSyclObjImpl(Handler);

// Scheduler will later omit events, that are not required to execute tasks.
// Host and interop tasks, however, are not submitted to low-level runtimes
// and require separate dependency management.
Expand Down
Loading