[PATCH] D76897: [mlir][Linalg] Extend fusion to support WAW atm on buffers.
Nicolas Vasilache via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 30 15:51:46 PDT 2020
nicolasvasilache accepted this revision.
nicolasvasilache added inline comments.
================
Comment at: mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOpsInterface.td:105
+ "Return the input or output buffer at the given index.",
+ "Value", "getInputsAndOutputsBuffer", (ins "unsigned":$i)
+ >,
----------------
mravishankar wrote:
> Nit : rename to getInputAndOutputBuffers
This should be either `getInputOrOutputBuffer` or just `getBuffer`.
It returns one single buffer at position `$i`.
================
Comment at: mlir/test/Dialect/Linalg/fusion.mlir:336
// CHECK: (%[[A:.*]]:{{.*}}, %[[B:.*]]:{{.*}}, %[[C:.*]]:{{.*}}, %[[D:.*]]:{{.*}}, %[[E:.*]]:{{.*}})
-// Cannot fuse C due to interleaved read of C that would be bypassed.
-// Cannot fuse E (WAW).
-// CHECK: linalg.matmul
-// CHECK: linalg.matmul
+// Fuse B and C, then fuse with A.
// CHECK: loop.for
----------------
This comment does not make sense to me.
The original comment used `C` and `E` as a shortcut for `the producer of C` and `the producer of E`.
How about:
`fuse the producer of E (WAW) then the producer of C (WAR)` ?
Also the resulting fusion is most likely a bug.
It's not your fault and independent from this CL.
I'll fix in a followup.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76897/new/
https://reviews.llvm.org/D76897
More information about the llvm-commits
mailing list