[Mlir-commits] [mlir] [mlir][vector] Add finer grained populate methods for multi_reduction (NFC). (PR #180750)
Erick Ochoa Lopez
llvmlistbot at llvm.org
Wed Feb 11 10:03:21 PST 2026
================
@@ -84,12 +99,21 @@ void populateVectorOuterProductLoweringPatterns(RewritePatternSet &patterns,
/// dimension, unroll the outer dimension to obtain a sequence of extract +
/// vector.reduction + insert. This can further lower to horizontal reduction
/// ops.
-///
-/// [OneDimMultiReductionToTwoDim]
-/// For cases that reduce to 1-D vector<k> reduction (and are thus missing
-/// either a parallel or a reduction), we lift them back up to 2-D with a simple
-/// vector.shape_cast to vector<1xk> so that the other patterns can kick in,
-/// thus fully exiting out of the vector.multi_reduction abstraction.
+void populateVectorMultiReductionUnrollingPatterns(
+ RewritePatternSet &patterns, VectorMultiReductionLowering options,
+ PatternBenefit benefit = 1);
+
+/// Collect a set of patterns to convert vector.multi_reduction op into
+/// a sequence of vector.reduction ops. These patterns are the ones
+/// populated by:
+///
+/// * populateVectorMultiReductionTransformationPatterns
+/// * populateVectorMultiReductionFlatteningPatterns
+/// * populateVectorMultiReductionUnrollingPatterns
+LLVM_DEPRECATED(
+ "Use populateVectorMultiReduction{Transformation,Flattening,Unrolling} "
+ "instead.",
+ "populateVectorMultiReductionLoweringPatterns")
----------------
amd-eochoalo wrote:
@banach-space, I started a refactoring for the tests here https://github.com/llvm/llvm-project/pull/180977 . This will facilitate further changes when generalizing the patterns.
https://github.com/llvm/llvm-project/pull/180750
More information about the Mlir-commits
mailing list