[all-commits] [llvm/llvm-project] 0bfbec: [mlir][TransformDialect] Simplify the lowering of ...
qcolombet via All-commits
all-commits at lists.llvm.org
Thu Apr 13 03:47:48 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0bfbecf52e8fa04785cf0b5c38b25c13442fb53d
https://github.com/llvm/llvm-project/commit/0bfbecf52e8fa04785cf0b5c38b25c13442fb53d
Author: Quentin Colombet <quentin.colombet at gmail.com>
Date: 2023-04-13 (Thu, 13 Apr 2023)
Changed paths:
M mlir/include/mlir/Dialect/Tensor/IR/TensorOps.td
M mlir/include/mlir/Dialect/Utils/IndexingUtils.h
M mlir/include/mlir/Dialect/Utils/ReshapeOpsUtils.h
M mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
M mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
M mlir/lib/Dialect/Utils/IndexingUtils.cpp
M mlir/lib/Dialect/Utils/ReshapeOpsUtils.cpp
M mlir/test/Dialect/Linalg/transform-lower-pack.mlir
Log Message:
-----------
[mlir][TransformDialect] Simplify the lowering of pack/unpack when these are just pad/unpad
This patch recognizes when tensor.pack/unpack operations are simple
tensor.pad/unpad (a.k.a. tensor.extract_slice) and lowers them in a simpler
sequence of instruction.
For pack, instead of doing:
```
pad
expand_shape
transpose
```
we do
```
pad
insert_slice
```
For unpack, instead of doing:
```
transpose
collapse_shape
extract_slice
```
we do
```
extract_slice
```
Note: returning nullptr for the transform dialect is fine. The related
handles are just ignored by the following transformation.
Differential Revision: https://reviews.llvm.org/D148159
More information about the All-commits
mailing list