[mlir][tensor] Add a pattern to split tensor.pad ops
This commit adds a pattern to wrap a tensor.pad op with an scf.if op to separate the cases where we don't need padding (all pad sizes are actually zeros) and where we indeed need padding. This pattern is meant to handle padding inside tiled loops. Under such cases the padding sizes typically depend on the loop induction variables. Splitting them would allow treating perfect tiles and edge tiles separately. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D117018
Loading
Please sign in to comment