[PATCH] D76897: [mlir][Linalg] Extend fusion to support WAW atm on buffers.
Mahesh Ravishankar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 30 11:57:10 PDT 2020
mravishankar accepted this revision.
mravishankar added a comment.
This revision is now accepted and ready to land.
Herald added a subscriber: grosul1.
LGTM. Please wait for @nicolasvasilache to accept.
================
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)
+ >,
----------------
Nit : rename to getInputAndOutputBuffers
================
Comment at: mlir/lib/Dialect/Linalg/Transforms/Fusion.cpp:335
+// Only consider RAW and WRW atm.
+Optional<FusionInfo> mlir::linalg::fuseProducerOf(
----------------
Is WRW a typo?
================
Comment at: mlir/lib/Dialect/Linalg/Transforms/Fusion.cpp:338
+ OpBuilder &b, LinalgOp consumer, unsigned consumerIdx,
+ const LinalgDependenceGraph &graph, OperationFolder *folder) {
+ SmallVector<LinalgDependenceGraph::DependenceType, 4> deps = {
----------------
You could consider changing `fuseProducerOp` to take an extra argument `ArrayRef<LinalgDependenceGraph::DependenceType> deps` to allow clients to control which deps to fuse. You could have a default of RAW and WAW dependences.
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