[mlir][Linalg] NFC: Refactor fusion on tensors to enable extending
authorMaheshRavishankar <ravishankarm@google.com>
Thu, 23 Apr 2020 20:40:55 +0000 (13:40 -0700)
committerMaheshRavishankar <ravishankarm@google.com>
Thu, 23 Apr 2020 20:41:47 +0000 (13:41 -0700)
commitd27ab5c2409b0223ffb6b7ebcb75cd1bde4ac231
treea1b518de38b6659af84bd20f9f65b345343e0769
parent0d9144a21eabeef0795046ca07a6c8df17ebe7b0
[mlir][Linalg] NFC: Refactor fusion on tensors to enable extending
it to fusing different kinds of linalg operations on tensors.

The implementation of fusion on tensor was initially planned for just
GenericOps (and maybe IndexedGenericOps). With addition of
linalg.tensor_reshape, and potentially other such non-structured ops,
refactor the existing implementation to allow easier specification of
fusion between different linalg operations on tensors.

Differential Revision: https://reviews.llvm.org/D78463
mlir/include/mlir/Dialect/Linalg/Utils/Utils.h
mlir/lib/Dialect/Linalg/Transforms/Fusion.cpp