[flang-commits] [flang] [mlir] [mlir][gpu] Add stream-based async mode to gpu.launch (PR #213031)

Ivan R. Ivanov via flang-commits flang-commits at lists.llvm.org
Thu Jul 30 08:18:10 PDT 2026


================
@@ -1005,6 +1025,17 @@ ParseResult LaunchOp::parse(OpAsmParser &parser, OperationState &result) {
   SmallVector<OpAsmParser::UnresolvedOperand, 16> regionArgs(
       LaunchOp::kNumConfigRegionAttributes);
 
+  // Parse optional asyncObject: < value : type >
+  OpAsmParser::UnresolvedOperand asyncObjectOperand;
+  Type asyncObjectType;
+  bool hasAsyncObject = false;
+  if (succeeded(parser.parseOptionalLess())) {
+    hasAsyncObject = true;
+    if (parser.parseOperand(asyncObjectOperand) || parser.parseColon() ||
+        parser.parseType(asyncObjectType) || parser.parseGreater())
+      return failure();
+  }
----------------
ivanradanov wrote:

`launch_func` does not have a custom printer/parser so this is the only place this code exists. (I think `launch` uses the custom printer/parser to be fancy with the `%tid = %ntid` syntax, whereas `launch_func` does not need that.

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


More information about the flang-commits mailing list