[Mlir-commits] [mlir] [NFC] Simplify the tiling implementation using cloning. (PR #72178)

Nicolas Vasilache llvmlistbot at llvm.org
Wed Nov 15 04:34:09 PST 2023


================
@@ -708,28 +781,46 @@ void mlir::scf::yieldReplacementForFusedProducer(
     RewriterBase &rewriter, tensor::ExtractSliceOp sliceOp,
     scf::SCFFuseProducerOfSliceResult fusedProducerInfo,
     MutableArrayRef<scf::ForOp> loops) {
-  auto [fusableProducer, fusedProducerValue, tileAndFusedOps] =
-      fusedProducerInfo;
-  SmallVector<Value> initValues;
+  if (loops.empty()) {
----------------
nicolasvasilache wrote:

None of this code is actually used in MLIR besides a test.

Is there a plan to use this in some other implementation (e.g. fusion in LinalgTransformOps) or are we in another occurrence of multiple implementations?

In fact, I see in `TestTilingInterface::TestTileConsumerFuseAndYieldProducerUsingSCFForOp` that:
```
    // The rest of this method is similar to
    // scf::tileConsumerAndFuseProducerGreedilyUsingSCFForOp, except that also
    // yields replacements for values of the fused producer.
```

Why do we need this / should we replace `tileConsumerAndFuseProducerGreedilyUsingSCFForOp` by this (it seems to have more use cases) ?

Skipping the review of this commit until we get clarification on the intended direction.

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


More information about the Mlir-commits mailing list