Skip to content
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

[SYCL] Replace __spirv_SubgroupShuffle{...}INTEL with __spirv_GroupNonUniformShuffle{...} generic versions. #14748

Open
wants to merge 9 commits into
base: sycl
Choose a base branch
from

Conversation

al3x-jp
Copy link

@al3x-jp al3x-jp commented Jul 24, 2024

Replaced __spirv_SubgroupShuffleINTEL, __spirv_SubgroupShuffleXorINTEL, __spirv_SubgroupShuffleDownINTEL and __spirv_SubgroupShuffleUpINT with __spirv_GroupNonUniformShuffle... generic versions.

According to the OpenCL Specification, these operations only accept scalars, so we force vectorization of vectors.

…L, __spirv_SubgroupShuffleDownINTEL and __spirv_SubgroupShuffleUpINT with __spirv_GroupNonUniformShuffle... generic versions.
@al3x-jp al3x-jp requested a review from a team as a code owner July 24, 2024 14:46
@al3x-jp al3x-jp requested a review from uditagarwal97 July 24, 2024 14:46
@steffenlarsen steffenlarsen requested a review from MrSidims July 24, 2024 15:19
@steffenlarsen
Copy link
Contributor

Hi @al3x-jp! I took the liberty of rebasing this patch, applying clang-format, and fixing the test issues. Hope is that the CI should be green shortly.

@steffenlarsen
Copy link
Contributor

Seems to be some unexpected failures on Gen12. I will look into this ASAP.

Signed-off-by: Larsen, Steffen <[email protected]>
@steffenlarsen steffenlarsen changed the title Replaced __spirv_SubgroupShuffleINTEL, __spirv_SubgroupShuffleXorINTEL, __spirv_SubgroupShuffleDownINTEL and __spirv_SubgroupShuffleUpINT with __spirv_GroupNonUniformShuffle... generic versions. [SYCL] Replace __spirv_SubgroupShuffle{...}INTEL with __spirv_GroupNonUniformShuffle{...} generic versions. Jan 6, 2025
@steffenlarsen
Copy link
Contributor

Seems that OpenCL doesn't allow vectors in SPIR-V shuffle operations. By scalarizing the vectors we can work around this, expecting the device-compiler to vectorize the operation if it sees fit.

The remaining failure in syclcompat om CPU seems like a bug in the CPU device compiler which shuffles in the wrong direction under certain circumstances. It has been reported to the CPU device-compiler team.

Signed-off-by: Larsen, Steffen <[email protected]>
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.

2 participants