[llvm] [NVPTX] Fix scoped atomic when given runtime values (PR #185883)
Joseph Huber via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 16 08:43:48 PDT 2026
jhuber6 wrote:
> I'd expect that if a program passes a runtime scope to an API (intrinsic, etc.), then the `switch`-case that gets generated to dispatch, only includes scopes that are supported for that target .
>
> If that frontend is generating e.g. `cluster` scope on a target that doesn't support it, why isn't that a frontend bug?
I updated it, the AMDGPU backend supports clusters and single threaded fences in the same way as far as I am aware, so there's no point in a user-hostile divergence. The standard handling for unsupported atomics is just to widen to the next legal scope as far as I am aware.
This PR now ignores single-threaded scoped fences and widens cluster scope to device.
https://github.com/llvm/llvm-project/pull/185883
More information about the llvm-commits
mailing list