Skip to content

Conversation

@wenju-he
Copy link
Contributor

@wenju-he wenju-he commented Jan 8, 2026

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.

Previous implementation uses outdated function e.g. __sync_val_compare_and_swap.
@wenju-he wenju-he requested a review from a team as a code owner January 8, 2026 08:12
@wenju-he wenju-he requested a review from againull January 8, 2026 08:12
Copy link
Contributor

@againull againull left a 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.

Copy link
Contributor

@bader bader left a 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.

@wenju-he
Copy link
Contributor Author

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 Add new __spirv_AtomicFlagClear and __spirv_AtomicFlagTestAndSet builtins in 9e0d9ae

“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.

@wenju-he
Copy link
Contributor Author

@intel/llvm-gatekeepers please merge, thanks

@uditagarwal97 uditagarwal97 merged commit 164f520 into intel:sycl Jan 15, 2026
28 checks passed
@wenju-he wenju-he deleted the libspirv-atomic-generic-refactor branch January 15, 2026 23:35
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.

5 participants