This is a preliminary pattern to expose static information to enable
further transformations on tensor.pad like vectorization.
Depends On D117019
Paths
| Differential D117020
[mlir][tensor] Enhance tensor.pad result shape deduction Changes PlannedPublic Authored by antiagainst on Jan 11 2022, 5:51 AM.
Details
Summary This is a preliminary pattern to expose static information to enable Depends On D117019
Diff Detail
Event Timelineantiagainst added a child revision: D117021: [mlir][linalg] Vectorize PadTensorOp with conditional reads.Jan 11 2022, 5:51 AM mravishankar added inline comments.
This revision now requires changes to proceed.Feb 7 2022, 9:52 AM antiagainst added inline comments.
antiagainst retitled this revision from [mlir][linalg] Add a pattern to concretize PadTensorOp result shapes to [mlir][tensor] Enhance tensor.pad result shape deduction.Feb 10 2022, 9:26 AM antiagainst removed a child revision: D117021: [mlir][linalg] Vectorize PadTensorOp with conditional reads.Mar 12 2022, 8:31 AM
Revision Contents
Diff 406204 mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
mlir/lib/Dialect/Linalg/Transforms/Transforms.cpp
mlir/test/Dialect/Linalg/concretize-pad-result-shape.mlir
mlir/test/lib/Dialect/Linalg/TestLinalgTransforms.cpp
|
I am not sure we want to do it this way. This is effectively shape propagation. This is explicitly why this interface is for https://github.com/llvm/llvm-project/blob/5a7235769717eb7f0046465e823f93f110478710/mlir/include/mlir/Interfaces/InferTypeOpInterface.td#L151 .
You should be able to get that trigger with this pass https://github.com/llvm/llvm-project/blob/5a7235769717eb7f0046465e823f93f110478710/mlir/include/mlir/Dialect/MemRef/Transforms/Passes.td#L148 . Is this not working?