Page MenuHomePhabricator

[MLIR][TOSA] Added lowerings for Reduce operations to Linalg
ClosedPublic

Authored by rsuderman on Mar 3 2021, 3:32 PM.

Details

Summary

Lowerings for min, max, prod, and sum reduction operations on int and float
values. This includes reduction tests for both cases.

Diff Detail

Event Timeline

rsuderman created this revision.Mar 3 2021, 3:32 PM
rsuderman requested review of this revision.Mar 3 2021, 3:32 PM
rsuderman updated this revision to Diff 327949.Mar 3 2021, 3:34 PM

Fixed incidental variable names.

rsuderman updated this revision to Diff 327959.Mar 3 2021, 4:20 PM

Fixed clang tidy error.

bondhugula added inline comments.
mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp
333

Doc comment please.

368

Likewise - all static methods are to have doc comments as well.

371

You may reduce space and verbosity with a Location loc = op->getLoc() on the top.

653

You don't need getOperation().

rsuderman updated this revision to Diff 328241.Mar 4 2021, 11:01 AM

bondhugula@ comments

rsuderman marked 4 inline comments as done.Mar 4 2021, 11:01 AM
mravishankar accepted this revision.Mar 4 2021, 10:00 PM

Looks good. Just one nit.

mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp
378

I think you can drop the getResult() here. It should cast to Value automatically.

This revision is now accepted and ready to land.Mar 4 2021, 10:00 PM
rsuderman updated this revision to Diff 329073.Mar 8 2021, 10:56 AM

final nits

rsuderman marked an inline comment as done.Mar 8 2021, 11:02 AM
This revision was landed with ongoing or failed builds.Mar 8 2021, 11:04 AM
This revision was automatically updated to reflect the committed changes.