[clang] [llvm] [mlir] [AMDGPU] Implement AsyncMark Stages (PR #220442)

Krzysztof Drewniak via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 5 17:59:13 PST 2026


================
@@ -689,20 +690,27 @@ def ROCDL_AsyncmarkOp : ROCDL_ConcreteNonMemIntrOp<"asyncmark", [], 0>,
 
       See `rocdl.wait.asyncmark`'s documentation for a usage example.
 
+      `stages` is a mask of the async stages to mark: the mark is appended to
+      the sequence of every stage it names. `all` names every stage.
+
       Example:
       ```mlir
-      // Mark the end of an async operation group.
+      // Mark the end of an async operation group in every stage.
       rocdl.asyncmark
+      // Mark the end of a group of tensor loads and stores alone.
+      rocdl.asyncmark stages tensor
       ```
 
       Available on gfx9 and later.
   }];
   let results = (outs);
-  let assemblyFormat = "attr-dict";
+  let assemblyFormat = "(`stages` enum($stages)^)? attr-dict";
----------------
krzysz00 wrote:

It's also pretty common precedent, so let's stick with it

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


More information about the cfe-commits mailing list