This is an archive of the discontinued LLVM Phabricator instance.

[mlir][tosa] Add tosa.avg_pool2d lowering
ClosedPublic

Authored by rsuderman on Apr 19 2021, 2:02 PM.

Details

Summary

Added the float lowerings for avg pool with corresponding tests.

Diff Detail

Event Timeline

rsuderman created this revision.Apr 19 2021, 2:02 PM
rsuderman requested review of this revision.Apr 19 2021, 2:02 PM
mravishankar accepted this revision.Apr 20 2021, 12:43 PM

LGTM, but just a few questions/clarifications.

mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp
1758

Why is there a tosa.mul op here? I am assuming the added mulop is expected to be converted to a generic op by the dialect conversion framework.
Also if the existing pooling op defs doesnt support what the TOSA pooling op needs, is it worth adding a new op. I dont have a strong preference, just a question.

This revision is now accepted and ready to land.Apr 20 2021, 12:43 PM

LGTM, but just a few questions/clarifications.

I spoke to Hanhan and it sounded like we will be migrating from TC ops to YML for pooling ops, similar to what we have already done for matmul. I was going to wait for this part of the migration before implementing the integer variants. Is there any plan for when that may happen?

This revision was automatically updated to reflect the committed changes.