From 66e8c52594cff2565edf2b95cfce24f02b8e351b Mon Sep 17 00:00:00 2001 From: Greg Lueck Date: Thu, 21 May 2026 11:47:37 -0400 Subject: [PATCH] Clarify optional kernel features. Cherry pick #1010 from main (cherry picked from commit 1a17389f247d2123f2a1729d6524a1ad78f934df) --- adoc/chapters/device_compiler.adoc | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/adoc/chapters/device_compiler.adoc b/adoc/chapters/device_compiler.adoc index bf259ca7c..3d8ec1b6c 100644 --- a/adoc/chapters/device_compiler.adoc +++ b/adoc/chapters/device_compiler.adoc @@ -409,17 +409,22 @@ The following aspects are those that correspond to optional kernel features: * [code]#fp64# * [code]#atomic64# -In addition, the following {cpp} attributes from <> also -correspond to optional kernel features because they force the kernel to be -compiled in a way that might not run on all devices: +In addition, the following {cpp} attributes from +correspond to optional kernel features for some integer constant values of +[code]#size#, since not all devices will support arbitrary work group and sub +group sizes. - * [code]#reqd_work_group_size()# - * [code]#reqd_sub_group_size()# + * [code]#reqd_work_group_size(size)# + * [code]#reqd_sub_group_size(size)# In order to guarantee source code portability of SYCL applications that use optional kernel features, all SYCL implementations must be able to compile device code that uses these optional features regardless of whether the implementation supports the features on any of its devices. +For the two C++ attributes listed above, all implementations must be able to +compile kernels that are decorated with these attributes regardless of whether +the implementation supports the specified work-group or sub-group size on any of +its devices. Of course, applications that make use of optional kernel features should ensure that a kernel using such a feature is submitted only to a device that supports