This is an archive of the discontinued LLVM Phabricator instance.

[mlir][tosa] Add support for dynamic width and height for pooling operations in the tosa to linalg lowering
ClosedPublic

Authored by NatashaKnk on Sep 6 2022, 5:18 PM.

Diff Detail

Event Timeline

NatashaKnk created this revision.Sep 6 2022, 5:18 PM
Herald added a project: Restricted Project. · View Herald Transcript
NatashaKnk requested review of this revision.Sep 6 2022, 5:18 PM

Pull in most recent version

rsuderman added inline comments.Sep 7 2022, 10:58 AM
mlir/lib/Conversion/TosaToLinalg/TosaToLinalgNamed.cpp
100–120

You can check but I don't think you actually need a template, function overloading should be enough. You would just have two functions with slightly different args but the same name.

117

You should check that dim is withinin the right range and return nullptr if not.

711–719

Ditto on op->getAttr comment.

792–800

rather than op->getAttr you should be able to do op.kernel(), etc.

NatashaKnk updated this revision to Diff 458548.Sep 7 2022, 1:35 PM

Remove template, small fixes

NatashaKnk marked 4 inline comments as done.Sep 7 2022, 1:36 PM
NatashaKnk added inline comments.
mlir/lib/Conversion/TosaToLinalg/TosaToLinalgNamed.cpp
100–120

Whoops, good point

rsuderman accepted this revision.Sep 7 2022, 2:24 PM
This revision is now accepted and ready to land.Sep 7 2022, 2:24 PM
This revision was landed with ongoing or failed builds.Sep 8 2022, 10:05 AM
This revision was automatically updated to reflect the committed changes.
silvas added a subscriber: silvas.Sep 14 2022, 11:22 AM

This patch appears to be miscompiling. See discussion on https://github.com/llvm/torch-mlir/issues/1361

Can we revert this patch?

NatashaKnk marked an inline comment as done.Sep 14 2022, 12:52 PM

Yes, AFAIK there shouldn't be issues in reverting this patch.

Okay, let's revert it then.