This is an archive of the discontinued LLVM Phabricator instance.

[mlir][linalg] Fix FoldConstantTranspose execution inefficiency
ClosedPublic

Authored by antiagainst on Oct 19 2021, 3:15 PM.

Details

Summary
  • Move SmallVectors outside of inner loops to avoid frequent allocations and deallocations
  • Calculate linearized index and call flat range getters to avoid internal shape querying behind getValue.

Diff Detail

Event Timeline

antiagainst created this revision.Oct 19 2021, 3:15 PM
antiagainst requested review of this revision.Oct 19 2021, 3:15 PM

Split int/float cases entirely to avoid getters in the loop

This revision is now accepted and ready to land.Oct 26 2021, 3:51 PM