You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This default nature of system should be documented in the language reference, where currently only target-specific (e.g. what backends like AMDGPU have) and single-threaded exist.
A wrinkle is the PTX backend. PTX does mostly use NVVM intrinsics, but also some LLVM atomic operations.
Eventually, I would love to see a move away from the nvvm intrinsics and instead fully use the LLVM atomic operation,
but currently PTX does not handle syncscopes and thus "mistranslates" the syncscope("system") to the PTX syncscope device...
This essentially means that there is an ambiguity between syncscope("system") and the syncscope being left undefined.
I wanted to start work on supporting atomics with a syncscope argument in the PTX backend, but this conflict in defaults would potentially break users who have been emitting atomic operations on PTX. To be clear, it would be a performance issue and not a semantic one.
The text was updated successfully, but these errors were encountered:
In multiple places throughout the llvm codebase, it is assumed that
syncscope("system")
is the default.As an example, when an atomic operation is created with
syncscope("system")
printing it omits that syncscope.llvm-project/llvm/lib/CodeGen/MachineOperand.cpp
Lines 530 to 531 in 8a229f5
When creating an atomic load instruction without a syncscope specifiy it is assumed to be
system
llvm-project/llvm/lib/IR/Instructions.cpp
Lines 1271 to 1275 in 8a229f5
This default nature of
system
should be documented in the language reference, where currently onlytarget-specific
(e.g. what backends like AMDGPU have) andsingle-threaded
exist.A wrinkle is the PTX backend. PTX does mostly use NVVM intrinsics, but also some LLVM atomic operations.
Eventually, I would love to see a move away from the nvvm intrinsics and instead fully use the LLVM atomic operation,
but currently PTX does not handle syncscopes and thus "mistranslates" the
syncscope("system")
to the PTX syncscopedevice
...This essentially means that there is an ambiguity between
syncscope("system")
and the syncscope being left undefined.I wanted to start work on supporting atomics with a syncscope argument in the PTX backend, but this conflict in defaults would potentially break users who have been emitting atomic operations on PTX. To be clear, it would be a performance issue and not a semantic one.
The text was updated successfully, but these errors were encountered: