[Mlir-commits] [mlir] [mlir][tosa] Fail lowering of `tosa.pad` -> `tensor.pad` with -1 padding (PR #232221)
Federico Bruzzone
llvmlistbot at llvm.org
Thu Oct 15 05:17:43 PDT 2026
FedericoBruzzone wrote:
Ok, I was looking at the specification, too. You're faster than me, BTW. Thank you a lot for reporting all of this.
For reference,`2.10.2. PAD` (pag. 102) explicitly reports what you explain here.
That said, the MLIR impl must adhere to the TOSA spec, right?
I.e., the verifier should reject -1 _padding values_ mimicking the `ERROR_IF` semantics.
If so, I think that the current changes are correct... but ideally, _logically_ "dead code".
Let me explain.
IIUC, while having this check in `TosaToTensor` doesn't hurt, the `tosa::PadOp` verifier should reject `-1` padding. Is this correct?
https://github.com/llvm/llvm-project/pull/232221
More information about the Mlir-commits
mailing list