This is an archive of the discontinued LLVM Phabricator instance.

[MLIR][Linalg] Lower `linalg.tiled_loop` to `scf` loops
ClosedPublic

Authored by frgossen on May 3 2021, 2:22 AM.

Diff Detail

Event Timeline

frgossen created this revision.May 3 2021, 2:22 AM
frgossen requested review of this revision.May 3 2021, 2:22 AM
ftynse added a subscriber: ftynse.May 3 2021, 2:26 AM
ftynse added inline comments.
mlir/lib/Dialect/Linalg/Transforms/Loops.cpp
575–579

Have you considered rewriter.mergeBlock to avoid creating copy of operations just to erase the originals? It lets you replace arguments of the old block with arbitrary values as well.

pifon2a accepted this revision.May 3 2021, 2:31 AM

We might need a separate pass that lowers only TiledLoopOp and not the linalg ops inside its region. But for now it should be fine. Thanks!

mlir/lib/Dialect/Linalg/Transforms/Loops.cpp
575–579

+1

600–601

this add<>() is variadic, isn't it?

This revision is now accepted and ready to land.May 3 2021, 2:31 AM
frgossen updated this revision to Diff 342428.May 3 2021, 9:45 AM
frgossen marked 3 inline comments as done.

Address comments

This revision was landed with ongoing or failed builds.May 3 2021, 9:47 AM
This revision was automatically updated to reflect the committed changes.