[Mlir-commits] [mlir] [MLIR][Linalg] Add boundary fill option to pad fusion pass (PR #223792)

Chibuoyim Ogbonna llvmlistbot at llvm.org
Thu Sep 17 01:29:04 PDT 2026


bruteforceboy wrote:

@FedericoBruzzone thanks a lot for taking the time to review. To address the comments here:

1. If vectorization is enabled, I could see it helping both fills. The full fill has a more regular access pattern, while the boundary fills do less work but operate on smaller regions. I can run another benchmark before saying which benefits more from this, especially for the shape you mentioned.

2. @Jianhui-Li thanks for the feedback! That is one reason why this boundary fill is going to remain **optional** and not the default. It is definitely not going to be beneficial on every target/shape. But, as you can see from performance results on my machine, the boundary fill performs better on a good number of cases. I also agree that it bloats the IR, but at the linalg level we still have the padding and producer information available. I'm not sure how easily we could recover that information after lowering. I'm happy to add the documentation like @FedericoBruzzone suggested too, which I think will be very helpful. 

Open to suggestions on the best placement for this transformation! Thanks!

https://github.com/llvm/llvm-project/pull/223792


More information about the Mlir-commits mailing list