From f005ce6e5e0f032231d9e2de89a523fa4cc20710 Mon Sep 17 00:00:00 2001 From: "Agarwal, Udit" Date: Thu, 9 Jul 2026 17:50:47 +0200 Subject: [PATCH 1/2] [SYCL] Partially revert 'Don't include OpenCL headers when compiling for device' --- sycl/include/sycl/detail/cl.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sycl/include/sycl/detail/cl.h b/sycl/include/sycl/detail/cl.h index d9205992adf14..c76ce749af6f9 100644 --- a/sycl/include/sycl/detail/cl.h +++ b/sycl/include/sycl/detail/cl.h @@ -20,12 +20,16 @@ #define CL_ENABLE_BETA_EXTENSIONS #endif -#ifndef __SYCL_DEVICE_ONLY__ +// FIXME: Drop OpenCL headers from both host and device. +// Can not do that under preview breaking changes, because +// SYCL CTS use -fpreview-breaking-changes and rely on +// SYCL headers to include OpenCL headers. We need to fix +// such tests before we can drop OpenCL headers. +#ifndef __SYCL_EXCLUDE_OCL_HDR__ #include #include #else -// On the SYCL device pass we don't need to include the OpenCL headers. -// Just forward declare the opaque handle types used by SYCL headers. +// Forward declare the opaque handle types used by SYCL headers. // We should not do "using cl_command_queue = void*" because that // can cause redifinition errors if the user application also // includes OpenCL headers. From fd2782152a99886ef282ae57393e0340cc5f2007 Mon Sep 17 00:00:00 2001 From: "Agarwal, Udit" Date: Thu, 9 Jul 2026 21:28:11 +0200 Subject: [PATCH 2/2] Chnage macro name to __SYCL_IGC_COMPILER__ --- sycl/include/sycl/detail/cl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sycl/include/sycl/detail/cl.h b/sycl/include/sycl/detail/cl.h index c76ce749af6f9..8ad2ab5334a24 100644 --- a/sycl/include/sycl/detail/cl.h +++ b/sycl/include/sycl/detail/cl.h @@ -25,7 +25,7 @@ // SYCL CTS use -fpreview-breaking-changes and rely on // SYCL headers to include OpenCL headers. We need to fix // such tests before we can drop OpenCL headers. -#ifndef __SYCL_EXCLUDE_OCL_HDR__ +#ifndef __SYCL_IGC_COMPILER__ #include #include #else