This is an archive of the discontinued LLVM Phabricator instance.

[MLIR][TOSA] Comparison based elementwise operations for tosa-to-linalg
ClosedPublic

Authored by NatashaKnk on Feb 1 2021, 5:24 PM.

Details

Summary

Comitted log, exp, maximum, minimum, comparison, ceil and floor conversions from TOSA to LinAlg. Support for signless integer and floating point.

Diff Detail

Event Timeline

NatashaKnk created this revision.Feb 1 2021, 5:24 PM
NatashaKnk requested review of this revision.Feb 1 2021, 5:24 PM
rriddle added inline comments.Feb 1 2021, 5:38 PM
mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp
32

Why did this change?

165

Why did you change operation->getResultTypes() to operation->getResults().getType()? They are the same thing.

NatashaKnk updated this revision to Diff 320647.Feb 1 2021, 5:53 PM

Changed to use operation->getResultTypes()

NatashaKnk added inline comments.Feb 1 2021, 5:56 PM
mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp
32

For certain cases (like the comparison ops) the input type doesn't match the output type. We are interested in the input type and not the output type.

165

Good point, fixed.

NatashaKnk marked 2 inline comments as done.Feb 1 2021, 5:57 PM
rsuderman accepted this revision.Feb 1 2021, 9:36 PM
This revision is now accepted and ready to land.Feb 1 2021, 9:36 PM