From d1410743865f8901c55adef8c7f7e9eee68c03c1 Mon Sep 17 00:00:00 2001 From: "Larsen, Steffen" Date: Tue, 5 Mar 2024 01:56:14 -0800 Subject: [PATCH 1/2] [SYCL][Docs] Invert group numbering for ballot groups The current extension for non-uniform groups state that ballot groups are numbered 0 if the predicate was true and 1 if the predicate was false. However, the implementation has the inverse numbering. This commit changes the extension to make the numbering consistent with the implementation, in turn making the group numbering directly convertible to a boolean value equal to the corresponding predicate. Signed-off-by: Larsen, Steffen --- .../experimental/sycl_ext_oneapi_non_uniform_groups.asciidoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sycl/doc/extensions/experimental/sycl_ext_oneapi_non_uniform_groups.asciidoc b/sycl/doc/extensions/experimental/sycl_ext_oneapi_non_uniform_groups.asciidoc index 514e8c8fbe839..186d72aaab9f6 100644 --- a/sycl/doc/extensions/experimental/sycl_ext_oneapi_non_uniform_groups.asciidoc +++ b/sycl/doc/extensions/experimental/sycl_ext_oneapi_non_uniform_groups.asciidoc @@ -337,8 +337,8 @@ id_type get_group_id() const; ---- _Returns_: An `id` representing the index of the ballot-group. -NOTE: This will always be either 0 (representing the group of work-items where -the predicate was true) or 1 (representing the group of work-items where the +NOTE: This will always be either 1 (representing the group of work-items where +the predicate was true) or 0 (representing the group of work-items where the predicate was false). [source,c++] From dabdb7191e1dcbfbb67ce35b6077b29e17ae5ad8 Mon Sep 17 00:00:00 2001 From: "Larsen, Steffen" Date: Thu, 7 Mar 2024 05:01:36 -0800 Subject: [PATCH 2/2] Add line about possibly empty groups Signed-off-by: Larsen, Steffen --- .../experimental/sycl_ext_oneapi_non_uniform_groups.asciidoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sycl/doc/extensions/experimental/sycl_ext_oneapi_non_uniform_groups.asciidoc b/sycl/doc/extensions/experimental/sycl_ext_oneapi_non_uniform_groups.asciidoc index 186d72aaab9f6..50191275a12ff 100644 --- a/sycl/doc/extensions/experimental/sycl_ext_oneapi_non_uniform_groups.asciidoc +++ b/sycl/doc/extensions/experimental/sycl_ext_oneapi_non_uniform_groups.asciidoc @@ -357,6 +357,8 @@ _Returns_: A `range` representing the number of ballot-groups. NOTE: This will always return a `range` of 2, as there will always be two groups; one representing the group of work-items where the predicate was true and another representing the group of work-items where the predicate was false. +It is possible for one of these groups to contain no work-items, if the +predicate has the same value on all work-items. [source,c++] ----