@@ -2869,7 +2869,7 @@ This attribute applies to a loop or a function. It indicates that the
28692869loop/function should allow no more than N threads or iterations to execute it
28702870simultaneously. N must be a non negative integer. '0' indicates the
28712871max_concurrency case to be unbounded. Cannot be applied multiple times to the
2872- same loop.
2872+ same loop or function, or in conjunction with ``disable_loop_pipelining`` .
28732873
28742874.. code-block:: c++
28752875
@@ -2935,17 +2935,18 @@ def SYCLIntelFPGADisableLoopPipeliningAttrDocs : Documentation {
29352935This attribute applies to a loop or a function. Takes no arguments and
29362936disables pipelining of the loop or function data path, causing the loop
29372937or function to be executed serially. Cannot be used on the same loop or
2938- function in conjunction with max_interleaving, speculated_iterations,
2939- max_concurrency, initiation_interval, or ivdep.
2938+ function, or in conjunction with ``max_interleaving``,
2939+ ``speculated_iterations``, ``max_concurrency``, ``initiation_interval``,
2940+ or ``ivdep``.
29402941
29412942.. code-block:: c++
29422943
29432944 void foo() {
29442945 int var = 0;
2945- [[intel::disable_loop_pipelining] for (int i = 0; i < 10; ++i) var++;
2946+ [[intel::disable_loop_pipelining]] for (int i = 0; i < 10; ++i) var++;
29462947 }
29472948
2948- [[intel::disable_loop_pipelining] void foo1() { }
2949+ [[intel::disable_loop_pipelining]] void foo1() { }
29492950
29502951 }];
29512952}
@@ -4353,9 +4354,9 @@ This attribute can be used in both OpenCL and SYCL.
43534354
43544355OpenCL documentation:
43554356The optional attribute intel_reqd_sub_group_size can be used to indicate that
4356- the kernel must be compiled and executed with the specified subgroup size. When
4357+ the kernel must be compiled and executed with the specified sub group size. When
43574358this attribute is present, get_max_sub_group_size() is guaranteed to return the
4358- specified integer value. This is important for the correctness of many subgroup
4359+ specified integer value. This is important for the correctness of many sub group
43594360algorithms, and in some cases may be used by the compiler to generate more optimal
43604361code. See `cl_intel_required_subgroup_size
43614362<https://www.khronos.org/registry/OpenCL/extensions/intel/cl_intel_required_subgroup_size.txt>`
@@ -4366,6 +4367,13 @@ The [[intel::reqd_sub_group_size(n)]] attribute indicates that the kernel must
43664367be compiled and executed with a sub-group of size n. The value of n must be set
43674368to a sub-group size supported by the device, or device compilation will fail.
43684369
4370+ The ``[[intel::sub_group_size(n)]]`` attribute has the same effect as the other
4371+ attribute spellings, except that it follows the SYCL 2020 Attribute Rules. See
4372+ the ``[[intel::named_sub_group_size(NAME)]]`` documentation for clarification.
4373+
4374+ This attribute is mutually exclusive with ``[[intel::named_sub_group_size(NAME)]]``
4375+ and ``[[intel::sycl_explicit_simd]]``.
4376+
43694377In addition to device functions, the required sub-group size attribute may also
43704378be specified in the definition of a named functor object and lambda functions,
43714379as in the examples below:
@@ -4389,6 +4397,47 @@ See Sub-groups for NDRange Parallelism proposal in sycl/doc/extensions/sub_group
43894397 }];
43904398}
43914399
4400+ def IntelNamedSubGroupSizeDocs : Documentation {
4401+ let Category = DocCatFunction;
4402+ let Content = [{
4403+ The ``[[intel::named_sub_group_size(NAME)]]`` attribute works similar to
4404+ ``[[intel::sub_group_size(N)]]`` attribute in that it defines the specific
4405+ sub group size for the kernel. The ``[[intel::named_sub_group_size(NAME)]]``
4406+ form accepts a required parameter of either ``automatic`` or ``primary``.
4407+
4408+ ``automatic`` specifies that the implementation is free to select any of the
4409+ valid sub-group sizes associated with the device to which the kernel is
4410+ submitted. ``primary`` specifies that the implementation should select the
4411+ device's primary sub-group size as reported by
4412+ ``info::device::primary_sub_group_size``.
4413+
4414+ This attribute may not be combined with ``[[intel::sub_group_size(N)]]``, as
4415+ the two attributes have different meanings. It is also mutually exclusive with
4416+ ``[[intel::sycl_explicit_simd]]``.
4417+
4418+ In addition to the attributes, a default sub-group size strategy may be
4419+ specified by the ``-fsycl-default-sub-group-size`` command line option, which
4420+ accepts either ``automatic``, ``primary``, or a default size as an integer.
4421+ These values match and have the same behavior as the ``automatic``, ``primary``,
4422+ and ``[[intel::sub_group_size(N)]]`` values respectively.
4423+
4424+ SYCL 2020 Attribute Rules:
4425+ SYCL 2020 specifies that kernel-type attributes should only be specified on the
4426+ kernel or a ``SYCL_EXTERNAL`` function. This implementation permits these
4427+ attributes to appear on all function declarations for the purposes of
4428+ self-documenting declarations. However, these attributes must match the kernel's
4429+ sub-group size as configured by the command line, or via an attribute
4430+ specifically.
4431+
4432+ In addition to the SYCL 2020 Attribute Rules, this attribute and the
4433+ ``[[intel::sub_group_size(N)]]`` attribute also require that any
4434+ ``SYCL_EXTERNAL`` functions defined in a different translation unit must have a
4435+ matching sub-group size specification, so ``SYCL_EXTERNAL`` functions not
4436+ defined in this translation unit must also have a matching sub-group
4437+ specification to the kernel function that calls it.
4438+ }];
4439+ }
4440+
43924441def OpenCLAccessDocs : Documentation {
43934442 let Category = DocCatStmt;
43944443 let Heading = "__read_only, __write_only, __read_write (read_only, write_only, read_write)";
0 commit comments