[Mlir-commits] [mlir] [mlir][TilingInterface] Allow controlling what fusion is done within tile and fuse (PR #76871)
lorenzo chelini
llvmlistbot at llvm.org
Thu Jan 4 09:41:13 PST 2024
================
@@ -97,6 +97,30 @@ struct SCFTileAndFuseOptions {
tilingOptions = options;
return *this;
}
+
+ /// Control function to check if a slice needs to be fused or not,
+ /// The control function recieves
+ /// 1) the slice along which fusion is to be done,
+ /// 2) the producer value that is to be fused
+ /// 3) a boolean value set to `true` if the fusion is from
+ /// a destination operand.
+ /// It retuns two booleans
+ /// - returns `true` if the fusion should be done through the candidate slice
+ /// - returns `true` if a replacement for the fused producer needs to be
+ /// yielded from within the tiled loop. Note that is is valid to return
+ /// `true` only if the slice fused is disjoint across all iterations of the
+ /// tiled loop. It is upto the caller to ensure that this is true for the
+ /// fused producers.
+ using ControlFnTy = std::function<std::tuple<bool, bool>(
----------------
chelini wrote:
why not using std::pair?
https://github.com/llvm/llvm-project/pull/76871
More information about the Mlir-commits
mailing list