[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:25:54 PDT 2026
joker-eph wrote:
> Mmm... I'm not super familiar with TOSA. However, I'd like to hope that with ERROR_IF, they intend to catch the issue at compile time, since it’s statically checkable. Am I wrong?
```
if(%runtime_condition) {
tosa.pad %invalid_padding
} else {
tosa.pad %correct_padding
}
```
In general this cannot be rejected statically if you don't know the runtime conditions.
So you may try to reject things that you can prove are executed, but it is a bit annoying because it makes the definition of what is a valid program statically dependent on the optimization and transformation you will do on the program.
https://github.com/llvm/llvm-project/pull/232221
More information about the Mlir-commits
mailing list