[Mlir-commits] [mlir] [mlir][gpu] Add address space modifier to Barrier (PR #110527)
Krzysztof Drewniak
llvmlistbot at llvm.org
Mon Sep 30 09:09:39 PDT 2024
================
@@ -1371,11 +1372,25 @@ def GPU_BarrierOp : GPU_Op<"barrier"> {
accessing the same memory can be avoided by synchronizing work items
in-between these accesses.
+ The address space of visible memory accesses can be modified by adding a
+ list of address spaces required to be visible. By default all address spaces
+ are included.
----------------
krzysz00 wrote:
I might suggest "completed" or "committed" as synonyms here, if I've understood the semantics right.
That is, any memory operations involving the given memory spaces that were issued before the barrier must have their results reflected after the barrier completes.
Or, another way, any operation touching the listed memory spaces must be happens-before with any operation on those memory spaces after the barrier.
(This would allow us to not necessarily have `amdgpu.lds_barrier` - since we'd be able to express that as `gpu.barrier [#gpu.address_space<workgroup>]`
https://github.com/llvm/llvm-project/pull/110527
More information about the Mlir-commits
mailing list