This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Vector] Add basic scalable vectorization support to Linalg vectorizer

Authored by dcaballe on Jun 9 2023, 6:04 PM.



For now, only elementwise operations are supported. Operations that perform any
kind of data permutation require changes in the representation of scalable
dimensions in VectorType.

Diff Detail

Event Timeline

dcaballe created this revision.Jun 9 2023, 6:04 PM
Herald added a project: Restricted Project. · View Herald Transcript
dcaballe requested review of this revision.Jun 9 2023, 6:04 PM
awarzynski accepted this revision.Jun 12 2023, 10:45 AM

I am over the moon - this is a great day for scalable vectorisation and I will be celebrating :) Thank you so much for preparing this!

LGTM. A few nits/questions inline, but these can be addressed when merging.


including the information about its scalable dimensions

Is this statement true? I'd assume that scalableVecDims holds info about scalable dims.


dstVecType is so much clearer than targetVectorType :)


What does "first" refer to in this context?


Shouldn't this be an assert? And doesn't the message require updating ?

This revision is now accepted and ready to land.Jun 12 2023, 10:45 AM

Thanks for the feedback. I think I fixed everything! Landing...


Good catch! It was in my initial version where I had created a struct combining canonicalVecShape and scalableVecDims :)


I'm not quite sure, honestly. This code is a bit old. I didn't want to make a big unrelated change here but we should revisit this a bit more.


Good point... This is an API requirement. Thanks.

tblah added a subscriber: tblah.Jun 14 2023, 2:12 AM