This is an archive of the discontinued LLVM Phabricator instance.

[mlir:Async] Convert AsyncParallelFor pass to ModuleOp pass
ClosedPublic

Authored by ezhulenev on Jun 27 2021, 2:26 PM.

Details

Summary

Depends On D104891

Outlining scf.parallel body as a function requires async-parallel-for pass to be a ModuleOp pass

Diff Detail

Event Timeline

ezhulenev created this revision.Jun 27 2021, 2:26 PM
ezhulenev requested review of this revision.Jun 27 2021, 2:26 PM
ezhulenev edited the summary of this revision. (Show Details)Jun 27 2021, 2:27 PM
ezhulenev added a reviewer: herhut.
bondhugula accepted this revision.Jun 27 2021, 5:37 PM
bondhugula added a subscriber: bondhugula.

Incidentally, does this pass work as intended if scf.parallel are nested within each other? I didn't see a test case where you would get an outlined function in a function already outlined.

This revision is now accepted and ready to land.Jun 27 2021, 5:37 PM

In theory nested scf.parallel should work, but my plan was to disable this transformation for nested operation because computing block size will get tricky. Will send a PR for this change after I'll land all the other pending changes.

I wanted too look at going directly from linalg operations to parallel loops, because in linalg it's easy to figure out the loop structure and iteration space size and compute approximate cost from it, then it should be easier to decide how many loops are worth parallelizing.