[Mlir-commits] [mlir] [mlir][tosa] Fail lowering of `tosa.pad` -> `tensor.pad` with -1 padding (PR #232221)

Mehdi Amini llvmlistbot at llvm.org
Thu Oct 15 05:18:41 PDT 2026


joker-eph wrote:

> I would support disallowing -1 in the tosa.pad verifier.

They are SSA value or not attributes, so it cannot be verified, it has to be handled during lowering. 

The question is how to handle it, and I see two options here:
1) diagnose an error at runtime with an `assert` (This is what the spec calls for I believe)
2) take some liberty with the spec and consider this undefined behavior (Straightforward lowering, no need for runtime check)


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


More information about the Mlir-commits mailing list