Skip to content

[SYCL][NFC] Don't use legacy group functions - #23071

Merged
KornevNikita merged 1 commit into
intel:syclfrom
KornevNikita:upd-use-of-legacy-funcs
Sep 2, 2026
Merged

[SYCL][NFC] Don't use legacy group functions#23071
KornevNikita merged 1 commit into
intel:syclfrom
KornevNikita:upd-use-of-legacy-funcs

Conversation

@KornevNikita

Copy link
Copy Markdown
Contributor

use new instead.

@KornevNikita
KornevNikita requested a lite review from Copilot September 1, 2026 12:09

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.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Pull request overview

Updates SYCL stream group-printing to avoid legacy group APIs by switching to newer group identifiers and recomputing derived ranges.

Changes:

  • Replace Group.get_id() with Group.get_group_id()
  • Stop using Group.get_global_range() by deriving global range from group_range and max_local_range
  • Reuse group_range via a local variable to avoid duplicate calls

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Len += append(Buf + Len, "id: ");
Len += ArrayToStr(Buf + Len, Group.get_id());
Len += ArrayToStr(Buf + Len, Group.get_group_id());
Len += append(Buf + Len, ", global_range: ");

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@dm-vodopyanov copilot is right. I'm wondering if we should get id of this line. It looks like in SYCL 2020 the group class doesn't know what global_range is and there is no API to get the number of all work items via group.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Nope, he's not right, seems like work-groups always have the same number of work-items:

range<Dimensions> get_max_local_range() const noexcept {
return get_local_range();
}

Comment thread sycl/include/sycl/stream.hpp
@KornevNikita
KornevNikita marked this pull request as ready for review September 1, 2026 13:16
@KornevNikita
KornevNikita requested a review from a team as a code owner September 1, 2026 13:16
@KornevNikita

Copy link
Copy Markdown
Contributor Author

known failures

@KornevNikita
KornevNikita merged commit 9964a79 into intel:sycl Sep 2, 2026
29 of 31 checks passed
@KornevNikita
KornevNikita deleted the upd-use-of-legacy-funcs branch September 2, 2026 11:17
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