Skip to content

[SYCL] Enable user-defined sub-group reductions #2106

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 27, 2020

Conversation

Pennycook
Copy link
Contributor

Restricted to TriviallyCopyable types for now.

Signed-off-by: John Pennycook [email protected]


This is a partial implementation of the functionality proposed by @psteinbrecher in #1947, enabling custom sub-group reductions for trivially copyable types. I cannot see any good way to implement user-defined reductions using group instead of sub_group today, or to extend support for arbitrary types, but this is a step in the right direction.

Enabling the other algorithms for user-defined types and operators (with the same trivially copyable restriction) could follow the same approach. Starting with reductions in this PR because they are the most common request.

Restricted to TriviallyCopyable types for now.

Signed-off-by: John Pennycook <[email protected]>
@Pennycook Pennycook added enhancement New feature or request spec extension All issues/PRs related to extensions specifications labels Jul 13, 2020
@Pennycook Pennycook requested review from AlexeySachkov and a team as code owners July 13, 2020 22:13
@Pennycook Pennycook requested a review from againull July 13, 2020 22:13
Original test looked for cl_khr_subgroups, which does not provide shuffles.

Signed-off-by: John Pennycook <[email protected]>
@bader bader merged commit 728429a into intel:sycl Jul 27, 2020
@Pennycook Pennycook deleted the sub-group-generic-reduce branch July 28, 2020 18:00
jsji pushed a commit that referenced this pull request Aug 11, 2023
Also fix 'unused variable' warning.

Signed-off-by: Sidorov, Dmitry <[email protected]>

Original commit:
KhronosGroup/SPIRV-LLVM-Translator@b0142af
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request spec extension All issues/PRs related to extensions specifications
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants