Skip to content

Commit fd5b407

Browse files
committed
[SYCL][Doc] Specify one attribute per kernel
Covers multiple cases: - Duplicated sub-group size attributes - [[sub_group_size]] and [[named_sub_group_size]] Signed-off-by: John Pennycook <[email protected]>
1 parent bd68110 commit fd5b407

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sycl/doc/extensions/SubGroup/SYCL_INTEL_sub_group.asciidoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ The +[[intel::sub_group_size(S)]]+ attribute indicates that the kernel must be c
7272

7373
The +[[intel::named_sub_group_size(NAME)]]+ attribute indicates that the kernel must be compiled and executed with a named sub-group size. _NAME_ must be one of the following special tokens: +auto+, +primary+. If _NAME_ is +auto+, the implementation is free to select any of the valid sub-group sizes associated with the device to which the kernel is submitted; the manner in which the sub-group size is selected is implementation-defined. If _NAME_ is +primary+, the implementation will select the device's primary sub-group size (as reported by the +info::device::primary_sub_group_size+ query) for all kernels with this attribute.
7474

75-
If no sub-group size attribute appears on a kernel, the default behavior is as-if +[[intel::named_sub_group_size(auto)]]+ was specified. This behavior may be overridden by an implementation (e.g. via compiler flags).
75+
If no sub-group size attribute appears on a kernel, the default behavior is as-if +[[intel::named_sub_group_size(auto)]]+ was specified. This behavior may be overridden by an implementation (e.g. via compiler flags). Only one sub-group size attribute may appear on a kernel.
7676

7777
There are special requirements whenever a device function defined in one translation unit makes a call to a device function that is defined in a second translation unit. In such a case, the second device function is always declared using +SYCL_EXTERNAL+. If the kernel calling these device functions is defined using a sub-group size attribute, the functions declared using +SYCL_EXTERNAL+ must also be decorated with that same attribute to ensure that the same sub-group size is used. This decoration must exist in both the translation unit making the call and also in the translation unit that defines the function. If the sub-group size attribute is missing in the translation unit that makes the call, or if the sub-group size of the called function does not match the sub-group size of the calling function, the program is ill-formed and the compiler must raise a diagnostic. The +[[intel::named_sub_group_size(auto)]]+ attribute may not be specified on a +SYCL_EXTERNAL+ function.
7878

0 commit comments

Comments
 (0)