[mlir][linalg][transform] Add fuse_into_containing op
authorMatthias Springer <springerm@google.com>
Fri, 22 Jul 2022 11:26:34 +0000 (13:26 +0200)
committerMatthias Springer <springerm@google.com>
Fri, 22 Jul 2022 11:55:04 +0000 (13:55 +0200)
commitbc882ed21fc7ae4ad934bf432c2431fa27cad556
treecd218ab1e36a60e4af7d63630a679c2fe6a85ecc
parent934d60382673f0e70dea41406d1f900d3833e4b3
[mlir][linalg][transform] Add fuse_into_containing op

This op fuses a given payload op into a given container op. Inside the container, all uses of the producer are replaced (fused) with the newly inserted op. If the producer is tileable and accessed via a tensor.extract_slice, the new op computes only the requested slice ("tile and fuse"). Otherwise, the entire tensor value is computed inside the container ("clone and fuse").

Differential Revision: https://reviews.llvm.org/D130244
mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td
mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
mlir/test/Dialect/Linalg/transform-op-fuse-into-containing.mlir [new file with mode: 0644]