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

Andrzej WarzyƄski llvmlistbot at llvm.org
Tue Mar 3 12:16:05 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.
----------------
banach-space wrote:

There's a pattern above that uses `2D` rather than `2-D`:

```cpp
/// Lowers 2D vector.multi_reduction to a squence of Arith Ops
```

I don't mind which format we use, but we should be using one style consistently.

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


More information about the Mlir-commits mailing list