This is an archive of the discontinued LLVM Phabricator instance.

[MLIR] Fix affine parallelize pass.
ClosedPublic

Authored by pashu123 on Jun 16 2021, 12:46 AM.

Details

Summary

To control the number of outer parallel loops, we need to process the
outer loops first and hence pre-order walk fixes the issue.

Diff Detail

Event Timeline

pashu123 created this revision.Jun 16 2021, 12:46 AM
pashu123 requested review of this revision.Jun 16 2021, 12:46 AM
pashu123 updated this revision to Diff 352363.Jun 16 2021, 12:50 AM

Added reviewer.

The commit summary is outdated/does not match the fix. Furthermore, a deque is not needed here any more.

mlir/lib/Dialect/Affine/Transforms/AffineParallelize.cpp
52–53

Why is deque being used here? An std::vector would do.

bondhugula requested changes to this revision.Jun 16 2021, 11:36 AM
This revision now requires changes to proceed.Jun 16 2021, 11:36 AM
bondhugula added inline comments.Jun 16 2021, 11:37 AM
mlir/lib/Dialect/Affine/Transforms/AffineParallelize.cpp
53–56

Thanks for fixing this - looks good other than the fact that a deque isn't needed here.

pashu123 updated this revision to Diff 352501.Jun 16 2021, 11:51 AM

Updating the commit message and minor changes.

pashu123 edited the summary of this revision. (Show Details)Jun 16 2021, 11:52 AM
bondhugula accepted this revision.Jun 16 2021, 12:44 PM
This revision is now accepted and ready to land.Jun 16 2021, 12:44 PM
This revision was landed with ongoing or failed builds.Jun 16 2021, 12:56 PM
This revision was automatically updated to reflect the committed changes.