[PATCH] D74421: [mlir] Linalg fusion: ignore indexed_generic producers

Alex Zinenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 11 09:54:55 PST 2020


ftynse created this revision.
ftynse added a reviewer: nicolasvasilache.
Herald added subscribers: llvm-commits, Joonsoo, liufengdb, lucyrfox, mgester, arpith-jacob, antiagainst, shauheen, burmako, jpienaar, rriddle, mehdi_amini, arphaman.
Herald added a project: LLVM.
nicolasvasilache accepted this revision.
This revision is now accepted and ready to land.

They are currently not supported and we should not attempt fusing them.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D74421

Files:
  mlir/lib/Dialect/Linalg/Transforms/Fusion.cpp


Index: mlir/lib/Dialect/Linalg/Transforms/Fusion.cpp
===================================================================
--- mlir/lib/Dialect/Linalg/Transforms/Fusion.cpp
+++ mlir/lib/Dialect/Linalg/Transforms/Fusion.cpp
@@ -278,6 +278,10 @@
     LLVM_DEBUG(dbgs() << "\n***Consider producer:\t"
                       << *dependence.dependentOpView.op << "\n");
     auto producer = cast<LinalgOp>(dependence.dependentOpView.op);
+    if (isa<linalg::IndexedGenericOp>(dependence.dependentOpView.op)) {
+      LLVM_DEBUG(dbgs() << "Not fusing indexed_generic producer");
+      continue;
+    }
 
     // Check that the dependence is indeed on the input `consumerIdx` view.
     auto consumedView = dependence.indexingView;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74421.243906.patch
Type: text/x-patch
Size: 725 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200211/c7e9d267/attachment.bin>


More information about the llvm-commits mailing list