Fix the lowering of tosa.cast to create attributes of the input source
type when casting from floats to integers.
This is motivated by the need to cast fp16 to i9, which we have
encountered in certain quantized models.
Paths
| Differential D158738
[mlir][Tosa] Allow non-fp32 tosa.cast to integers ClosedPublic Authored by krzysz00 on Aug 24 2023, 7:34 AM.
Details Summary Fix the lowering of tosa.cast to create attributes of the input source This is motivated by the need to cast fp16 to i9, which we have
Diff Detail
Event TimelineThis revision is now accepted and ready to land.Aug 27 2023, 8:20 AM Closed by commit rG1c5fd1534cfd: [mlir][Tosa] Allow non-fp32 tosa.cast to integers (authored by krzysz00). · Explain WhyAug 29 2023, 7:11 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 554317 mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp
mlir/test/Conversion/TosaToLinalg/tosa-to-linalg.mlir
|