[all-commits] [llvm/llvm-project] aa9d36: [mlir][linalg] Relax scalable vectorization restri...
Andrzej Warzyński via All-commits
all-commits at lists.llvm.org
Thu Nov 28 23:43:31 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: aa9d36869090fdff8cd416c83a5106a1b45b0ff7
https://github.com/llvm/llvm-project/commit/aa9d36869090fdff8cd416c83a5106a1b45b0ff7
Author: Andrzej Warzyński <andrzej.warzynski at arm.com>
Date: 2024-11-29 (Fri, 29 Nov 2024)
Changed paths:
M mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
M mlir/test/Dialect/Linalg/vectorization-scalable.mlir
Log Message:
-----------
[mlir][linalg] Relax scalable vectorization restrictions (#117991)
Currently, the Linalg vectorizer disallows non-trailing parallel
dimensions to be scalable, e.g., `vector_sizes [[8], 1]` (*), for cases
like:
```mlir
%0 = linalg.fill ins(%arg0 : f32) outs(%A : tensor<?x?xf32>) -> tensor<?x?xf32>
```
This restriction exists to avoid generating "scalable" arrays of
aggregates, which LLVM does not support (multi-dim vectors are lowered
into arrays of aggregates at the LLVM level).
This patch relaxes that restriction when the trailing parallel vector
dimension is `1`, e.g., for `vector_sizes [[8], 1]`. Such cases are safe
since trailing unit dimensions can be collapsed. This relaxation is
necessary to support scalable vectorization for tensor.pack, where inner
tile sizes are `[8]` (scalable) and `1` (scalar).
(*) Transform Dialect notation
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list