[Mlir-commits] [mlir] [mlir][gpu] Support Cluster of Thread Blocks in `gpu.launch_func` (PR #72871)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Nov 22 05:53:13 PST 2023
================
@@ -550,12 +601,23 @@ def GPU_LaunchFuncOp :GPU_Op<"launch_func", [
/// The name of the kernel.
StringAttr getKernelName();
+ /// Has cluster
+ bool hasClusterSize() {
+ auto totalSize = getOperands().size();
+ totalSize -= getKernelOperands().size();
+ totalSize -= getAsyncDependencies().size();
+ return totalSize > 7;
----------------
qcolombet wrote:
Could we use `getClusterSize() != std::nullopt` instead?
I don't like the hardcoded `7` here.
https://github.com/llvm/llvm-project/pull/72871
More information about the Mlir-commits
mailing list