[Mlir-commits] [mlir] [MLIR][Linalg] Introduce broadcast/transpose semantic to 'linalg.batc… (PR #122275)

Md Asghar Ahmad Shahid llvmlistbot at llvm.org
Wed Jan 15 07:47:17 PST 2025


================
@@ -935,7 +944,8 @@ struct RankReduceContractionOps : OpRewritePattern<FromOpTy> {
         loc, collapsedResultTy, ValueRange{collapsedLhs, collapsedRhs},
         ValueRange{collapsedInit});
     for (auto attr : contractionOp->getAttrs()) {
-      if (attr.getName() == LinalgDialect::kMemoizedIndexingMapsAttrName)
+      if (attr.getName() == LinalgDialect::kMemoizedIndexingMapsAttrName ||
+          attr.getName() == "indexing_maps")
----------------
shahidact wrote:

Yes, it is still needed. This pass, in this case is taking `batch_matmul `and transforming into `matmul` but not updating (probably due to default batch_matmul which did not have indexing_map attribute) the `indexing_map` which correspond to `batch_matmul`.  Hence the transformed matmul IR has indexing map of batch_matmul. I will fix it such that we don't have to drop this attribute entirely.

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


More information about the Mlir-commits mailing list