[Mlir-commits] [mlir] [mlir][tosa] Emit a runtime assertion when lowering `tosa.pad` with negative padding (PR #232221)

Federico Bruzzone llvmlistbot at llvm.org
Fri Oct 16 08:55:16 PDT 2026


================

----------------
FedericoBruzzone wrote:

Wait, there are no execution semantics IIUC. 
A _negative_ padding is invalid, so there is no resulting tensor.
With this PR the lowered program fails at the `cf.assert`, before the `tensor.pad` (no UB).

However, `-1` would give 1 + (`-1`) + 2 = 2 for dim 0, but there is no defined meaning for it. Right?

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


More information about the Mlir-commits mailing list