-
Notifications
You must be signed in to change notification settings - Fork 762
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] Move GroupNonUniform SPIR-V built-in declarations to clang SPIRVBuiltins.td #17627
[SYCL] Move GroupNonUniform SPIR-V built-in declarations to clang SPIRVBuiltins.td #17627
Conversation
…RVBuiltins.td This PR changes scope parameter type from enum to int, aligning with SPV-IR. Mangling becomes more portable for targets that bypass SPIR-V. This PR constrains Id or Index type to be either uint32_t or uint64_t.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
libclc/libspirv LGTM
clang/lib/Sema/SPIRVBuiltins.td
Outdated
def TLFloat : TypeList<[Float, Double, Half]>; | ||
// FIXME: handle properly char (signed or unsigned depending on host) | ||
def TLSignedInts : TypeList<[Char, Short, Int, Long]>; | ||
def TLUnsignedInts : TypeList<[UChar, UShort, UInt, ULong]>; | ||
def TLUnsignedIntLong : TypeList<[UInt, ULong]>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this should be UIntULong
? Just because UnsignedInt
seems to be used above as the descriptive collection of unsigned integers, as opposed to the specific UInt
type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TLUnsignedIntLong is removed in 4155e54
[UInt, ULong] is now not only used for Id type in GroupNonUniformBroadcast. ULong is no longer used for Delta/ClusterSize/Index parameters.
So I changed GroupNonUniformBroadcast to use [UInt, ULong] directly instead of adding TLUnsignedIntLong.
…p ULong for Id type in GroupNonUniformBroadcast
kindly ping @llvm-reviewers-runtime @KseniyaTikhomirova for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/sycl LGTM
@intel/llvm-gatekeepers please merge, thanks |
This PR changes scope parameter type from enum to int, aligning with SPV-IR. Mangling becomes more portable for targets that bypass SPIR-V.
This PR constrains Id type in GroupNonUniformBroadcast to be either uint32_t or uint64_t.
Following parameter types are constrained to be uint32_t:
The constraints should align with current built-in implementations and SPV-IR.