From 0afb7f87d68c364d57ea0d3ba60b13b780ca348b Mon Sep 17 00:00:00 2001 From: Phil Li Date: Fri, 21 Aug 2026 14:17:11 +0800 Subject: [PATCH] [Misc][FlyToROCDL] Bump LLVM to 941a04e6 and adapt gpu.launch_func lowering Move the upstream LLVM pin from e2a39f504fee to 941a04e69ee8. Upstream merged the two gpu::LaunchFuncOp builders taking a SymbolRefAttr kernel into one, inserting `Value asyncObject` before `clusterSize`. LaunchFuncOpLowering chose between the two old signatures, so neither call matched any more; FlyToROCDL.cpp was the only translation unit that failed to build. Collapse both branches into one call against the merged builder. This also stops an op carrying both an asyncObject and an async token from losing the token: the old asyncObject builder never pushed an AsyncTokenType onto the result types. Signed-off-by: Phil Li --- lib/Conversion/FlyToROCDL/FlyToROCDL.cpp | 23 ++++++++--------------- thirdparty/llvm-build-info.json | 2 +- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/lib/Conversion/FlyToROCDL/FlyToROCDL.cpp b/lib/Conversion/FlyToROCDL/FlyToROCDL.cpp index b575e07903..d62105d852 100644 --- a/lib/Conversion/FlyToROCDL/FlyToROCDL.cpp +++ b/lib/Conversion/FlyToROCDL/FlyToROCDL.cpp @@ -771,24 +771,17 @@ class GpuLaunchFuncOpLowering : public OpConversionPattern { if (Value tok = op.getAsyncToken()) asyncTokenType = tok.getType(); - // There are two relevant builder signatures in this MLIR: - // - (kernel, ..., asyncTokenType, asyncDependencies, clusterSize) - // - (kernel, ..., asyncObject, clusterSize) - // Pick the one that matches the original op structure. - if (Value asyncObj = adaptor.getAsyncObject()) { - if (!adaptor.getAsyncDependencies().empty()) - return rewriter.notifyMatchFailure( - op, "launch_func has both asyncObject and asyncDependencies"); - - rewriter.replaceOpWithNewOp( - op, kernelRef, grid, block, adaptor.getDynamicSharedMemorySize(), - adaptor.getKernelOperands(), asyncObj, clusterSize); - return success(); - } + // The two former builder signatures (one taking asyncTokenType + + // asyncDependencies, one taking asyncObject) were merged upstream into a + // single builder that takes all of them. + if (adaptor.getAsyncObject() && !adaptor.getAsyncDependencies().empty()) + return rewriter.notifyMatchFailure(op, + "launch_func has both asyncObject and asyncDependencies"); rewriter.replaceOpWithNewOp( op, kernelRef, grid, block, adaptor.getDynamicSharedMemorySize(), - adaptor.getKernelOperands(), asyncTokenType, adaptor.getAsyncDependencies(), clusterSize); + adaptor.getKernelOperands(), asyncTokenType, adaptor.getAsyncDependencies(), + adaptor.getAsyncObject(), clusterSize); return success(); } }; diff --git a/thirdparty/llvm-build-info.json b/thirdparty/llvm-build-info.json index 3df2018697..18e85f359f 100644 --- a/thirdparty/llvm-build-info.json +++ b/thirdparty/llvm-build-info.json @@ -1,6 +1,6 @@ { "upstream": { "repository": "https://github.com/llvm/llvm-project.git", - "llvm_hash": "e2a39f504fee836e4def9581bed817ecc327b9dc" + "llvm_hash": "941a04e69ee8fe4c7a162b2f1e215aa8df867534" } }