This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Unrolled progressive-vector-to-scf.
ClosedPublic

Authored by springerm on May 6 2021, 1:59 AM.

Details

Summary

Instead of an SCF for loop, these pattern generate fully unrolled loops with no temporary buffer allocations.

Depends On D101745

Diff Detail

Event Timeline

springerm created this revision.May 6 2021, 1:59 AM
springerm requested review of this revision.May 6 2021, 1:59 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 6 2021, 1:59 AM
springerm updated this revision to Diff 343352.May 6 2021, 4:02 AM

Minor changes

springerm updated this revision to Diff 343354.May 6 2021, 4:09 AM

Minor changes

springerm updated this revision to Diff 343559.May 6 2021, 7:29 PM

(no change)

springerm updated this revision to Diff 343562.May 6 2021, 7:34 PM

(no change)

springerm updated this revision to Diff 343822.May 8 2021, 1:03 AM

handle masks correctly

nicolasvasilache requested changes to this revision.May 12 2021, 3:25 AM

we should have some basic test which shows the unrolling and the not-unrolled part.
No need to be fancy about variable captures etc but we should test some IR.

mlir/lib/Conversion/VectorToSCF/ProgressiveVectorToSCF.cpp
678

can we refactor a bit for early exit and reducing nesting?

auto mask = xferOp.mask();
if (!mask)
  return;
if (isOuter...) {
  newXferOp ...
  return;
}
// rest
This revision now requires changes to proceed.May 12 2021, 3:25 AM
nicolasvasilache accepted this revision.May 12 2021, 3:31 AM

Rest LGTM, approving conditioned on a few IR tests, thanks!

This revision is now accepted and ready to land.May 12 2021, 3:31 AM
springerm updated this revision to Diff 345011.May 12 2021, 7:32 PM
springerm marked an inline comment as done.

address comments

This revision was landed with ongoing or failed builds.May 12 2021, 9:09 PM
This revision was automatically updated to reflect the committed changes.