From d3aa92ed142409266ebcc9cbc20e5f2c2d0209c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrzej=20Warzy=C5=84ski?= Date: Thu, 28 Mar 2024 14:53:21 +0000 Subject: [mlir][vector] Add support for scalable vectors to VectorLinearize (#86786) Adds support for scalable vectors to patterns defined in VectorLineralize.cpp. Linearization is disable in 2 notable cases: * vectors with more than 1 scalable dimension (we cannot represent vscale^2), * vectors initialised with arith.constant that's not a vector splat (such arith.constant Ops cannot be flattened). --- mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp') diff --git a/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp b/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp index f14fb18706d1..006225999105 100644 --- a/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp +++ b/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp @@ -489,7 +489,9 @@ struct TestFlattenVectorTransferPatterns Option targetVectorBitwidth{ *this, "target-vector-bitwidth", llvm::cl::desc( - "Minimum vector bitwidth to enable the flattening transformation"), + "Minimum vector bitwidth to enable the flattening transformation. " + "For scalable vectors this is the base size, i.e. the size " + "corresponding to vscale=1."), llvm::cl::init(std::numeric_limits::max())}; void runOnOperation() override { -- cgit v1.2.3