Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ struct SCFTilingOptions {
ArrayRef<OpFoldResult> givenTileSizes, ValueRange destinationTensors)>;

// Type of the callback function that generates the loop terminator.
// - `loops` : generated loops from the GenerateLoopHeaderFn callback
// - `tiledResults` : Tiles of the result computed for the iteration space
// tile.
// - `resultOffsets` : For each of the `tiledResults`, the offset at which
Expand All @@ -193,7 +194,8 @@ struct SCFTilingOptions {
// tensor.
// Returns the `CustomLoopHeaderInfo` object (described above)
using GenerateLoopTerminatorFn = std::function<LogicalResult(
RewriterBase &rewriter, Location loc, ValueRange tiledResults,
RewriterBase &rewriter, Location loc, ArrayRef<LoopLikeOpInterface> loops,
ValueRange tiledResults,
ArrayRef<SmallVector<OpFoldResult>> resultOffsets,
ArrayRef<SmallVector<OpFoldResult>> resultSizes,
ValueRange destinationTensors)>;
Expand Down
4 changes: 2 additions & 2 deletions mlir/lib/Dialect/SCF/Transforms/TileUsingInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -665,8 +665,8 @@ generateLoopNestUsingCustomOp(
return failure();
}

if (failed(generateLoopTerminatorFn(rewriter, loc, tiledResults,
resultOffsets, resultSizes,
if (failed(generateLoopTerminatorFn(rewriter, loc, loopHeaderInfo->loops,
tiledResults, resultOffsets, resultSizes,
loopHeaderInfo->destinationTensors))) {
return failure();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,8 @@ DiagnosedSilenceableFailure transform::TestTileUsingCustomLoopOp::apply(
};

scf::SCFTilingOptions::GenerateLoopTerminatorFn terminatorFn =
[&](RewriterBase &rewriter, Location loc, ValueRange tiledResults,
[&](RewriterBase &rewriter, Location loc,
ArrayRef<LoopLikeOpInterface> loops, ValueRange tiledResults,
ArrayRef<SmallVector<OpFoldResult>> resultOffsets,
ArrayRef<SmallVector<OpFoldResult>> resultSizes,
ValueRange destinationTensors) -> LogicalResult {
Expand Down