[Mlir-commits] [mlir] [NFC] Simplify the tiling implementation using cloning. (PR #72178)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Nov 14 23:06:56 PST 2023
================
@@ -139,15 +142,17 @@ static Operation *cloneOpAndUpdateDestinationArgs(RewriterBase &rewriter,
/// - `loopRanges` specifies the lb, ub and step of the untiled iteration space.
/// - `tileSizes` is the tile sizes to use. Zero represent untiled loops.
/// - In `offsets` and `sizes` return the multi-dimensional offset and size of
-/// the
-/// tile processed within the inner most loop.
+/// the tile processed within the inner most loop.
+/// Note that this methods adds `scf.yield` operation for all but the innermost
+/// loop. These yield the value returned by the immediately inner loop. The
+/// caller is expected to add the scf.yield operation for the innermost loop.
static SmallVector<scf::ForOp> generateTileLoopNest(
OpBuilder &builder, Location loc, ArrayRef<Range> loopRanges,
ArrayRef<OpFoldResult> tileSizes, SmallVector<OpFoldResult> &offsets,
- SmallVector<OpFoldResult> &sizes) {
- assert(!loopRanges.empty() && "expected at least one loop range");
- assert(loopRanges.size() == tileSizes.size() &&
----------------
MaheshRavishankar wrote:
I didnt mean to remove both though. Oversight. Ill add the second one back.
https://github.com/llvm/llvm-project/pull/72178
More information about the Mlir-commits
mailing list