@@ -356,9 +356,11 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase<queue> {
356356 };
357357
358358 return submit_impl_and_postprocess (CGF, TlsCodeLocCapture.query (),
359- PostProcess);
359+ PostProcess,
360+ TlsCodeLocCapture.isToplevel ());
360361#else
361- return submit_impl (CGF, TlsCodeLocCapture.query ());
362+ return submit_impl (CGF, TlsCodeLocCapture.query (),
363+ TlsCodeLocCapture.isToplevel ());
362364#endif // __SYCL_USE_FALLBACK_ASSERT
363365 }
364366
@@ -395,9 +397,11 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase<queue> {
395397 };
396398
397399 return submit_impl_and_postprocess (CGF, SecondaryQueue,
398- TlsCodeLocCapture.query (), PostProcess);
400+ TlsCodeLocCapture.query (), PostProcess,
401+ TlsCodeLocCapture.isToplevel ());
399402#else
400- return submit_impl (CGF, SecondaryQueue, TlsCodeLocCapture.query ());
403+ return submit_impl (CGF, SecondaryQueue, TlsCodeLocCapture.query (),
404+ TlsCodeLocCapture.isToplevel ());
401405#endif // __SYCL_USE_FALLBACK_ASSERT
402406 }
403407
@@ -2690,13 +2694,20 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase<queue> {
26902694 // / A template-free version of submit.
26912695 event submit_impl (std::function<void (handler &)> CGH,
26922696 const detail::code_location &CodeLoc);
2697+ event submit_impl (std::function<void (handler &)> CGH,
2698+ const detail::code_location &CodeLoc, bool IsTopCodeLoc);
26932699 // / A template-free version of submit.
26942700 event submit_impl (std::function<void (handler &)> CGH, queue secondQueue,
26952701 const detail::code_location &CodeLoc);
2702+ event submit_impl (std::function<void (handler &)> CGH, queue secondQueue,
2703+ const detail::code_location &CodeLoc, bool IsTopCodeLoc);
26962704
26972705 // / A template-free version of submit_without_event.
26982706 void submit_without_event_impl (std::function<void (handler &)> CGH,
26992707 const detail::code_location &CodeLoc);
2708+ void submit_without_event_impl (std::function<void (handler &)> CGH,
2709+ const detail::code_location &CodeLoc,
2710+ bool IsTopCodeLoc);
27002711
27012712 // / Submits a command group function object to the queue, in order to be
27022713 // / scheduled for execution on the device.
@@ -2712,7 +2723,8 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase<queue> {
27122723 // TODO: Revisit whether we can avoid this.
27132724 submit (CGF, TlsCodeLocCapture.query ());
27142725#else
2715- submit_without_event_impl (CGF, TlsCodeLocCapture.query ());
2726+ submit_without_event_impl (CGF, TlsCodeLocCapture.query (),
2727+ TlsCodeLocCapture.isToplevel ());
27162728#endif // __SYCL_USE_FALLBACK_ASSERT
27172729 }
27182730
@@ -2732,6 +2744,10 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase<queue> {
27322744 event submit_impl_and_postprocess (std::function<void (handler &)> CGH,
27332745 const detail::code_location &CodeLoc,
27342746 const SubmitPostProcessF &PostProcess);
2747+ event submit_impl_and_postprocess (std::function<void (handler &)> CGH,
2748+ const detail::code_location &CodeLoc,
2749+ const SubmitPostProcessF &PostProcess,
2750+ bool IsTopCodeLoc);
27352751 // / A template-free version of submit.
27362752 // / \param CGH command group function/handler
27372753 // / \param secondQueue fallback queue
@@ -2742,6 +2758,11 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase<queue> {
27422758 queue secondQueue,
27432759 const detail::code_location &CodeLoc,
27442760 const SubmitPostProcessF &PostProcess);
2761+ event submit_impl_and_postprocess (std::function<void (handler &)> CGH,
2762+ queue secondQueue,
2763+ const detail::code_location &CodeLoc,
2764+ const SubmitPostProcessF &PostProcess,
2765+ bool IsTopCodeLoc);
27452766
27462767 // / parallel_for_impl with a kernel represented as a lambda + range that
27472768 // / specifies global size only.
0 commit comments