[mlir][Linalg] Deprecate `tileAndFuseLinalgOps` method and associated patterns.The `tileAndFuseLinalgOps` is a legacy approach for tiling + fusion ofLinalg operations. Since it was also intended t
[mlir][Linalg] Deprecate `tileAndFuseLinalgOps` method and associated patterns.The `tileAndFuseLinalgOps` is a legacy approach for tiling + fusion ofLinalg operations. Since it was also intended to work on operationswith buffer operands, this method had fairly complex logic to makesure tile and fuse was correct even with side-effecting linalg ops.While complex, it still wasnt robust enough. This patch deprecatesthis method and thereby deprecating the tiling + fusion method for opswith buffer semantics. Note that the core transformation to do fusionof a producer with a tiled consumer still exists. The deprecation hereonly removes methods that auto-magically tried to tile and fusecorrectly in presence of side-effects.The `tileAndFuseLinalgOps` also works with operations with tensorsemantics. There are at least two other ways the same functionalityexists.1) The `tileConsumerAndFuseProducers` method. This does a similar transformation, but using a slightly different logic to automatically figure out the legal tile + fuse code. Note that this is also to be deprecated soon.2) The prefered way uses the `TilingInterface` for tile + fuse, and relies on the caller to set the tiling options correctly to ensure that the generated code is correct.As proof that (2) is equivalent to the functionality provided by`tileAndFuseLinalgOps`, relevant tests have been moved to use theinterface, where the test driver sets the tile sizes appropriately togenerate the expected code.Differential Revision: https://reviews.llvm.org/D129901
show more ...
[mlir][TilingInterface] Add support for interchange to tiling patterns that use the `TilingInterface`.Differential Revision: https://reviews.llvm.org/D129956
[mlir] Handle linalg.index correctly in TilingInterfaceThe existing implementation of the TilingInterface for Linalg ops was notmodifying the `linalg.index` ops contained within other Linalg ops (
[mlir] Handle linalg.index correctly in TilingInterfaceThe existing implementation of the TilingInterface for Linalg ops was notmodifying the `linalg.index` ops contained within other Linalg ops (they needto be summed up with the values of respective tile loop induction variables),which led to the interface-based tiling being incorrect for any Linalg op withindex semantics.In the process, fix the function performing the index offsetting to use thepattern rewriter API instead of RAUW as it is being called from patterns andmay mess up the internal state of the rewriter. Also rename the function toclearly catch all uses.Depends On D129365Reviewed By: mravishankarDifferential Revision: https://reviews.llvm.org/D129366
[mlir][TilingInterface] Enable tile and fuse using TilingInterface.This patch implements tile and fuse transformation for ops thatimplement the tiling interface. To do so,- `TilingInterface` need
[mlir][TilingInterface] Enable tile and fuse using TilingInterface.This patch implements tile and fuse transformation for ops thatimplement the tiling interface. To do so,- `TilingInterface` needs a new method that generates a tiled implementation of the operation based on the tile of the result needed.- A pattern is added that replaces a `tensor.extract_slice` whose source is defined by an operation that implements the `TilingInterface` with a tiled implementation that produces the extracted slice in-place (using the method added to `TilingInterface`).- A pattern is added that takes a sequence of operations that implement the `TilingInterface` (for now `LinalgOp`s), tiles the consumer, and greedily fuses its producers iteratively.Differential Revision: https://reviews.llvm.org/D127809
Revert "[mlir][TilingInterface] Enable tile and fuse using TilingInterface."This reverts commit ea75511319d9dff8c38c8794c3949c40b63a38d7 due to build failures.
[mlir] move SCF headers to SCF/{IR,Transforms} respectivelyThis aligns the SCF dialect file layout with the majority of the dialects.Reviewed By: jpienaarDifferential Revision: https://reviews.
[mlir] move SCF headers to SCF/{IR,Transforms} respectivelyThis aligns the SCF dialect file layout with the majority of the dialects.Reviewed By: jpienaarDifferential Revision: https://reviews.llvm.org/D128049
[mlir] Fix CMake file
[mlir][TilingInterface] Add pattern to tile using TilingInterface and implement TilingInterface for Linalg ops.This patch adds support for tiling operations that implement theTilingInterface.- It
[mlir][TilingInterface] Add pattern to tile using TilingInterface and implement TilingInterface for Linalg ops.This patch adds support for tiling operations that implement theTilingInterface.- It separates the loop constructs that are used to iterate over tile from the implementation of the tiling itself. For example, the use of destructive updates is more related to use of scf.for for iterating over tiles that are tensors.- To test the transformation, TilingInterface is implemented for LinalgOps. The separation of the looping constructs used from the implementation of tile code generation greatly simplifies the latter.- The implementation of TilingInterface for LinalgOp is kept as an external model for now till this approach can be fully flushed out to replace the existing tiling + fusion approaches in Linalg.Differential Revision: https://reviews.llvm.org/D127133