@@ -278,6 +278,8 @@ class __SYCL_EXPORT queue {
278278 device get_device () const ;
279279
280280 // / \return true if this queue is a SYCL host queue.
281+ __SYCL2020_DEPRECATED (
282+ " is_host() is deprecated as the host device is no longer supported." )
281283 bool is_host () const ;
282284
283285 // / Queries SYCL queue for information.
@@ -302,28 +304,24 @@ class __SYCL_EXPORT queue {
302304 _CODELOCARG (&CodeLoc);
303305
304306#if __SYCL_USE_FALLBACK_ASSERT
305- if (! is_host ()) {
306- auto PostProcess = [ this , &CodeLoc]( bool IsKernel, bool KernelUsesAssert,
307- event &E) {
308- if (IsKernel && !device_has (aspect::ext_oneapi_native_assert) &&
309- KernelUsesAssert && ! device_has (aspect::accelerator)) {
310- // __devicelib_assert_fail isn't supported by Device-side Runtime
311- // Linking against fallback impl of __devicelib_assert_fail is
312- // performed by program manager class
313- // Fallback assert isn't supported for FPGA
314- submitAssertCapture (* this , E, /* SecondaryQueue = */ nullptr ,
315- CodeLoc) ;
316- }
317- } ;
318-
319- auto Event = submit_impl_and_postprocess (CGF, CodeLoc, PostProcess);
320- return discard_or_return (Event );
321- } else
307+ auto PostProcess = [ this , &CodeLoc]( bool IsKernel, bool KernelUsesAssert,
308+ event &E) {
309+ if (IsKernel && ! device_has (aspect::ext_oneapi_native_assert) &&
310+ KernelUsesAssert && !device_has (aspect::accelerator)) {
311+ // __devicelib_assert_fail isn't supported by Device-side Runtime
312+ // Linking against fallback impl of __devicelib_assert_fail is
313+ // performed by program manager class
314+ // Fallback assert isn't supported for FPGA
315+ submitAssertCapture (* this , E, /* SecondaryQueue = */ nullptr , CodeLoc);
316+ }
317+ } ;
318+
319+ auto Event = submit_impl_and_postprocess (CGF, CodeLoc, PostProcess) ;
320+ return discard_or_return (Event);
321+ # else
322+ auto Event = submit_impl (CGF, CodeLoc );
323+ return discard_or_return (Event);
322324#endif // __SYCL_USE_FALLBACK_ASSERT
323- {
324- auto Event = submit_impl (CGF, CodeLoc);
325- return discard_or_return (Event);
326- }
327325 }
328326
329327 // / Submits a command group function object to the queue, in order to be
@@ -342,34 +340,27 @@ class __SYCL_EXPORT queue {
342340 _CODELOCARG (&CodeLoc);
343341
344342#if __SYCL_USE_FALLBACK_ASSERT
345- if (!is_host ()) {
346- auto PostProcess = [this , &SecondaryQueue, &CodeLoc](
347- bool IsKernel, bool KernelUsesAssert, event &E) {
348- if (IsKernel && !device_has (aspect::ext_oneapi_native_assert) &&
349- KernelUsesAssert && !device_has (aspect::accelerator)) {
350- // Only secondary queues on devices need to be added to the assert
351- // capture.
352- // TODO: Handle case where primary queue is host but the secondary
353- // queue is not.
354- queue *DeviceSecondaryQueue =
355- SecondaryQueue.is_host () ? nullptr : &SecondaryQueue;
356- // __devicelib_assert_fail isn't supported by Device-side Runtime
357- // Linking against fallback impl of __devicelib_assert_fail is
358- // performed by program manager class
359- // Fallback assert isn't supported for FPGA
360- submitAssertCapture (*this , E, DeviceSecondaryQueue, CodeLoc);
361- }
362- };
363-
364- auto Event = submit_impl_and_postprocess (CGF, SecondaryQueue, CodeLoc,
365- PostProcess);
366- return discard_or_return (Event);
367- } else
343+ auto PostProcess = [this , &SecondaryQueue, &CodeLoc](
344+ bool IsKernel, bool KernelUsesAssert, event &E) {
345+ if (IsKernel && !device_has (aspect::ext_oneapi_native_assert) &&
346+ KernelUsesAssert && !device_has (aspect::accelerator)) {
347+ // Only secondary queues on devices need to be added to the assert
348+ // capture.
349+ // __devicelib_assert_fail isn't supported by Device-side Runtime
350+ // Linking against fallback impl of __devicelib_assert_fail is
351+ // performed by program manager class
352+ // Fallback assert isn't supported for FPGA
353+ submitAssertCapture (*this , E, &SecondaryQueue, CodeLoc);
354+ }
355+ };
356+
357+ auto Event =
358+ submit_impl_and_postprocess (CGF, SecondaryQueue, CodeLoc, PostProcess);
359+ return discard_or_return (Event);
360+ #else
361+ auto Event = submit_impl (CGF, SecondaryQueue, CodeLoc);
362+ return discard_or_return (Event);
368363#endif // __SYCL_USE_FALLBACK_ASSERT
369- {
370- auto Event = submit_impl (CGF, SecondaryQueue, CodeLoc);
371- return discard_or_return (Event);
372- }
373364 }
374365
375366 // / Prevents any commands submitted afterward to this queue from executing
0 commit comments