[all-commits] [llvm/llvm-project] 485190: [mlir][Linalg] Deprecate `tileAndFuseLinalgOps` me...
MaheshRavishankar via All-commits
all-commits at lists.llvm.org
Wed Jul 20 22:05:28 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 485190df95f98c51c3f4a4ab4db96127cdc9ce78
https://github.com/llvm/llvm-project/commit/485190df95f98c51c3f4a4ab4db96127cdc9ce78
Author: Mahesh Ravishankar <ravishankarm at google.com>
Date: 2022-07-21 (Thu, 21 Jul 2022)
Changed paths:
M mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
M mlir/lib/Dialect/Linalg/Transforms/Fusion.cpp
M mlir/lib/Dialect/Linalg/Transforms/Transforms.cpp
R mlir/test/Dialect/Linalg/fusion-pattern.mlir
R mlir/test/Dialect/Linalg/fusion-sequence.mlir
R mlir/test/Dialect/Linalg/fusion-tensor-pattern.mlir
M mlir/test/Interfaces/TilingInterface/tile-and-fuse-using-interface.mlir
M mlir/test/lib/Dialect/Linalg/TestLinalgFusionTransforms.cpp
M mlir/test/lib/Interfaces/TilingInterface/TestTilingInterface.cpp
M mlir/tools/mlir-opt/mlir-opt.cpp
Log Message:
-----------
[mlir][Linalg] Deprecate `tileAndFuseLinalgOps` method and associated patterns.
The `tileAndFuseLinalgOps` is a legacy approach for tiling + fusion of
Linalg operations. Since it was also intended to work on operations
with buffer operands, this method had fairly complex logic to make
sure tile and fuse was correct even with side-effecting linalg ops.
While complex, it still wasnt robust enough. This patch deprecates
this method and thereby deprecating the tiling + fusion method for ops
with buffer semantics. Note that the core transformation to do fusion
of a producer with a tiled consumer still exists. The deprecation here
only removes methods that auto-magically tried to tile and fuse
correctly in presence of side-effects.
The `tileAndFuseLinalgOps` also works with operations with tensor
semantics. There are at least two other ways the same functionality
exists.
1) The `tileConsumerAndFuseProducers` method. This does a similar
transformation, but using a slightly different logic to
automatically figure out the legal tile + fuse code. Note that this
is also to be deprecated soon.
2) The prefered way uses the `TilingInterface` for tile + fuse, and
relies on the caller to set the tiling options correctly to ensure
that the generated code is correct.
As proof that (2) is equivalent to the functionality provided by
`tileAndFuseLinalgOps`, relevant tests have been moved to use the
interface, where the test driver sets the tile sizes appropriately to
generate the expected code.
Differential Revision: https://reviews.llvm.org/D129901
More information about the All-commits
mailing list