[PSA] VectorType - scalable dimensions

Hi everyone,

I have just landed two patches that update how scalable vectors work:

If you don’t care about scalable vectors then this change won’t affect you :slight_smile:

If you do use scalable vectors then please note that this old syntax:

// OLD syntax
 vector<[2x3]x4xf32>

has been replaced with:

// NEW syntax
 vector<[2]x[3]x4xf32>

Additionally (and more importantly), any dimension in a vector is allowed to be scalable, e.g.:

// NEW - arbitrary dimension can be scalable. This wasn't supported _before_.
vector<[2]x4xf32>

Until recently only the trailing dimensions were allowed to be scalable, e.g.

// OLD - only the trailing dimension can be scalable
vector<2x[4]xf32>

This change was introduced to enable https://discourse.llvm.org/t/rfc-scalable-vectorisation-in-linalg/.

-Andrzej

5 Likes