[all-commits] [llvm/llvm-project] 7a52f7: [mlir][transform] Add support for expressing scala...
Andrzej WarzyĆski via All-commits
all-commits at lists.llvm.org
Thu Jun 8 12:54:56 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7a52f79126a59717012d8039ef875f68e3c637fd
https://github.com/llvm/llvm-project/commit/7a52f79126a59717012d8039ef875f68e3c637fd
Author: Andrzej Warzynski <andrzej.warzynski at arm.com>
Date: 2023-06-08 (Thu, 08 Jun 2023)
Changed paths:
M mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td
M mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
M mlir/include/mlir/Interfaces/ViewLikeInterface.h
M mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
M mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
M mlir/lib/Dialect/SCF/IR/SCF.cpp
M mlir/lib/Interfaces/ViewLikeInterface.cpp
M mlir/test/Dialect/Linalg/transform-op-tile.mlir
M mlir/test/Dialect/Linalg/vectorization-masked.mlir
Log Message:
-----------
[mlir][transform] Add support for expressing scalable vector sizes
This patch enables specifying scalable vector sizes when using the
Transform dialect to drive vectorisation, e.g.:
```
transform.structured.masked_vectorize %0 vector_sizes [8, 16, [4]]
```
This is implemented by extending the MaskedVectorizeOp with a dedicated
attribute for "scalability" and by overloading `parseDynamicIndexList`
so that MaskedVectorizeOp can continue using the auto-generated parser
and printer.
At the moment, only the trailing vec size can be scalable. The following
is not yet supported:
```
transform.structured.masked_vectorize %0 vector_sizes [8, [16], [4]]
```
As the vectoriser does not support scalable vectorisation just yet, a
warning is issues when scalable vector sizes are used. You can also use
the debug output, `--debug-only=linalg-vectorization`, to check whether
scalable vectorisation has been switched on.
This change is a part of a larger effort to enable scalable
vectorisation in Linalg. See this RFC for more context:
* https://discourse.llvm.org/t/rfc-scalable-vectorisation-in-linalg/
Similar patch for tiling: https://reviews.llvm.org/D150944
Differential Revision: https://reviews.llvm.org/D151892
More information about the All-commits
mailing list