[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:15 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;
+ }
+
/// The number of operands passed to the kernel function.
unsigned getNumKernelOperands();
/// The i-th operand passed to the kernel function.
Value getKernelOperand(unsigned i);
+ /// Get the SSA values passed as operands to specify the cluster size.
----------------
qcolombet wrote:
Could you add in the comment what happens if we call this function when `hasClusterSize()` is `false`?
https://github.com/llvm/llvm-project/pull/72871
More information about the Mlir-commits
mailing list