summaryrefslogtreecommitdiff
path: root/mlir/lib/Dialect/SCF/Transforms/TileUsingInterface.cpp
AgeCommit message (Collapse)Author
2022-09-01[mlir][interfaces] Drop `dest`/`tileDestOperands` from TilingInterfaceMatthias Springer
`getTiledImplementation`/`generateResultTileValue` only computes the tiled operation, but does not insert the result into any tensor. Differential Revision: https://reviews.llvm.org/D133015
2022-08-04[MLIR] TilingInterface: Avoid map when tile divides iteration domainlorenzo chelini
Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D131080
2022-07-28[mlir][TilingInterface] Add a method to generate scalar implementation of ↵Mahesh Ravishankar
the op. While The tiling interface provides a mechanism for operations to be tiled into tiled version of the op (or another op at the same level of abstraction), the `generateScalarImplementation` method added here is the "exit point" after all transformations have been done. Ops that implement this method are expected to generate IR that are directly lowerable to backend dialects like LLVM or SPIR-V dialects. Differential Revision: https://reviews.llvm.org/D130612
2022-07-27[mlir] Make ViewLikeInterface Range work with attributesAlex Zinenko
While most of methods in ViewLikeInterface accept an `OpFoldResult` for the offset/size/stride that may be static, represented as `Attribute`, or dynamic, represented as `Value`, the `Range` abstraction only accepted `Values`. This can often lead to known-constant offset/size/strides being materialized into constant operations and hinder further constant propagation without explicitly running the constant folding pass. This often leads to a more complicated than necessary addressing code being emitted. Switch `Range` to use `OpFoldResult`. Code that uses `Range` currently keeps materializing the constants to minimize the effect of this change on the IR. Further commits will make use of this. Reviewed By: nicolasvasilache, mravishankar Differential Revision: https://reviews.llvm.org/D129633
2022-07-21[MLIR][SCF] Enable better bufferization for ↵lorenzo chelini
`TileConsumerAndFuseProducersUsingSCFForOp` Replace iterators of the outermost loop with region arguments of the innermost one. The changes avoid later `bufferization` passes to insert allocation within the body of the innermost loop. Reviewed By: mravishankar Differential Revision: https://reviews.llvm.org/D130083
2022-07-21Revert "[RFC][MLIR][SCF] Enable better bufferization for ↵lorenzo chelini
`TileConsumerAndFuseProducersUsingSCFForOp`" This reverts commit 9e6585030533e901a8c24dcb05b38d3f0d10331f.
2022-07-21[RFC][MLIR][SCF] Enable better bufferization for ↵lorenzo chelini
`TileConsumerAndFuseProducersUsingSCFForOp` Replace iterators of the outermost loop with region arguments of the innermost one. The changes avoid later `bufferization` passes to insert allocation within the body of the innermost loop. Reviewed By: mravishankar Differential Revision: https://reviews.llvm.org/D130083
2022-07-20[mlir][TilingInterface] Add support for interchange to tiling patterns that ↵Mahesh Ravishankar
use the `TilingInterface`. Differential Revision: https://reviews.llvm.org/D129956
2022-07-14[mlir] Use value instead of getValue (NFC)Kazu Hirata
2022-06-28[mlir] Update flipped accessors (NFC)Jacques Pienaar
Follow up with memref flipped and flipping any intermediate changes made.
2022-06-27[mlir] Fix ClangTidyPerformance finding (NFC)Adrian Kuegel
2022-06-25Revert "Don't use Optional::hasValue (NFC)"Kazu Hirata
This reverts commit aa8feeefd3ac6c78ee8f67bf033976fc7d68bc6d.
2022-06-25Don't use Optional::hasValue (NFC)Kazu Hirata
2022-06-21[mlir][TilingInterface] Enable tile and fuse using TilingInterface.Mahesh Ravishankar
This patch implements tile and fuse transformation for ops that implement 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
2022-06-21Revert "[mlir][TilingInterface] Enable tile and fuse using TilingInterface."Mahesh Ravishankar
This reverts commit ea75511319d9dff8c38c8794c3949c40b63a38d7 due to build failures.
2022-06-21[mlir][TilingInterface] Enable tile and fuse using TilingInterface.Mahesh Ravishankar
This patch implements tile and fuse transformation for ops that implement 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
2022-06-20[mlir] move SCF headers to SCF/{IR,Transforms} respectivelyAlex Zinenko
This aligns the SCF dialect file layout with the majority of the dialects. Reviewed By: jpienaar Differential Revision: https://reviews.llvm.org/D128049
2022-06-13[mlir][TilingInterface] Add pattern to tile using TilingInterface and ↵Mahesh Ravishankar
implement TilingInterface for Linalg ops. This patch adds support for tiling operations that implement the TilingInterface. - 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