[Mlir-commits] [mlir] [MLIR][Vector] Add support for inner-parallel masked multi-reductions (PR #126722)

Manupa Karunaratne llvmlistbot at llvm.org
Wed Feb 12 02:51:40 PST 2025


================
@@ -310,9 +310,16 @@ struct TwoDimMultiReductionToElementWise
                                 PatternRewriter &rewriter) const override {
     auto maskableOp =
         cast<vector::MaskableOpInterface>(multiReductionOp.getOperation());
-    if (maskableOp.isMasked())
-      // TODO: Support masking.
-      return failure();
+
+    Operation *rootOp;
+    Value mask = nullptr;
+    if (maskableOp.isMasked()) {
+      rewriter.setInsertionPoint(maskableOp.getMaskingOp());
----------------
manupak wrote:

moved it a bit lower but I d like to obtain the mask inside the same conditional.. hence it cant be at where we start creating operations -- consistent with all other masked implementation in this file.

thanks for catching insertion guard. fixed now.

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


More information about the Mlir-commits mailing list