This is an archive of the discontinued LLVM Phabricator instance.

Implementation of `ReshapeNoopOptimization` canonicalizer.
ClosedPublic

Authored by KoolJBlack on Oct 18 2021, 4:10 PM.

Details

Summary

This canonicalizer replaces reshapes of constant tensors that contain the updated shape (skipping the reshape operation).

Diff Detail

Event Timeline

KoolJBlack created this revision.Oct 18 2021, 4:10 PM
KoolJBlack requested review of this revision.Oct 18 2021, 4:10 PM
KoolJBlack added a subscriber: not-jenni.
rsuderman accepted this revision.Oct 19 2021, 3:57 PM
This revision is now accepted and ready to land.Oct 19 2021, 3:57 PM
rriddle added inline comments.Oct 19 2021, 4:00 PM
mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
163

mlir uses camelCase variable names.

167

Drop trivial braces here, and below

186–190

Can you use replaceOpWithNewOp instead?

This revision was automatically updated to reflect the committed changes.
KoolJBlack marked 3 inline comments as done.Oct 19 2021, 4:09 PM

Changes submitted on commit (Rob has double checked them)