[mlir][Linalg] Replace SimplePad with PadTensor in tile-and-pad
authorHanhan Wang <hanchung@google.com>
Thu, 28 Jan 2021 14:49:48 +0000 (06:49 -0800)
committerHanhan Wang <hanchung@google.com>
Thu, 28 Jan 2021 14:50:26 +0000 (06:50 -0800)
commitc818fa6729e02820c656431126d724d643001b70
tree68e490a7247fe1fdf41d6f68006efb455589f6da
parentdfd2374ab6c393d675e7b4583bc279b2d7e9b51f
[mlir][Linalg] Replace SimplePad with PadTensor in tile-and-pad

This revision creates a build method of PadTensorOp which can be mapped to
SimplePad op. The verifier is updated to accept a static custom result type,
which has the same semantic as SimplePadOp.

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D95555
mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
mlir/lib/Dialect/Linalg/Transforms/Transforms.cpp
mlir/test/Dialect/Linalg/roundtrip.mlir
mlir/test/Dialect/Linalg/tile-and-pad-tensors.mlir