[RFC] Move linalg::PadTensorOp to tensor::PadOp

[RFC] Move linalg::PadTensorOp to tensor::PadOp

linalg::PadTensorOp operation allows to pad the source tensor with given low and high padding config.

%pad_value = ... : f32
%padded_tensor = linalg.pad_tensor %source low[0, 0] high[%ub0, %ub1] {
  ^bb0(%arg1: index, %arg2: index):
    linalg.yield %pad_value : f32
} : tensor<2x3xf32> to tensor<?x?xf32>

I think this operation is useful not only for Linalg users and should be moved to tensor dialect and become tensor.pad.

3 Likes

https://reviews.llvm.org/D117892