[Mlir-commits] [mlir] [mlir][VectorOps] Extend vector.constant_mask to support 'all true' scalable dims (PR #66638)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Mon Sep 18 13:57:25 PDT 2023
banach-space wrote:
> Is the constant input required to be always lower or equal to the scalable base?
ATM it is required to be "equal".
>
> For example, what these two examples would mean:
>
> ```
> %mask = vector.constant_mask [2, 7] : vector<4x[4]xi1>
> %mask = vector.constant_mask [2, 3] : vector<4x[4]xi1>
> ```
Indeed, it's unclear and hence I suggest that it's not supported until we figure this out :)
>
> I'm also wondering if it would make sense to distinguish between `[2, 4] : vector<4x[4]xi1>` and `[2, [4]] : vector<4x[4]xi1>` as they may mean completely different things?
I can't think of a use case for this that couldn't be accommodated with `vector.create_mask`.
For cases like this one [here](https://github.com/llvm/llvm-project/pull/65621#discussion_r1321037163), it should be sufficient if we have a Vector op that we can use to create an "all true" mask for scalable vectors (instead of using`arith.constant dense<true> : vector<[8]xi1>`). IIUC, this is what this patch strives to achieve. As for more complex cases, we should get a better idea in the coming weeks/months as we continue extending/refining support for SVE and scalable vectors.
https://github.com/llvm/llvm-project/pull/66638
More information about the Mlir-commits
mailing list