[Mlir-commits] [mlir] Refactor LoopFuseSiblingOp and support parallel fusion (PR #94391)

Ivan Butygin llvmlistbot at llvm.org
Tue Jun 4 17:20:27 PDT 2024


Hardcode84 wrote:

I'm concerned about difference of semantics for `fuse_sibling` transform, which do only the structural checks for the `scf.for` and `scf.forall` but will try to do an aliasing checks for `scf.parallel`. We probably should split `fuseIfLegal` func into 3:
* `checkFusionStructuralLegality` - doing only the structural checks (interation domain and dominace), used both in transform  and in `naivelyFuseParallelOps`
* `fuseParallel` - fuses 2 `scf.parallel`, also used both in transform  and in `naivelyFuseParallelOps`
* `checkParallelAliasing` - nested parallel, `haveNoReadsAfterWriteExceptSameIndex` and aliasing checks, used only in `naivelyFuseParallelOps` - also you can keep this func in `ParallelLoopFusion.cpp` and avoid introducing memref dependency to utils.

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


More information about the Mlir-commits mailing list