Skip to content

Conversation

@wenju-he
Copy link
Contributor

Motivation is similar to c040f9a : unify with SPV-IR mangling.

SubgroupBlockReadINTEL is not handled in this PR. SPV-IR appends return type to mangled function name. It might be simpler for SYCL header to keep current mangling.

…VBuiltins.td

Motivation is similar to c040f9a : unify with SPV-IR mangling.

SubgroupBlockReadINTEL is not handled in this PR. SPV-IR appends return
type to mangled function name. It might be simpler for SYCL header to
keep current mangling.
@wenju-he wenju-he requested review from a team as code owners March 31, 2025 07:31
Copy link
Contributor

@frasercrmck frasercrmck left a comment

Choose a reason for hiding this comment

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

libspirv LGTM, thank you.

To be honest I'm not sure why some of this amdgcn-amdhsa stuff is target-specific if they're just using generic SPIR-V builtins. I'd have thought other targets may want to make use of them.

I'm also not sure if/why we need to "declare" the SPIR-V builtins in places if they're going to be coming from clang anyway.

Those two are questions for another PR but worth looking into.

__CLC_DECLARE_SHUFFLES(unsigned long, m);
__CLC_DECLARE_SHUFFLES(double, d);
#define __CLC_DECLARE_SHUFFLES(TYPE) \
_CLC_OVERLOAD _CLC_DECL TYPE __spirv_SubgroupShuffleINTEL( \
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure if we can remove implementation of existing built-ins. Won't this be an ABI breaking change? The main question is: can we link static libraries produced by the old compiler using new compiler?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes it would be an ABI breakage for device code and we can't link link static libraries produced by the old compiler using new compiler.
Should I keep all the existing implementation?
We probably need to add note for either removal or deprecation in upcoming release notes.

Copy link
Contributor

Choose a reason for hiding this comment

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

Should I keep all the existing implementation?

Yes. We should keep old implementation to maintain stable ABI as required by the Contribution guidelines.

I'm not sure about release notes. This is implementation detail, which is not visible to users. We are allowed to break ABI with major version changes.

@AlexeySachkov, FYI.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added back old implementations.

Copy link
Contributor

@hvdijk hvdijk left a comment

Choose a reason for hiding this comment

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

The NativeCPU changes look fine but will conflict with #17408, are you okay with trying to get that one in first, and then updating this?

@wenju-he
Copy link
Contributor Author

wenju-he commented Apr 2, 2025

The NativeCPU changes look fine but will conflict with #17408, are you okay with trying to get that one in first, and then updating this?

@hvdijk please go ahead and merge #17408 first, thanks.

@wenju-he wenju-he requested a review from Fznamznon April 2, 2025 12:16
@wenju-he
Copy link
Contributor Author

wenju-he commented Apr 3, 2025

To be honest I'm not sure why some of this amdgcn-amdhsa stuff is target-specific if they're just using generic SPIR-V builtins. I'd have thought other targets may want to make use of them.

Thanks for the review. I'll follow-up this issue later.

I'm also not sure if/why we need to "declare" the SPIR-V builtins in places if they're going to be coming from clang anyway.

removed in c750ebf

@uwedolinsky
Copy link
Contributor

The NativeCPU changes look fine but will conflict with #17408, are you okay with trying to get that one in first, and then updating this?

@hvdijk please go ahead and merge #17408 first, thanks.

@wenju-he : #17408 has now been merged :)

@wenju-he
Copy link
Contributor Author

@wenju-he : #17408 has now been merged :)

thank you @uwedolinsky

@wenju-he wenju-he requested a review from hvdijk April 10, 2025 01:13
Copy link
Contributor

@hvdijk hvdijk left a comment

Choose a reason for hiding this comment

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

The NativeCPU part looks good, thanks.

@wenju-he
Copy link
Contributor Author

@intel/llvm-reviewers-runtime please review, thanks.

@steffenlarsen steffenlarsen merged commit 316418d into intel:sycl Apr 11, 2025
24 checks passed
@wenju-he wenju-he deleted the move-intel-subgroup-builtin-to-SPIRVBuiltins.td branch April 11, 2025 08:33
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.

7 participants