Skip to content

Commit 17037e9

Browse files
Revert to previous implementation
1 parent d8f69ff commit 17037e9

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

mlir/include/mlir/Interfaces/TilingInterface.td

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -183,13 +183,7 @@ def TilingInterface : OpInterface<"TilingInterface"> {
183183
"ArrayRef<OpFoldResult>":$sizes),
184184
/*methodBody=*/"",
185185
/*defaultImplementation=*/[{
186-
::llvm::SmallVector<OpFoldResult> mappedOffsets, mappedSizes;
187-
auto tilingInterfaceOp = cast<::mlir::TilingInterface>($_op.getOperation());
188-
if (failed(tilingInterfaceOp.getIterationDomainTileFromOperandTile(
189-
b, operandNumber, offsets, sizes, mappedOffsets, mappedSizes))) {
190-
return failure();
191-
}
192-
return tilingInterfaceOp.getTiledImplementation(b, mappedOffsets, mappedSizes);
186+
return failure();
193187
}]
194188
>,
195189
InterfaceMethod<

mlir/lib/Dialect/Linalg/Transforms/TilingInterfaceImpl.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,20 @@ struct LinalgOpTilingInterface
250250
SmallVector<Value>{tilingResult->tiledValues[resultNumber]}};
251251
}
252252

253+
/// Method to generate the tiled implementation of an operation from the tile
254+
/// of the operand.
255+
FailureOr<TilingResult> getTiledImplementationFromOperandTile(
256+
Operation *op, OpBuilder &b, unsigned operandNumber,
257+
ArrayRef<OpFoldResult> offsets, ArrayRef<OpFoldResult> sizes) const {
258+
SmallVector<OpFoldResult> mappedOffsets, mappedSizes;
259+
if (failed(getIterationDomainTileFromOperandTile(
260+
op, b, operandNumber, offsets, sizes, mappedOffsets,
261+
mappedSizes))) {
262+
return failure();
263+
}
264+
return getTiledImplementation(op, b, mappedOffsets, mappedSizes);
265+
}
266+
253267
LogicalResult generateScalarImplementation(Operation *op, OpBuilder &builder,
254268
Location loc,
255269
ValueRange ivs) const {

0 commit comments

Comments
 (0)