Unverified Commit 2b2ce50f authored by Abhishek Varma's avatar Abhishek Varma Committed by GitHub
Browse files

[MLIR][SCF] Add an API to fuse consumer to a producer within scf loop (#88712)



This commit adds an API (`tileAndFuseConsumerOfSlice`) to fuse consumer to a producer within
scf.for/scf.forall loop.

To support this two new methods are added to the `TilingInterface`
- `getIterationDomainTileFromOperandTile`
- `getTiledImplementationFromOperandTile`.

Consumer operations that implement this method can be used to be fused with tiled producer operands in a manner similar to (but essentially the inverse of) the fusion of an untiled producer with a tiled consumer.

Note that this only does one `tiled producer` -> `consumer` fusion. This could be called repeatedly for fusing multiple consumers. The current implementation also is conservative in when this kicks in (like single use of the value returned by the inter-tile loops that surround the tiled producer, etc.) These can be relaxed over time.

Signed-off-by: default avatarAbhishek Varma <abhvarma@amd.com>

---------

Signed-off-by: default avatarAbhishek Varma <abhvarma@amd.com>
Signed-off-by: default avatarAbhishek Varma <avarma094@gmail.com>
Co-authored-by: default avatarcxy <chenxunyu1993@gmail.com>
parent 9e22c7a0
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment