This is an archive of the discontinued LLVM Phabricator instance.

[mlir:Linalg] Populate LinalgOp patterns on LinalgDialect as opposed to each op
ClosedPublic

Authored by rriddle on Jun 11 2021, 4:55 PM.

Details

Summary

Interface patterns are unique in that they get added to every operation that also implements that interface, given that they aren't tied to individual operations. When the same interface pattern gets added to multiple operations (such as the current behavior with Linalg), an reference to each of these patterns is added to every op (meaning that an operation will now have N references to effectively the same pattern). This revision fixes this problematic behavior in Linalg, and can bring upwards of a 25% reduction in compile time in Linalg based workloads.

Diff Detail

Event Timeline

rriddle created this revision.Jun 11 2021, 4:55 PM
rriddle requested review of this revision.Jun 11 2021, 4:55 PM
mehdi_amini accepted this revision.Jun 11 2021, 5:08 PM
This revision is now accepted and ready to land.Jun 11 2021, 5:08 PM