This is an archive of the discontinued LLVM Phabricator instance.

[mlir][linalg][transform] Add fuse_into_containing op
ClosedPublic

Authored by springerm on Jul 21 2022, 3:30 AM.

Details

Summary

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").

Diff Detail

Event Timeline

springerm created this revision.Jul 21 2022, 3:30 AM
springerm requested review of this revision.Jul 21 2022, 3:30 AM
nicolasvasilache accepted this revision.Jul 21 2022, 6:50 AM

Could you rebase on https://reviews.llvm.org/D130267 and cut down on verbose matchers ?
Thanks!

mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
228

Please add a TODO to generalize to more extract/insert/parallel_insert triples of ops.

247

Please add a TODO: Evolve into an Interface

260

Please rephrase to // Replace the extract op to be more genberic.

This revision is now accepted and ready to land.Jul 21 2022, 6:50 AM
springerm updated this revision to Diff 446752.Jul 22 2022, 2:34 AM
springerm marked 3 inline comments as done.

address comments

This revision was automatically updated to reflect the committed changes.