This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Set top-down traversal for LinalgElementwiseOpFusion
ClosedPublic

Authored by tpopp on Aug 10 2021, 5:07 AM.

Details

Summary

The primary pattern for this pass clones many operations from producers
to consumers. Doing this top down prevents duplicated work when a
producer has multiple consumers, if it also is consuming another
linalg.generic.

As an example, a chain of ~2600 generics that are fused into ~70
generics was resulting in 16255 pattern invocations. This took 14
seconds on one machine but takes only 0.3 seconds with top-down
traversal.

Diff Detail

Event Timeline

tpopp created this revision.Aug 10 2021, 5:07 AM
tpopp requested review of this revision.Aug 10 2021, 5:07 AM
tpopp added a comment.Aug 13 2021, 7:48 AM

Friendly ping on this

This revision is now accepted and ready to land.Aug 16 2021, 12:25 AM