This is an archive of the discontinued LLVM Phabricator instance.

[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
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.

Diff Detail

Event Timeline

krzysz00 created this revision.Aug 24 2023, 7:34 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 24 2023, 7:34 AM
krzysz00 requested review of this revision.Aug 24 2023, 7:34 AM
jpienaar accepted this revision.Aug 27 2023, 8:20 AM
This revision is now accepted and ready to land.Aug 27 2023, 8:20 AM
eric-k256 accepted this revision.Aug 28 2023, 1:03 PM

Looks good to me.

This revision was automatically updated to reflect the committed changes.