[Mlir-commits] [mlir] [mlir][Linalg] Refine how broadcast dims are treated (PR #99015)

Diego Caballero llvmlistbot at llvm.org
Wed Sep 25 16:56:00 PDT 2024


================
@@ -1317,16 +1330,6 @@ vectorizeAsLinalgGeneric(RewriterBase &rewriter, VectorizationState &state,
     // permutation map and masking map.
     AffineMap indexingMap = linalgOp.getMatchingIndexingMap(opOperand);
 
-    // Remove zeros from indexing map to use it as masking map.
-    SmallVector<int64_t> zeroPos;
-    auto results = indexingMap.getResults();
-    for (const auto &result : llvm::enumerate(results)) {
-      if (isa<AffineConstantExpr>(result.value())) {
-        zeroPos.push_back(result.index());
-      }
-    }
-    AffineMap maskingMap = indexingMap.dropResults(zeroPos);
-
----------------
dcaballe wrote:

Oh, ok, we are just moving this into `maskOperation` because we have other entry points where this was not executed... Got it.

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


More information about the Mlir-commits mailing list