This is an archive of the discontinued LLVM Phabricator instance.

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

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

Details

Summary

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.

mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
269–270

including the information about its scalable dimensions

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

566

dstVecType is so much clearer than targetVectorType :)

1199–1200

What does "first" refer to in this context?

1598–1601

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...

mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
269–270

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

1199–1200

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.

1598–1601

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

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