[all-commits] [llvm/llvm-project] 31270e: [mlir][Vector] Let vector.multi_reduction reduce d...
Nicolas Vasilache via All-commits
all-commits at lists.llvm.org
Tue Oct 12 04:04:07 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 31270eb16501cca73fb3fbac254fe9965a3f3fc1
https://github.com/llvm/llvm-project/commit/31270eb16501cca73fb3fbac254fe9965a3f3fc1
Author: Nicolas Vasilache <nicolas.vasilache at gmail.com>
Date: 2021-10-12 (Tue, 12 Oct 2021)
Changed paths:
M mlir/include/mlir/Dialect/Vector/VectorOps.h
M mlir/include/mlir/Dialect/Vector/VectorOps.td
M mlir/lib/Dialect/Vector/CMakeLists.txt
A mlir/lib/Dialect/Vector/VectorMultiDimReductionTransforms.cpp
M mlir/lib/Dialect/Vector/VectorOps.cpp
M mlir/lib/Dialect/Vector/VectorTransforms.cpp
M mlir/test/Dialect/Vector/canonicalize.mlir
M mlir/test/Dialect/Vector/ops.mlir
M mlir/test/Dialect/Vector/vector-multi-reduction-lowering.mlir
Log Message:
-----------
[mlir][Vector] Let vector.multi_reduction reduce down to a scalar.
vector.multi_reduction currently does not allow reducing down to a scalar.
This creates corner cases that are hard to handle during vectorization.
This revision extends the semantics and adds the proper transforms, lowerings and canonicalizations to allow lowering out of vector.multi_reduction to other abstractions all the way to LLVM.
In a future, where we will also allow 0-d vectors, scalars will still be relevant: 0-d vector and scalars are not equivalent on all hardware.
In the process, splice out the implementation patterns related to vector.multi_reduce into a new file.
Reviewed By: pifon2a
Differential Revision: https://reviews.llvm.org/D111442
More information about the All-commits
mailing list