[all-commits] [llvm/llvm-project] 9d1925: [mlir][vector] Add vector.to_elements unrolling (#...
Erick Ochoa Lopez via All-commits
all-commits at lists.llvm.org
Thu Sep 11 10:57:18 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9d19250610fdaa80600d32fc7f6e06dcefd6bbff
https://github.com/llvm/llvm-project/commit/9d19250610fdaa80600d32fc7f6e06dcefd6bbff
Author: Erick Ochoa Lopez <erick.ochoalopez at amd.com>
Date: 2025-09-11 (Thu, 11 Sep 2025)
Changed paths:
M mlir/include/mlir/Dialect/Vector/TransformOps/VectorTransformOps.td
M mlir/include/mlir/Dialect/Vector/Transforms/LoweringPatterns.h
M mlir/include/mlir/Dialect/Vector/Utils/VectorUtils.h
M mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVMPass.cpp
M mlir/lib/Dialect/Vector/TransformOps/VectorTransformOps.cpp
M mlir/lib/Dialect/Vector/Transforms/CMakeLists.txt
A mlir/lib/Dialect/Vector/Transforms/LowerVectorToElements.cpp
M mlir/lib/Dialect/Vector/Utils/VectorUtils.cpp
M mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir
A mlir/test/Dialect/Vector/lit.local.cfg
A mlir/test/Dialect/Vector/td/unroll-elements.mlir
A mlir/test/Dialect/Vector/vector-to-elements-lowering.mlir
M mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp
M mlir/test/python/dialects/transform_vector_ext.py
Log Message:
-----------
[mlir][vector] Add vector.to_elements unrolling (#157142)
This PR adds support for unrolling `vector.to_element`'s source operand.
It transforms
```mlir
%0:8 = vector.to_elements %v : vector<2x2x2xf32>
```
to
```mlir
%v0 = vector.extract %v[0] : vector<2x2xf32> from vector<2x2x2xf32>
%v1 = vector.extract %v[1] : vector<2x2xf32> from vector<2x2x2xf32>
%0:4 = vector.to_elements %v0 : vector<2x2xf32>
%1:4 = vector.to_elements %v1 : vector<2x2xf32>
// %0:8 = %0:4 - %1:4
```
This pattern will be applied until there are only 1-D vectors left.
---------
Signed-off-by: hanhanW <hanhan0912 at gmail.com>
Co-authored-by: hanhanW <hanhan0912 at gmail.com>
Co-authored-by: Jakub Kuderski <kubakuderski at gmail.com>
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