diff --git a/sycl/source/detail/queue_impl.cpp b/sycl/source/detail/queue_impl.cpp index 466a314939024..a107ee491dfe3 100644 --- a/sycl/source/detail/queue_impl.cpp +++ b/sycl/source/detail/queue_impl.cpp @@ -333,7 +333,6 @@ queue_impl::submit_impl(const detail::type_erased_cgfo_ty &CGF, #else handler Handler(shared_from_this(), CallerNeedsEvent); #endif - detail::handler_impl &HandlerImpl = *detail::getSyclObjImpl(Handler); #ifdef XPTI_ENABLE_INSTRUMENTATION if (xptiTraceEnabled()) { @@ -346,6 +345,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. diff --git a/sycl/test-e2e/Reduction/lit.local.cfg b/sycl/test-e2e/Reduction/lit.local.cfg deleted file mode 100644 index 6b085324f1c83..0000000000000 --- a/sycl/test-e2e/Reduction/lit.local.cfg +++ /dev/null @@ -1,4 +0,0 @@ -# https://github.com/intel/llvm/issues/19680 -# https://github.com/intel/llvm/issues/19767 -if 'run-mode' in config.available_features: - config.unsupported_features += ['true']