[Mlir-commits] [mlir] [MLIR][SCF] Add an API to fuse consumer to a producer within scf loop (PR #88712)

Abhishek Varma llvmlistbot at llvm.org
Mon May 20 03:57:09 PDT 2024


================
@@ -131,6 +150,42 @@ def TilingInterface : OpInterface<"TilingInterface"> {
           return failure();
         }]
       >,
+      InterfaceMethod<
+        /*desc=*/[{
+          Method to generate the tiled implementation of an operation from
+          operand tile position.
----------------
Abhishek-Varma wrote:

> why do we need this method that, from its description, is a trivial composition of those two?

I tried following the other comment regarding the same which now makes this as a static method instead. Does that work? The idea is to have a unified API which [tensor::replaceInsertSliceWithTiledConsumer](https://github.com/llvm/llvm-project/blob/8bde51492235e1bfe81b527414c19743ec987a62/mlir/lib/Dialect/Tensor/Transforms/SwapExtractSliceWithProducerPatterns.cpp#L58) can use.

> what guarantees do we have that an op doesn't end up with diverging implementations of these methods?

I'm not sure if I understood the question (moreover the intent) of this question. Did you mean to say what happens if two given ops are implementing these methods in an orthogonal way? In that case I'm failing to see how that's an issue if the implementation achieves what the method is aimed for.

Pinging @cxy-1993 in case he has pointers to field/add on to this as its based on the reverted commit.

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


More information about the Mlir-commits mailing list