This is an archive of the discontinued LLVM Phabricator instance.

[mlir][tosa] tosa.resize canonicalizer for trivial noop
ClosedPublic

Authored by rsuderman on Oct 5 2022, 4:07 PM.

Details

Summary

If the scaling factor is by 1 with no offset or border, then the
resize is a no-op.

Diff Detail

Event Timeline

rsuderman created this revision.Oct 5 2022, 4:07 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 5 2022, 4:07 PM
rsuderman requested review of this revision.Oct 5 2022, 4:07 PM
rsuderman updated this revision to Diff 465588.Oct 5 2022, 4:07 PM

git-clang-format

dcaballe accepted this revision.Oct 5 2022, 4:23 PM

Thanks, Robert! A couple of minor comments. LGTM once you address them.

mlir/lib/Dialect/Tosa/IR/TosaCanonicalizations.cpp
850

Perhaps add some doc about the cases that are being folded?

mlir/test/Dialect/Tosa/canonicalize.mlir
416

Missing CHECK? Same below?

This revision is now accepted and ready to land.Oct 5 2022, 4:23 PM
rsuderman updated this revision to Diff 465596.Oct 5 2022, 4:27 PM

fixed for comments

rsuderman marked 2 inline comments as done.Oct 5 2022, 4:28 PM
This revision was landed with ongoing or failed builds.Oct 5 2022, 4:30 PM
This revision was automatically updated to reflect the committed changes.