This is an archive of the discontinued LLVM Phabricator instance.

[mlir][vector] Add scalar vector xfer to memref patterns
ClosedPublic

Authored by springerm on Dec 16 2022, 6:49 AM.

Details

Summary

These patterns devectorize scalar transfers such as vector<f32> or vector<1xf32>.

Diff Detail

Event Timeline

springerm created this revision.Dec 16 2022, 6:49 AM
Herald added a project: Restricted Project. · View Herald Transcript
springerm requested review of this revision.Dec 16 2022, 6:49 AM
Herald added a project: Restricted Project. · View Herald Transcript
springerm updated this revision to Diff 483555.Dec 16 2022, 8:28 AM

add comment

This looks great! Would it make sense to also add support for single insert + transfer write?

This looks great! Would it make sense to also add support for single insert + transfer write?

I think this should be handled by another canonicalization. If an insert into a vector<1xf32>, the IR can be rewritten to a broadcast of the scalar, at which point this pattern applies.

nicolasvasilache accepted this revision.Dec 19 2022, 1:22 AM
This revision is now accepted and ready to land.Dec 19 2022, 1:22 AM