This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Fold tensor.reshape operations into tensor.from_elements.
ClosedPublic

Authored by rsuderman on Jan 25 2022, 3:37 PM.

Details

Summary

There is not much of a benefit to reshape a from element vs reloading it.
Updated to progagate shape manipulations into the output type of
tensor.from_elements.

Diff Detail

Event Timeline

rsuderman created this revision.Jan 25 2022, 3:37 PM
rsuderman requested review of this revision.Jan 25 2022, 3:37 PM
rriddle added inline comments.Jan 25 2022, 3:40 PM
mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
806–812
rsuderman updated this revision to Diff 403058.Jan 25 2022, 3:47 PM

Synced to head.

rsuderman updated this revision to Diff 403059.Jan 25 2022, 3:50 PM

Simplified getDefiningOp behavior.

rsuderman marked an inline comment as done.Jan 25 2022, 3:51 PM
rsuderman added a reviewer: rriddle.
NatashaKnk accepted this revision.Jan 25 2022, 3:51 PM
This revision is now accepted and ready to land.Jan 25 2022, 3:51 PM
This revision was landed with ongoing or failed builds.Jan 25 2022, 3:57 PM
This revision was automatically updated to reflect the committed changes.