[mlir][linalg] Do not emit FillOp for tensor.pad with zero padding
authorMatthias Springer <me@m-sp.org>
Wed, 5 Jul 2023 06:34:03 +0000 (08:34 +0200)
committerMatthias Springer <me@m-sp.org>
Wed, 5 Jul 2023 06:34:46 +0000 (08:34 +0200)
commitbb566b652f7da5a96dbc694686bfea9ee54806b3
tree8d8dc6714700b3b5e1b514cd29ba5c19641e5b80
parent2d74cf1f247068d93a8ef7f19a40b73c61132af0
[mlir][linalg] Do not emit FillOp for tensor.pad with zero padding

No need to fill the buffer if no padding is added. I.e., the tensor.pad is packing only.

Differential Revision: https://reviews.llvm.org/D153874
mlir/lib/Dialect/Linalg/Transforms/ConvertToDestinationStyle.cpp
mlir/test/Dialect/Linalg/pad-to-specific-memory-space.mlir