Skip to content

[SYCL][LIBCLC] Add support for shuffles in AMDGCN. #4664

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 2 commits into from
Oct 6, 2021

Conversation

jchlanda
Copy link
Contributor

@jchlanda jchlanda commented Sep 29, 2021

This patch brings support for the following builtins:

  • SubgroupShuffleDownINTEL,
  • SubgroupShuffleINTEL,
  • SubgroupShuffleUpINTEL,
  • SubgroupShuffleXorINTEL.
    For all the types (modulo half, as it is not supported across all the AMD's targets in libspirv).

This is a port of how HIP implements shuffles with types adjusted for
OpenCL builtin types.
@jchlanda
Copy link
Contributor Author

Enabling of the test in the test suite repo: intel/llvm-test-suite#487

@bader bader added libclc libclc project related issues hip Issues related to execution on HIP backend. labels Oct 5, 2021
@jchlanda
Copy link
Contributor Author

jchlanda commented Oct 5, 2021

Ping @bader , the tests went in, so it'd be good to have this merged soon as well.

bader
bader previously approved these changes Oct 5, 2021
return as_uint(
_Z28__spirv_SubgroupShuffleINTELIiET_S0_j(as_int(Data), InvocationId));
}
// Sub 32-bit types.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's probably make sense to add similar macro functions for 32-bit types (int, unsigned int and float) and 64-bit types (long, unsigned long and double) to avoid code duplication.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a good point, done in: d6ffcf3.

Looks like there could be another layer of macros (split per number of arguments), but I worry it would make this file too cryptic.

@bader bader merged commit bf7b02a into intel:sycl Oct 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hip Issues related to execution on HIP backend. libclc libclc project related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants