torch-mlir/lib/Conversion/TorchToTosa
Srinath Avadhanula 0f80e75c2e
allow tosa.cast to convert from f32 to f16 (#2934)
According to the [official TOSA
spec](https://www.mlplatform.org/tosa/tosa_spec.html#_cast), `tosa.cast`
allows a cast from `fp32` to `fp16`. We were not previously accounting
for this in the `TorchToTosa` lowering.

Also did a tiny bit of cleanup in the code to make it easier to spot
which conversions are currently allowed.

---------

Co-authored-by: Srinath Avadhanula <srinath.avadhanula@getcruise.com>
2024-02-20 14:22:38 -08:00
..
CMakeLists.txt Re-organize project structure to separate PyTorch dependencies from core project. (#2542) 2023-11-02 19:45:55 -07:00
TorchToTosa.cpp Do not try to legalize transposed convolution (#2721) 2024-01-22 10:57:56 -08:00
TosaLegalizeCommon.cpp Clang format refresh (#2812) 2024-01-29 12:59:33 -05:00
TosaLegalizeUtils.cpp allow tosa.cast to convert from f32 to f16 (#2934) 2024-02-20 14:22:38 -08:00