[llvm-branch-commits] [llvm] [AMDGPU] Make amdgpu.noclobber respect acquire operations (PR #219991)
Fabian Ritter via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Nov 11 05:12:42 PST 2026
================
@@ -3303,6 +3303,17 @@ The field indicates how much data is fetched on a cache miss. It is only support
on GFX13. GFX13 only honors it for load and atomic operations. GFX13 does not
support a 32-byte fetch size so it treats CFS_32B the same as CFS_64B.
+(amdgpu_noclobber)=
+
+### '`amdgpu.noclobber`' Metadata
+
+If a `load` instruction marked as `!amdgpu.noclobber` may see any write
+other than the initialization of that location at kernel launch according to the
----------------
ritter-x2a wrote:
> Is it equivalent to say that the read will not see a write from the same dispatch?
No, it's also a problem if it may see a concurrent write from someone else (e.g., the host or another concurrently dispatched kernel). Assuming that happens-before and related operations do not stop at the kernel boundaries, I'd say that the writes the load may see must all happen-before (not sure about availability, I think that might not be necessary for this aspect) the dispatching operation in the host (which we currently don't model).
What do you think about rewording it like this:
> Consider the writes that a `load` instruction L marked as `!amdgpu.noclobber`
> may see according to the [AMDGPU memory model].
> L returns `undef` if any of these writes does not happen-before the operation
> that dispatches the kernel executing L.
https://github.com/llvm/llvm-project/pull/219991
More information about the llvm-branch-commits
mailing list