Hi everyone!
We were trying to translate the tosa.conv2d operation into linalg operations using mlir-opt, and we found that tensors with int8 element type do not show any output.
Specifically, if we use the command mlir-opt -tosa-to-linalg on the file
SG, then yes that’s a bug - somewhere there is a return failure which should be using an emitError or emitOpError instead. Returning with print-after-all should narrow down where it is failing.
Unfortunately in the majority of cases I saw, silent failures are because of a parser silently failing, or the verifier silently failing on load, all before you get to the pass pipeline!
In particular this IR fails without running any pass pipeline, just round-tripping through mlir-opt has the same result.
Sorry I didn’t see this sooner, and thank you to @mehdi_amini for the fix that unlocked the error message
As the error says, the problem is that TOSA treats this as a quantized datatype, and needs the corresponding quantization attribute. It could be trivially fixed by setting the zero points to 0s: