Bufferize tensor.pad


I am having trouble to find the right pass to bufferize the tensor.pad operation. To give you more context, I am trying to bufferize

 %374 = tensor.pad %arg0 low[%c0, %c3, %c3, %c0] high[%c0, %c3, %c3, %c0] {
    ^bb0(%arg1: index, %arg2: index, %arg3: index, %arg4: index):
      tensor.yield %cst_0 : f32
    } : tensor<1x224x224x3xf32> to tensor<1x230x230x3xf32>
    %375 = bufferization.to_memref %374 : memref<1x230x230x3xf32>

My goal would be to emit LLVM IR at the end. Can someone give me a hint?
Thank you in advance


There are a few options in the -test-linalg-transform-patterns pass that can help transform tensor.pad operations into other operations:

Hope this helps.

Thank you for your help!

After looking into the source for the --test-linalg-transform-patterns="test-generalize-pad-tensor" I found out that the --linalg-comprehensive-module-bufferize pass implements the transformation.