[Mlir-commits] [mlir] [MLIR][SCF] Add an API to fuse consumer to a producer within scf loop (PR #88712)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu May 30 14:00:35 PDT 2024
================
@@ -160,6 +215,21 @@ struct LinalgOpTilingInterface
return success();
}
+ FailureOr<TilingResult> getTiledImplementationFromOperandTile(
+ Operation *op, OpBuilder &b, unsigned operandNumber,
+ ArrayRef<OpFoldResult> offsets, ArrayRef<OpFoldResult> sizes) const {
+ SmallVector<OpFoldResult> mappedOffsets, mappedSizes;
+ auto tilingInterfaceOp = cast<TilingInterface>(op);
+ if (failed(tilingInterfaceOp.getIterationDomainTileFromOperandTile(
+ b, operandNumber, offsets, sizes, mappedOffsets, mappedSizes))) {
+ return emitError(
+ op->getLoc(),
+ "unable to obtain the iter domain position of the operation.");
+ }
+ return tilingInterfaceOp.getTiledImplementation(b, mappedOffsets,
+ mappedSizes);
----------------
MaheshRavishankar wrote:
@qedawkins and @ftynse thanks for the time taken to review the PR. I didnt mean to suggest that it wasnt useful earlier. Was just attempting to step back and say "something here isnt ideal". Actions items now are
1) Land this PR
2) Update `TilingInterface` documentation to capture things said above
3) Follow up offline to get better mind-share of different view points and an RFC for changes if they are indeed needed.
https://github.com/llvm/llvm-project/pull/88712
More information about the Mlir-commits
mailing list