@@ -158,10 +158,13 @@ void launch_grouped(const queue &q, range<1> r, range<1> size, KernelType &&k,
158158                    const  sycl::detail::code_location &codeLoc =
159159                        sycl::detail::code_location::current ()) {
160160#ifdef  __DPCPP_ENABLE_UNFINISHED_NO_CGH_SUBMIT
161-   //  TODO The handler-less path does not support kernel function properties yet.
161+   //  TODO The handler-less path does not support kernel function properties
162+   //  and kernel functions with the kernel_handler type argument yet.
162163  if  constexpr  (!(ext::oneapi::experimental::detail::
163164                      HasKernelPropertiesGetMethod<
164-                           const  KernelType &>::value)) {
165+                           const  KernelType &>::value) &&
166+                 !(detail::KernelLambdaHasKernelHandlerArgT<
167+                     KernelType, sycl::nd_item<1 >>::value)) {
165168    detail::submit_kernel_direct (
166169        q, ext::oneapi::experimental::empty_properties_t {},
167170        nd_range<1 >(r, size), std::forward<KernelType>(k));
@@ -179,10 +182,13 @@ void launch_grouped(const queue &q, range<2> r, range<2> size, KernelType &&k,
179182                    const  sycl::detail::code_location &codeLoc =
180183                        sycl::detail::code_location::current ()) {
181184#ifdef  __DPCPP_ENABLE_UNFINISHED_NO_CGH_SUBMIT
182-   //  TODO The handler-less path does not support kernel function properties yet.
185+   //  TODO The handler-less path does not support kernel function properties
186+   //  and kernel functions with the kernel_handler type argument yet.
183187  if  constexpr  (!(ext::oneapi::experimental::detail::
184188                      HasKernelPropertiesGetMethod<
185-                           const  KernelType &>::value)) {
189+                           const  KernelType &>::value) &&
190+                 !(detail::KernelLambdaHasKernelHandlerArgT<
191+                     KernelType, sycl::nd_item<2 >>::value)) {
186192    detail::submit_kernel_direct (
187193        q, ext::oneapi::experimental::empty_properties_t {},
188194        nd_range<2 >(r, size), std::forward<KernelType>(k));
@@ -200,10 +206,13 @@ void launch_grouped(const queue &q, range<3> r, range<3> size, KernelType &&k,
200206                    const  sycl::detail::code_location &codeLoc =
201207                        sycl::detail::code_location::current ()) {
202208#ifdef  __DPCPP_ENABLE_UNFINISHED_NO_CGH_SUBMIT
203-   //  TODO The handler-less path does not support kernel function properties yet.
209+   //  TODO The handler-less path does not support kernel function properties
210+   //  and kernel functions with the kernel_handler type argument yet.
204211  if  constexpr  (!(ext::oneapi::experimental::detail::
205212                      HasKernelPropertiesGetMethod<
206-                           const  KernelType &>::value)) {
213+                           const  KernelType &>::value) &&
214+                 !(detail::KernelLambdaHasKernelHandlerArgT<
215+                     KernelType, sycl::nd_item<3 >>::value)) {
207216    detail::submit_kernel_direct (
208217        q, ext::oneapi::experimental::empty_properties_t {},
209218        nd_range<3 >(r, size), std::forward<KernelType>(k));
0 commit comments