[Mlir-commits] [mlir] [mlir][GPU] Extend gpu.barrier with scope and named-barrier support (PR #195692)

Fabian Mora llvmlistbot at llvm.org
Wed May 6 05:51:23 PDT 2026


================
@@ -115,6 +115,29 @@ def GPU_AddressSpaceAttr :
 
 def GPU_AddressSpaceAttrArray : TypedArrayAttrBase<GPU_AddressSpaceAttr, "GPU Address Space array">;
 
+def GPU_ScopeThread      : I32EnumCase<"Thread",      0, "thread">;
+def GPU_ScopeSubgroup    : I32EnumCase<"Subgroup",    1, "subgroup">;
+def GPU_ScopeWorkgroup   : I32EnumCase<"Workgroup",   2, "workgroup">;
+def GPU_ScopeCluster     : I32EnumCase<"Cluster",     3, "cluster">;
+def GPU_ScopeDevice      : I32EnumCase<"Device",      4, "device">;
+def GPU_ScopeCrossDevice : I32EnumCase<"CrossDevice", 5, "cross_device">;
----------------
fabianmcg wrote:

The semantics of these 2 seem like they should get a different op, we are overloading `gpu.barrier` too much.

https://github.com/llvm/llvm-project/pull/195692


More information about the Mlir-commits mailing list