Skip to content

[libspirv] Move unsigned group collective and shuffle built-ins to generic #18328

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

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

Conversation

wenju-he
Copy link
Contributor

@wenju-he wenju-he commented May 6, 2025

Unsigned variant has the same implementation as signed variant for following built-ins:
GroupBroadcast
GroupBitwiseAndKHR
GroupBitwiseOrKHR
GroupBitwiseXorKHR
GroupIAdd
GroupIMulKHR
GroupNonUniformBroadcast
GroupNonUniformIAdd
GroupNonUniformIMul
GroupNonUniformBitwiseAnd
GroupNonUniformBitwiseOr
GroupNonUniformBitwiseXor
GroupNonUniformShuffle
GroupNonUniformShuffleXor
GroupNonUniformShuffleUp
GroupNonUniformShuffleDown
SubgroupShuffleINTEL
SubgroupShuffleDownINTEL
SubgroupShuffleUpINTEL
SubgroupShuffleXorINTEL
This PR lets the unsigned function calls signed function and moves unsigned functions to generic since they can be shared by all targets.
This PR adds built-in declarations in header files since
-fdeclare-spirv-builtins isn't working when signed variant is not
defined but used in unsigned variant implementation in the generic file.
This PR also adds schar variants since __CLC_S_GENTYPE is schar for uchar.

…neric

Unsigned variant has the same implementation as signed variant for
following built-ins:
GroupBroadcast
GroupBitwiseAndKHR
GroupBitwiseOrKHR
GroupBitwiseXorKHR
GroupIAdd
GroupIMulKHR
GroupNonUniformBroadcast
GroupNonUniformIAdd
GroupNonUniformIMul
GroupNonUniformBitwiseAnd
GroupNonUniformBitwiseOr
GroupNonUniformBitwiseXor
GroupNonUniformShuffle
GroupNonUniformShuffleXor
GroupNonUniformShuffleUp
GroupNonUniformShuffleDown
SubgroupShuffleINTEL
SubgroupShuffleDownINTEL
SubgroupShuffleUpINTEL
SubgroupShuffleXorINTEL
This PR lets the unsigned function calls signed function and moves
unsigned functions to generic since they can be shared by all targets.
@wenju-he wenju-he requested a review from a team as a code owner May 6, 2025 08:32
@wenju-he wenju-he requested a review from npmiller May 6, 2025 08:32
@wenju-he wenju-he temporarily deployed to WindowsCILock May 6, 2025 08:32 — with GitHub Actions Inactive
@wenju-he wenju-he temporarily deployed to WindowsCILock May 6, 2025 08:59 — with GitHub Actions Inactive
@wenju-he wenju-he temporarily deployed to WindowsCILock May 6, 2025 08:59 — with GitHub Actions Inactive
@ldrumm ldrumm requested a review from frasercrmck May 6, 2025 10:11
@ldrumm
Copy link
Contributor

ldrumm commented May 6, 2025

This is @frasercrmck's domain, so let's get his opinion

@wenju-he wenju-he temporarily deployed to WindowsCILock May 6, 2025 10:22 — with GitHub Actions Inactive
@wenju-he wenju-he temporarily deployed to WindowsCILock May 6, 2025 10:47 — with GitHub Actions Inactive
@wenju-he wenju-he temporarily deployed to WindowsCILock May 6, 2025 10:47 — with GitHub Actions Inactive
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