[PATCH] D157437: AMDGPU: Expand remaining system atomic operations

Yaxun Liu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 8 18:44:20 PDT 2023


yaxunl added a comment.

In D157437#4571323 <https://reviews.llvm.org/D157437#4571323>, @arsenm wrote:

> In D157437#4571294 <https://reviews.llvm.org/D157437#4571294>, @rampitec wrote:
>
>> It seems unfair to me, we give an option to override it for FP atomics, but not for INT.
>
> The FP option is also broken and should be removed. There are two separate properties. We should have something for the FP properties that can be ignored on the specific instruction, and one for ignore the scope (although I don't know why the unsafe usage can't just use the wrong scope)

My understanding is that there are 3 situations:

corse-grained memory: all integer atomic ops work, fp atomics (if available) work 
fine-grained memory with PCIE: only integer add/xchg/cmpxchg work, others need to be transformed to cmpxchg loop
fine-grained memory with XGMI: all integer atomic ops work, fp atomics not work

so we need separate options for unsafe-fp-atomics and unsafe-pcie-integer-atomics

If users make sure they only use certain memories, then they can specify suitable options for their usecase:

corse-grained memory only: -unsafe-fp-atomics -unsafe-pcie-integer-atomics
fine-grained memory with PCIE: 
fine-grained memory with XGMI: -unsafe-pcie-integer-atomics


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D157437/new/

https://reviews.llvm.org/D157437



More information about the llvm-commits mailing list