[Mlir-commits] [mlir] [mlir][tosa] Fold PadOp to tensor operations (PR #132700)

Georgios Pinitas llvmlistbot at llvm.org
Mon Mar 24 15:27:04 PDT 2025


GeorgeARM wrote:

There are two issues.

Pool operations require the padding to be less than the kernel size. We can handle this in the canonicalization pattern and avoid folding if this is not honoured.

When it comes to level checking we can't perform deterministically any check in the canonicalization.
This is a validation aspect pass.

When it comes to output sizes I don't see any issues.

So we can update the canonicalization but there is an edge case (extreme) that it could lead to non-compliant IR. Am fine with this. Otherwise the safe option is a controlled optional pass.

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


More information about the Mlir-commits mailing list