[Mlir-commits] [mlir] [mlir][linalg] Add support for scalable vectorization of linalg.mmt4d (PR #146531)

Andrzej WarzyƄski llvmlistbot at llvm.org
Thu Jul 17 05:45:50 PDT 2025


banach-space wrote:

Folks, if there are no further comments, I plan to land this later today (UK time).

By the way, @dcaballe and I have discussed this offline.

> I think we should also add a TODO, as this eventually should be a list containing the divisibility information for each dimension...

Agreed. However, I'd like to wait for a suitable use-case before introducing such an extension.

> Assuming a dynamic dimension is multiple of a vector size, scalable or not, is useful in general.

Agreed. 

Currently, the new logic assumes that the dynamic dimension **equals** the vector size, rather than being a **multiple** of it. We may need to support the latter in the future, with the caveat that:

* The dynamic dimension (which is a multiple of the corresponding vector size `N`) must only be accessed at offsets that are also multiples of `N`. So, the assumption would apply only in cases like the following:
```mlir
// %idx = k * 4, for some integer k.
vector.transfer_read %src[%idx] : tensor<?xf16>, vector<4xf16>
```

https://github.com/llvm/llvm-project/pull/146531


More information about the Mlir-commits mailing list