diff options
Diffstat (limited to 'mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp')
-rw-r--r-- | mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp b/mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp index 62eef97a1744..1e404cabbb51 100644 --- a/mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp +++ b/mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp @@ -388,12 +388,13 @@ static FailureOr<ForallTilingResult> tileToForallOpImpl( } // 4. Tile the cloned op and delete the clone. - SmallVector<Operation *> tiledOps = + FailureOr<TilingResult> tilingResult = cast<TilingInterface>(clonedOp).getTiledImplementation(b, tiledOffsets, tiledSizes); b.eraseOp(clonedOp); - assert(tiledOps.size() == 1 && "expected a single produced tiled op"); - tiledOp = tiledOps.front(); + assert(tilingResult->tiledOps.size() == 1 && + "expected a single produced tiled op"); + tiledOp = tilingResult->tiledOps.front(); } // 5. Parallel insert back into the result tensor. @@ -729,12 +730,13 @@ FailureOr<linalg::ForallReductionTilingResult> linalg::tileReductionUsingForall( // 5. Tile the cloned op and delete the clone. if (tileSizes.empty()) { - SmallVector<Operation *> tiledOps = + FailureOr<TilingResult> tilingResult = cast<TilingInterface>(clonedOp).getTiledImplementation( b, tiledOffsets, tiledSizes); - assert(tiledOps.size() == 1 && "expected a single produced tiled op"); - tiledOp = tiledOps.front(); - tilingResults = tiledOp->getResults(); + assert(tilingResult->tiledOps.size() == 1 && + "expected a single produced tiled op"); + tiledOp = tilingResult->tiledOps.front(); + tilingResults = tilingResult->tiledValues; } else { LinalgTilingOptions options; FailureOr<TiledLinalgOp> maybeTiled = tileLinalgOpImpl<scf::ForOp>( |