llvm
3112581e - [mlir][tosa] Improve folder conformance to TOSA specification (#200223)

Commit
4 days ago
[mlir][tosa] Improve folder conformance to TOSA specification (#200223) This commit fixes some bugs in TOSA folders that cause non-conformant results. The fixes include: - tosa.intdiv - Folding when the lhs and rhs are zero. In the TOSA specification this is undefined behaviour. - tosa.div_ceil_shape/tosa.div_floor_shape - Folding when the lhs is negative or the rhs is non-positive. In the TOSA specification this is undefined behaviour. In addition, some test cases have been added for non-exercised code paths, including: - tosa.intdiv - Rejects overflow cases - tosa.greater/tosa.greater_equal/tosa.equal - Correctly evaluates NaN cases to False. - tosa.cast - Saturating rounding when input is out of range of the output type. - tosa.mod_shape - Rejects cases where lhs is negative or rhs is non-positive.
Author
Parents
Loading