This is an archive of the discontinued LLVM Phabricator instance.

[mlir][vector] Add an option to skip transpose lowering during contractLowering
ClosedPublic

Authored by ThomasRaoux on Apr 30 2021, 10:01 AM.

Details

Summary

This is useful as it is sometimes better to try to canonicalize the transpose away after contract lowering rather than lowering it to a chain of scalar insert/extract.

Diff Detail

Event Timeline

ThomasRaoux created this revision.Apr 30 2021, 10:01 AM
ThomasRaoux requested review of this revision.Apr 30 2021, 10:01 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 30 2021, 10:01 AM
nicolasvasilache requested changes to this revision.Apr 30 2021, 10:12 AM

shouldn't we instead omit the transpose lowering pattern in places where don't want to apply it?

This revision now requires changes to proceed.Apr 30 2021, 10:12 AM

shouldn't we instead omit the transpose lowering pattern in places where don't want to apply it?

Do you mean adding a if() addPattern<TransposeLowering> in or split the populateVectorContractLoweringPatterns? Splitting it would make sense, I just need to make sure every user gets updated.

Changed it to a NFC change moving transpose lowering in a separate populate function.

shouldn't we instead omit the transpose lowering pattern in places where don't want to apply it?

Do you mean adding a if() addPattern<TransposeLowering> in or split the populateVectorContractLoweringPatterns? Splitting it would make sense, I just need to make sure every user gets updated.

I moved TransposeLowering in a different populate function.

nicolasvasilache accepted this revision.Apr 30 2021, 2:14 PM

yes that is what I meant, thanks!

This revision is now accepted and ready to land.Apr 30 2021, 2:14 PM