-
Notifications
You must be signed in to change notification settings - Fork 809
[libspirv] refactor generic atomic builtin to use CLC functions #21017
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
[libspirv] refactor generic atomic builtin to use CLC functions #21017
Conversation
Previous implementation uses outdated function e.g. __sync_val_compare_and_swap.
againull
left a comment
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/test-e2e/WorkGroupMemory/reduction_lambda.cpp change lgtm.
bader
left a comment
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.
Add new __spirv_AtomicFlagClear and __spirv_AtomicFlagTestAndSet builtins. Add more variants of __spirv_AtomicIDecrement/AtomicIIncrement to libspirv-amdgcn--amdhsa.bc.
Test WorkGroupMemory/reduction_lambda.cpp now passes on native-cpu device.
This part seems to be unrelated to the refactoring. Let's open a separate PR with this change.
Removed “Adding more variants of __spirv_AtomicIDecrement/AtomicIIncrement to libspirv-amdgcn--amdhsa.bc is an automatic outcome of the refactor, so separating it into its own PR isn’t practical. The test WorkGroupMemory/reduction_lambda.cpp now unexpectedly passes with this PR, causing a CI failure. I'd like to keep the change so CI is green. |
|
@intel/llvm-gatekeepers please merge, thanks |
Previous implementation uses outdated function e.g. __sync_val_compare_and_swap.
This automatically addd more variants of __spirv_AtomicIDecrement/AtomicIIncrement to libspirv-amdgcn--amdhsa.bc.
Test WorkGroupMemory/reduction_lambda.cpp now passes on native-cpu device.