[all-commits] [llvm/llvm-project] c69458: [mlir][Linalg] Add pattern to tile and fuse Linalg...
MaheshRavishankar via All-commits
all-commits at lists.llvm.org
Wed Sep 30 14:57:24 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: c694588fc52a8845174fee06ad0bcfa338e87816
https://github.com/llvm/llvm-project/commit/c694588fc52a8845174fee06ad0bcfa338e87816
Author: MaheshRavishankar <ravishankarm at google.com>
Date: 2020-09-30 (Wed, 30 Sep 2020)
Changed paths:
M mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOpsInterface.td
M mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
M mlir/include/mlir/Dialect/Linalg/Utils/Utils.h
M mlir/lib/Dialect/Linalg/Transforms/Fusion.cpp
M mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
M mlir/lib/Dialect/Linalg/Transforms/Transforms.cpp
A mlir/test/Dialect/Linalg/fusion-pattern.mlir
M mlir/test/lib/Transforms/CMakeLists.txt
A mlir/test/lib/Transforms/TestLinalgFusionTransforms.cpp
M mlir/tools/mlir-opt/mlir-opt.cpp
Log Message:
-----------
[mlir][Linalg] Add pattern to tile and fuse Linalg operations on buffers.
The pattern is structured similar to other patterns like
LinalgTilingPattern. The fusion patterns takes options that allows you
to fuse with producers of multiple operands at once.
- The pattern fuses only at the level that is known to be legal, i.e
if a reduction loop in the consumer is tiled, then fusion should
happen "before" this loop. Some refactoring of the fusion code is
needed to fuse only where it is legal.
- Since the fusion on buffers uses the LinalgDependenceGraph that is
not mutable in place the fusion pattern keeps the original
operations in the IR, but are tagged with a marker that can be later
used to find the original operations.
This change also fixes an issue with tiling and
distribution/interchange where if the tile size of a loop were 0 it
wasnt account for in these.
Differential Revision: https://reviews.llvm.org/D88435
More information about the All-commits
mailing list