This is an archive of the discontinued LLVM Phabricator instance.

[mlir][vector] Extend vector distribution to all elementwise and contract
ClosedPublic

Authored by ThomasRaoux on Jun 15 2021, 5:42 PM.

Details

Summary

Uses elementwise interface to generalize canonicalization pattern and add a new pattern for vector.contract case.

Diff Detail

Event Timeline

ThomasRaoux created this revision.Jun 15 2021, 5:42 PM
ThomasRaoux requested review of this revision.Jun 15 2021, 5:42 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 15 2021, 5:42 PM
nicolasvasilache added inline comments.
mlir/lib/Dialect/Vector/VectorTransforms.cpp
2832

This IR form does not seem valid as per the VectorOps.td doc.

2876

This is too one-off magical to my taste.
ExtractMapOp should have a static helper function that abstracts all of this (and evolves as the AffineMap evolves).

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

Fix comment and format.

ThomasRaoux marked an inline comment as done.Jun 30 2021, 4:35 PM
ThomasRaoux added inline comments.
mlir/lib/Dialect/Vector/VectorTransforms.cpp
2876

I'm not sure I fully understand, this map is related to the contract op in this case, not sure how this can become a helper related to ExtractMapOp.
I'll commit it like that and I can address any concerns remaining post commit.

This revision was landed with ongoing or failed builds.Jun 30 2021, 4:36 PM
This revision was automatically updated to reflect the committed changes.