[all-commits] [llvm/llvm-project] 79c83e: [mlir][VectorType] Allow arbitrary dimensions to b...
Andrzej WarzyĆski via All-commits
all-commits at lists.llvm.org
Tue Jun 27 11:27:17 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 79c83e12c8884fa46f2f2594836af93474f6ca5a
https://github.com/llvm/llvm-project/commit/79c83e12c8884fa46f2f2594836af93474f6ca5a
Author: Andrzej Warzynski <andrzej.warzynski at arm.com>
Date: 2023-06-27 (Tue, 27 Jun 2023)
Changed paths:
M mlir/include/mlir/Bytecode/BytecodeImplementation.h
M mlir/include/mlir/IR/BuiltinDialectBytecode.td
M mlir/include/mlir/IR/BuiltinTypes.h
M mlir/include/mlir/IR/BuiltinTypes.td
M mlir/include/mlir/IR/BytecodeBase.td
M mlir/lib/AsmParser/Parser.h
M mlir/lib/AsmParser/TypeParser.cpp
M mlir/lib/Bytecode/Reader/BytecodeReader.cpp
M mlir/lib/Bytecode/Writer/BytecodeWriter.cpp
M mlir/lib/Bytecode/Writer/IRNumbering.cpp
M mlir/lib/Conversion/LLVMCommon/TypeConverter.cpp
M mlir/lib/Dialect/Arith/IR/ArithOps.cpp
M mlir/lib/Dialect/ArmSVE/IR/ArmSVEDialect.cpp
M mlir/lib/Dialect/LLVMIR/IR/LLVMTypes.cpp
M mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
M mlir/lib/Dialect/SparseTensor/Transforms/SparseVectorization.cpp
M mlir/lib/Dialect/Vector/IR/VectorOps.cpp
M mlir/lib/IR/AsmPrinter.cpp
M mlir/lib/IR/BuiltinTypes.cpp
M mlir/test/Dialect/Builtin/invalid.mlir
M mlir/test/Dialect/Builtin/ops.mlir
M mlir/test/Dialect/Vector/vector-scalable-outerproduct.mlir
Log Message:
-----------
[mlir][VectorType] Allow arbitrary dimensions to be scalable
At the moment, only the trailing dimensions in the vector type can be
scalable, i.e. this is supported:
vector<2x[4]xf32>
and this is not allowed:
vector<[2]x4xf32>
This patch extends the vector type so that arbitrary dimensions can be
scalable. To this end, an array of bool values is added to every vector
type to denote whether the corresponding dimensions are scalable or not.
For example, for this vector:
vector<[2]x[3]x4xf32>
the following array would be created:
{true, true, false}.
Additionally, the current syntax:
vector<[2x3]x4xf32>
is replaced with:
vector<[2]x[3]x4xf32>
This is primarily to simplify parsing (this way, the parser can easily
process one dimension at a time rather than e.g. tracking whether
"scalable block" has been entered/left).
NOTE: The `isScalableDim` parameter of `VectorType` (introduced in this
patch) makes `numScalableDims` redundant. For the time being,
`numScalableDims` is preserved to facilitate the transition between the
two parameters. `numScalableDims` will be removed in one of the
subsequent patches.
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/
Differential Revision: https://reviews.llvm.org/D153372
More information about the All-commits
mailing list