This is an archive of the discontinued LLVM Phabricator instance.

[mlir][linalg] TiledLoopOp peeling: Do not peel partial iterations
ClosedPublic

Authored by springerm on Sep 10 2021, 7:53 PM.

Details

Summary

Extend the unit test with an option for skipping partial iterations during loop peeling.

Diff Detail

Event Timeline

springerm created this revision.Sep 10 2021, 7:53 PM
springerm requested review of this revision.Sep 10 2021, 7:53 PM
huajsj added a subscriber: huajsj.Sep 10 2021, 10:10 PM
huajsj added inline comments.
mlir/test/lib/Dialect/Linalg/TestLinalgTransforms.cpp
608

Check if the loop has already peeled.

613

If the loop nests is partial iterations, then don't peel.

623–624

one more line after 623?

638–639

If set to true, TiledLoopOps that are the partial iteration of another peeled TiledLoopOp will not be peeled.

herhut accepted this revision.Sep 13 2021, 1:36 AM

Thanks, just a nit.

mlir/test/lib/Dialect/Linalg/TestLinalgTransforms.cpp
654

These two walks can be combined.

This revision is now accepted and ready to land.Sep 13 2021, 1:36 AM
springerm updated this revision to Diff 372374.Sep 13 2021, 6:00 PM
springerm marked 2 inline comments as done.

address comments

mlir/test/lib/Dialect/Linalg/TestLinalgTransforms.cpp
613

Reformulated: The loop nest represented by the TiledLoopOp should not be peeled if one of its loops is a partial iteration.

This revision was landed with ongoing or failed builds.Sep 13 2021, 6:06 PM
This revision was automatically updated to reflect the committed changes.