Decouple tiling from fusion in Linalg.
authorNicolas Vasilache <ntv@google.com>
Thu, 26 Sep 2019 15:43:58 +0000 (08:43 -0700)
committerA. Unique TensorFlower <gardener@tensorflow.org>
Thu, 26 Sep 2019 15:44:31 +0000 (08:44 -0700)
commit445232df0b43cd8a6fdf34392626c61f819c94f2
treeb4ecceefac8c08a2aa3b5895b5c23d0485ed05e9
parent99be3351b874444498c03a87e2aeec6f2f8c208d
Decouple tiling from fusion in Linalg.

This CL modifies the linalg-fusion pass such that it does not tile anymore as part of the pass. Tiling is a separate concern that enables linalg fusion but should happen before.
This makes fusion more composable with other decisions.
In particular the fusion pass now becomes greedy and only applies the transformation on a best-effort basis.

This should also let fusion work in a multi-hop fashion with chains of producer/consumers.

Since the fusion pass does not perform tiling anymore, tests are rewritten to be in pretiled form and make the intent of the test clearer (albeit more verbose).

PiperOrigin-RevId: 271357741
mlir/include/mlir/Dialect/Linalg/Passes.h
mlir/lib/Dialect/Linalg/Analysis/DependenceAnalysis.cpp
mlir/lib/Dialect/Linalg/CMakeLists.txt
mlir/lib/Dialect/Linalg/Transforms/Fusion.cpp
mlir/test/Dialect/Linalg/fusion-2-level.mlir
mlir/test/Dialect/Linalg/fusion.mlir