[PATCH] D73165: [MLIR][Linalg] Allow fusion of more than 2 linalg ops.

Nicolas Vasilache via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 24 11:50:26 PST 2020


nicolasvasilache requested changes to this revision.
nicolasvasilache added a comment.
This revision now requires changes to proceed.

Please split out the NFC changes in a separate diff.



================
Comment at: mlir/lib/Dialect/Linalg/Transforms/Fusion.cpp:340
+      linalg::Aliases aliases;
+      linalg::LinalgDependenceGraph graph(aliases, linalgOps);
+      if (auto info = fuseProducerOf(b, op, id, graph, &folder)) {
----------------
Well that is a really dirty "fix" :)
It's true however that it is a problem with the current LinalgDependenceGraph impl that does not know how to update itself.
Still that problem already existed because the graph is recreated at each pattern invocation.

Let's let this fly for now but please adda big TODO that the graph needs to support mutation.


================
Comment at: mlir/test/Dialect/Linalg/fusion.mlir:27
+          memref<?x?xf32, offset: ?, strides: [?, ?]>
+        %7 = std.subview %B[%arg7, %arg6][%c4, %c3][%c1, %c1] :
+          memref<?x?xf32, offset: 0, strides: [?, 1]> to
----------------
please avoid mixing in NFC formatting changes in the flow and send a separate CL for that.
I cannot tell what changed without spending too much time on it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73165/new/

https://reviews.llvm.org/D73165





More information about the llvm-commits mailing list