This is an archive of the discontinued LLVM Phabricator instance.

[mlir][tosa] Add some transpose folders
ClosedPublic

Authored by antiagainst on Sep 24 2021, 12:09 PM.

Details

Summary
  • If the input is a constant splat value, we just need to reshape it.
  • If the input is a general constant with one user, we can also constant fold it, without bloating the IR.

Diff Detail

Event Timeline

antiagainst created this revision.Sep 24 2021, 12:09 PM
antiagainst requested review of this revision.Sep 24 2021, 12:09 PM
rsuderman accepted this revision.Sep 24 2021, 12:13 PM
This revision is now accepted and ready to land.Sep 24 2021, 12:13 PM
This revision was landed with ongoing or failed builds.Sep 24 2021, 12:25 PM
This revision was automatically updated to reflect the committed changes.
rriddle added inline comments.Sep 24 2021, 12:31 PM
mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
172–173

!op.input1().hasOneUse()?