[MLIR][Tensor] Introduce a pattern to propagate through `tensor.pad`
authorLorenzo Chelini <l.chelini@icloud.com>
Mon, 13 Feb 2023 13:44:03 +0000 (14:44 +0100)
committerLorenzo Chelini <l.chelini@icloud.com>
Wed, 15 Feb 2023 07:48:55 +0000 (08:48 +0100)
commit30d542f9b2adf10ee2cb7e07877ad7f0cfdbfea2
tree6eb89173d97720ac4dfb9dd30cf3c92bb3631d29
parent2872987e5e91cbda423a3b2be061756a116902b6
[MLIR][Tensor] Introduce a pattern to propagate through `tensor.pad`

Introduce a pattern to 'push down' a `tensor.unpack` through a
`tensor.pad`. The propagation happens if the unpack does not touch the
padded dimensions.

Reviewed By: hanchung

Differential Revision: https://reviews.llvm.org/D143907
mlir/lib/Dialect/Linalg/Transforms/DataLayoutPropagation.cpp
mlir/test/Dialect/Linalg/data-layout-propagation.mlir