[Mlir-commits] [mlir] [mlir][vector] Replace OneDimMultiReductionToTwoDim with OneDimMultiReductionToReduction (PR #184241)

Erick Ochoa Lopez llvmlistbot at llvm.org
Wed Mar 4 07:56:25 PST 2026


================
@@ -443,75 +443,44 @@ struct TwoDimMultiReductionToReduction
   }
 };
 
-/// Converts 1d vector.multi_reduction with a single reduction dimension to a 2d
-/// form with both a single parallel and reduction dimension.
-/// This is achieved with a simple vector.shape_cast that inserts a leading 1.
-/// The case with a single parallel dimension is a noop and folds away
-/// separately.
-struct OneDimMultiReductionToTwoDim
-    : public OpRewritePattern<vector::MultiDimReductionOp> {
-  using Base::Base;
+/// Converts 1-D vector.multi_reduction directly to vector.reduction.
----------------
amd-eochoalo wrote:

https://github.com/llvm/llvm-project/pull/184241/commits/c5894e452192fcca184f8dd13d3552a033d3d124 I think we will need to have another PR because the header files have 2-D. But for now following your suggestion above.

https://github.com/llvm/llvm-project/pull/184241


More information about the Mlir-commits mailing list