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

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Apr 17 21:50:30 PDT 2024


================
@@ -30,6 +30,24 @@ namespace tensor {
 FailureOr<TilingResult> replaceExtractSliceWithTiledProducer(
     OpBuilder &builder, tensor::ExtractSliceOp sliceOp, OpResult producerOp);
 
+/// Pattern to swap an `tensor.insert_slice` with its consumer when the
+/// consumer implements the `TilingInterface`. The pattern itself does not
+/// provide a mechanism to control where the application happens. With use of
+/// transform dialect that control is done within the transform dialect. Other
+/// use cases can inherit from this pattern and add necessary controls.
+FailureOr<TilingResult> replaceInsertSliceWithTiledConsumer(
+    OpBuilder &builder, tensor::InsertSliceOp sliceOp, OpOperand &consumerOp);
+
+/// Pattern to swap an `tensor.insert_slice` with its consumer when the
+/// consumer implements the `TilingInterface`. The pattern itself does not
+/// provide a mechanism to control where the application happens. With use of
+/// transform dialect that control is done within the transform dialect. Other
+/// use cases can inherit from this pattern and add necessary controls.
+FailureOr<TilingResult>
+replaceInsertSliceWithTiledConsumer(OpBuilder &builder,
----------------
MaheshRavishankar wrote:

Just a thought, no AI here : We probably want to think of a unified way of handling both of these, but not sure yet how.

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


More information about the Mlir-commits mailing list