Commit a318c50
authored
[mlir][tosa] Remove NegateOp to SubOp and 48-bit promotion in TosaToLinalg (#170622)
The patch motivated by Tosa Conformance test negate_32x45x49_i16_full failure.
TosaToLinalg pass has an optimization to transfer Tosa Negate to Sub if the zero points are zeros. However, when the input value is minimum negative number, the transformation will cause the underflow. By removing the transformation, if zp = 0 it would do the promotion to avoid the underflow.
Promotion types could be from int32 to int48. TOSA negate specification does not mention support for int48. Should we consider removing the promotion to int48 to stay aligned with the TOSA spec?1 parent 19e1011 commit a318c50
File tree
2 files changed
+22
-15
lines changed- mlir
- lib/Conversion/TosaToLinalg
- test/Conversion/TosaToLinalg
2 files changed
+22
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | 203 | | |
211 | 204 | | |
212 | 205 | | |
| |||
221 | 214 | | |
222 | 215 | | |
223 | 216 | | |
224 | | - | |
225 | | - | |
| 217 | + | |
226 | 218 | | |
227 | 219 | | |
228 | 220 | | |
229 | 221 | | |
230 | | - | |
231 | | - | |
232 | 222 | | |
233 | 223 | | |
234 | 224 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
666 | 666 | | |
667 | 667 | | |
668 | 668 | | |
669 | | - | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
670 | 676 | | |
671 | 677 | | |
672 | 678 | | |
| |||
889 | 895 | | |
890 | 896 | | |
891 | 897 | | |
892 | | - | |
893 | | - | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
894 | 905 | | |
895 | 906 | | |
896 | 907 | | |
| |||
2610 | 2621 | | |
2611 | 2622 | | |
2612 | 2623 | | |
2613 | | - | |
| 2624 | + | |
| 2625 | + | |
| 2626 | + | |
| 2627 | + | |
| 2628 | + | |
| 2629 | + | |
| 2630 | + | |
2614 | 2631 | | |
2615 | 2632 | | |
2616 | 2633 | | |
| |||
0 commit comments