[all-commits] [llvm/llvm-project] de2568: [mlir][Linalg] Rethink fusion of linalg ops with r...
MaheshRavishankar via All-commits
all-commits at lists.llvm.org
Wed Oct 14 14:00:46 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: de2568aab819f4ae97a9d92ea68ef1a8ab56ae8c
https://github.com/llvm/llvm-project/commit/de2568aab819f4ae97a9d92ea68ef1a8ab56ae8c
Author: MaheshRavishankar <ravishankarm at google.com>
Date: 2020-10-14 (Wed, 14 Oct 2020)
Changed paths:
M mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
M mlir/include/mlir/Dialect/Linalg/Passes.h
M mlir/include/mlir/Dialect/Linalg/Passes.td
M mlir/include/mlir/Dialect/Linalg/Utils/Utils.h
M mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
M mlir/lib/Dialect/Linalg/Transforms/FusionOnTensors.cpp
M mlir/test/Dialect/Linalg/fusion-tensor.mlir
A mlir/test/Dialect/Linalg/reshape_fusion.mlir
A mlir/test/Dialect/Linalg/reshape_linearization_fusion.mlir
Log Message:
-----------
[mlir][Linalg] Rethink fusion of linalg ops with reshape ops.
The current fusion on tensors fuses reshape ops with generic ops by
linearizing the indexing maps of the fused tensor in the generic
op. This has some limitations
- It only works for static shapes
- The resulting indexing map has a linearization that would be
potentially prevent fusion later on (for ex. tile + fuse).
Instead, try to fuse the reshape consumer (producer) with generic op
producer (consumer) by expanding the dimensionality of the generic op
when the reshape is expanding (folding). This approach conflicts with
the linearization approach. The expansion method is used instead of
the linearization method.
Further refactoring that changes the fusion on tensors to be a
collection of patterns.
Differential Revision: https://reviews.llvm.org/D89002
More information about the All-commits
mailing list