[Mlir-commits] [mlir] [mlir][scf] Extend consumer fuse to nested loop structure (PR #94190)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Jun 25 02:19:14 PDT 2024


Yun-Fly wrote:

Hi, @MaheshRavishankar @nicolasvasilache.

I have refactored the overall implementation as you advice using multiple application of existing transform. To solve the problem what I mentioned in above thread, some of previous code have to stay, say `getResultOfTopLevelLoopYieldInsertSliceOp` to collect a chain of candidate sliceOps.

> With current implementation, although it is possible to fuse add at outermost scf.forall(%1), it seems hard to recursively fuse it into next level loop scf.for(%3) without any tensor.insert_slice.

In this PR, the original `tileAndFuseConsumerOfSlice` was renamed to `tileAndFuseConsumerOfSliceImpl` to represent basic process for single scf loop(also enhanced to support perfectly outer loops with `scf.yield` terminator only), while `tileAndFuseConsumerOfSlice` now represents more powerful functionality to deal with complex nested loop structure.

This version maybe much friendly to you with less changes. This PR is quite important for further development. Please help to go on review. Thanks!

https://github.com/llvm/llvm-project/pull/94190


More information about the Mlir-commits mailing list