Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 8 additions & 15 deletions lib/Conversion/FlyToROCDL/FlyToROCDL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -771,24 +771,17 @@ class GpuLaunchFuncOpLowering : public OpConversionPattern<gpu::LaunchFuncOp> {
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<gpu::LaunchFuncOp>(
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<gpu::LaunchFuncOp>(
op, kernelRef, grid, block, adaptor.getDynamicSharedMemorySize(),
adaptor.getKernelOperands(), asyncTokenType, adaptor.getAsyncDependencies(), clusterSize);
adaptor.getKernelOperands(), asyncTokenType, adaptor.getAsyncDependencies(),
adaptor.getAsyncObject(), clusterSize);
return success();
}
};
Expand Down
2 changes: 1 addition & 1 deletion thirdparty/llvm-build-info.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"upstream": {
"repository": "https://github.com/llvm/llvm-project.git",
"llvm_hash": "e2a39f504fee836e4def9581bed817ecc327b9dc"
"llvm_hash": "941a04e69ee8fe4c7a162b2f1e215aa8df867534"
}
}
Loading