[Mlir-commits] [mlir] [MLIR] Add continuous tiling to TileUsingForOp (PR #82792)
Oleksandr Alex Zinenko
llvmlistbot at llvm.org
Fri May 17 06:20:39 PDT 2024
================
@@ -2305,57 +2319,105 @@ SplitOp::apply(transform::TransformRewriter &rewriter,
rewriter.getIndexAttr(getStaticSplitPoint()));
}
- // Split each target operation.
- SmallVector<Operation *> first, second;
- Operation *noSecondPart = nullptr;
- for (const auto &pair : llvm::zip(payload, splitPoints)) {
- Operation *target = std::get<0>(pair);
- auto linalgOp = dyn_cast<LinalgOp>(target);
- if (!linalgOp) {
- auto diag = emitSilenceableError() << "only applies to structured ops";
- diag.attachNote(target->getLoc()) << "target op";
- return diag;
- }
+ if (isMultiwaySplit) {
- if (getDimension() >= linalgOp.getNumLoops()) {
- auto diag = emitSilenceableError() << "dimension " << getDimension()
- << " does not exist in target op";
- diag.attachNote(target->getLoc()) << "target op";
- return diag;
+ // Split a single target operation at multiple points.
+ SmallVector<Operation *> opList;
+ Operation *head, *tail;
+ for (const auto [idx, splitPoint] : llvm::enumerate(splitPoints)) {
----------------
ftynse wrote:
Nit: `auto &&`
https://github.com/llvm/llvm-project/pull/82792
More information about the Mlir-commits
mailing list