[SYCL] Align group and sub_group with SYCL 2020 - #22888
Open
mianowski wants to merge 8 commits into
Open
Conversation
…ed to frienf functions
mianowski
force-pushed
the
feat/group_sub_group_sycl_2020
branch
from
August 6, 2026 12:36
b5992c9 to
68e6c7f
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Updates SYCL group and sub_group APIs to better match SYCL 2020 expectations from #22880 by making previously-throwing interfaces noexcept (terminating on unsupported host paths) and adjusting equality operators to hidden friends.
Changes:
- Marked many
sycl::groupandsycl::sub_groupmember functionsnoexcept; host-only unsupported paths now callstd::terminate(). - Converted
sycl::groupoperator==/!=to hidden friend functions and marked themnoexcept. - Updated
sycl/test/basic_tests/group.cppto use separate “death test” invocations for hoststd::terminate()behavior.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| sycl/test/basic_tests/group.cpp | Converts host exception-based checks into separate crash/death test cases. |
| sycl/include/sycl/sub_group.hpp | Makes sub-group API noexcept and terminates on unsupported host usage. |
| sycl/include/sycl/group.hpp | Makes group API noexcept, terminates on unsupported host usage, and introduces hidden-friend equality operators. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+28
to
+31
| // get_local_id()/get_local_linear_id() are noexcept and call std::terminate() | ||
| // when unimplemented on host, so each case is run as a separate death test | ||
| // rather than caught via try/catch. | ||
| static void runDeathCase(const char *mode) { |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
slawekptak
approved these changes
Aug 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses #22880