This is an archive of the discontinued LLVM Phabricator instance.

[mlir][tosa] Fix tosa.mul to use tosa.apply_scale
ClosedPublic

Authored by rsuderman on Mar 19 2021, 11:39 PM.

Details

Summary

Multiply-shift requires wider compute types or CPU specific code to avoid
premature truncation, apply_shift fixes this issue

Also, Tosa's mul op supports different input / output types. Added path that
sign-extends input values to int-32 values before multiplying.

Diff Detail

Event Timeline

rsuderman created this revision.Mar 19 2021, 11:39 PM
rsuderman requested review of this revision.Mar 19 2021, 11:39 PM
silvas accepted this revision.Mar 22 2021, 10:30 AM
This revision is now accepted and ready to land.Mar 22 2021, 10:30 AM
This revision was automatically updated to reflect the committed changes.