Skip to content

[SYCL] Align group and sub_group with SYCL 2020 - #22888

Open
mianowski wants to merge 8 commits into
intel:syclfrom
mianowski:feat/group_sub_group_sycl_2020
Open

[SYCL] Align group and sub_group with SYCL 2020#22888
mianowski wants to merge 8 commits into
intel:syclfrom
mianowski:feat/group_sub_group_sycl_2020

Conversation

@mianowski

@mianowski mianowski commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Addresses #22880

@mianowski mianowski changed the title Feat/group sub group sycl 2020 [SYCL] Align group and sub_group with SYCL 2020 Aug 6, 2026
@mianowski
mianowski force-pushed the feat/group_sub_group_sycl_2020 branch from b5992c9 to 68e6c7f Compare August 6, 2026 12:36
@mianowski mianowski self-assigned this Aug 6, 2026
@mianowski
mianowski marked this pull request as ready for review August 20, 2026 09:56
@mianowski
mianowski requested a review from a team as a code owner August 20, 2026 09:56
@mianowski
mianowski requested review from slawekptak and a lite review from Copilot August 20, 2026 09:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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::group and sycl::sub_group member functions noexcept; host-only unsupported paths now call std::terminate().
  • Converted sycl::group operator==/!= to hidden friend functions and marked them noexcept.
  • Updated sycl/test/basic_tests/group.cpp to use separate “death test” invocations for host std::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 thread sycl/include/sycl/group.hpp Outdated
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants