[all-commits] [llvm/llvm-project] ecca78: [mlir][Linalg] Side effects interface for Linalg ops
Nicolas Vasilache via All-commits
all-commits at lists.llvm.org
Thu Nov 5 01:04:04 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: ecca7852d9d75aba859a3d8d001bfb2dda1345db
https://github.com/llvm/llvm-project/commit/ecca7852d9d75aba859a3d8d001bfb2dda1345db
Author: Nicolas Vasilache <nicolas.vasilache at gmail.com>
Date: 2020-11-05 (Thu, 05 Nov 2020)
Changed paths:
M mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td
M mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
M mlir/test/Dialect/Linalg/canonicalize.mlir
M mlir/test/Dialect/Linalg/fusion-tensor.mlir
M mlir/test/Transforms/copy-removal.mlir
M mlir/test/mlir-linalg-ods-gen/test-linalg-ods-gen.tc
M mlir/tools/mlir-linalg-ods-gen/mlir-linalg-ods-gen.cpp
Log Message:
-----------
[mlir][Linalg] Side effects interface for Linalg ops
The LinalgDependenceGraph and alias analysis provide the necessary analysis for the Linalg fusion on buffers case.
However this is not enough for linalg on tensors which require proper memory effects to play nicely with DCE and other transformations.
This revision adds side effects to Linalg ops that were previously missing and has 2 consequences:
1. one example in the copy removal pass now fails since the linalg.generic op has side effects and the pass does not perform alias analysis / distinguish between reads and writes.
2. a few examples in fusion-tensor.mlir need to return the resulting tensor otherwise DCE automatically kicks in as part of greedy pattern application.
Differential Revision: https://reviews.llvm.org/D90762
More information about the All-commits
mailing list