[Mlir-commits] [mlir] [mlir][vector] Address linearization comments (post commit) (PR #138075)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Mon May 12 03:35:22 PDT 2025
================
@@ -447,18 +444,22 @@ struct LinearizeVectorSplat final
} // namespace
-/// Return true if the operation `op` does not support scalable vectors and
-/// has at least 1 scalable vector result. These ops should all eventually
-/// support scalable vectors, and this function should be removed.
+/// Some operations currently will not be linearized if they have scalable
+/// vector results, although support should be added in the future. This
+/// function returns true if `op` is such an operation.
----------------
banach-space wrote:
The actual rationale comes from the fact that `vector.shuffle` does not support scalable vectors: https://github.com/llvm/llvm-project/blob/0009a1783490a8ff69251a0ec7df1891a427cfb0/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td#L430-L431
So, if linearising a particular Op requires `vector.shuffle`, scalable vectors cannot be supported. This would imply that none of these supports scalable vectors: https://github.com/llvm/llvm-project/blob/0009a1783490a8ff69251a0ec7df1891a427cfb0/mlir/lib/Dialect/Vector/Transforms/VectorLinearize.cpp#L516-L522
Could you update these comments accordingly? Also,
> Some operations currently will not be linearized if they have scalable vector results
is there an example where non-scalable result (with some operands are scalable) makes an operation "linearizable"?
https://github.com/llvm/llvm-project/pull/138075
More information about the Mlir-commits
mailing list