MLIR 23.0.0git
TileUsingInterface.h File Reference

Go to the source code of this file.

Classes

struct  mlir::SCFTileAndFuseOptions
 Options used to control tile + fuse. More...
struct  mlir::SCFTileAndFuseOptions::ControlFnResult
 Control function to check if a slice needs to be fused or not, The control function receives 1) the slice along which fusion is to be done, 2) the producer value that is to be fused 3) a boolean value set to true if the fusion is from a destination operand. More...
struct  mlir::SCFFuseProducerOfSliceResult
 Result of fusing the producer of the source of a tensor.extract_slice. More...
struct  mlir::SCFTileAndFuseResult
 Transformation information returned after tile and fuse. More...
struct  mlir::SCFFuseConsumerOfSliceResult
 Fuse the consumer candidateSlices by computing the required slice of the consumer in-place. More...

Namespaces

namespace  mlir
 Include the generated interface declarations.
namespace  mlir::scf

Typedefs

using mlir::scf::SCFTileSizeComputationFunction

Functions

FailureOr< SCFTilingResult > mlir::tileUsingSCF (RewriterBase &rewriter, TilingInterface op, const SCFTilingOptions &options)
 Method to tile an op that implements the TilingInterface using scf.for for iterating over the tiles.
std::optional< SCFFuseProducerOfSliceResultmlir::tileAndFuseProducerOfSlice (RewriterBase &rewriter, tensor::ExtractSliceOp candidateSliceOp, MutableArrayRef< LoopLikeOpInterface > loops, const InnerTileAlignmentFnTy &fn=nullptr)
 Fuse the producer of the source of candidateSliceOp by computing the required slice of the producer in-place.
FailureOr< SmallVector< Operation * > > mlir::yieldReplacementForFusedProducer (RewriterBase &rewriter, tensor::ExtractSliceOp sliceOp, scf::SCFFuseProducerOfSliceResult fusedProducerInfo, MutableArrayRef< LoopLikeOpInterface > loops, ArrayRef< unsigned > yieldResultNumber=ArrayRef< unsigned >{})
 Reconstruct the fused producer from within the tiled-and-fused code.
FailureOr< SCFTileAndFuseResultmlir::tileConsumerAndFuseProducersUsingSCF (RewriterBase &rewriter, TilingInterface consumer, const SCFTileAndFuseOptions &options)
 Method to tile and fuse a sequence of operations, by tiling the consumer and fusing its producers.
FailureOr< scf::SCFFuseConsumerOfSliceResult > mlir::tileAndFuseConsumerOfSlices (RewriterBase &rewriter, ArrayRef< Operation * > candidateSlices, MutableArrayRef< LoopLikeOpInterface > loops, const InnerTileAlignmentFnTy &fn=nullptr)
 When the consumer is a linalg.pack/linalg.unpack, fn (if non-null) is invoked with the consumer and candidateSlices to obtain the inner-tile alignment hint in the consumer's own iteration domain.
FailureOr< scf::SCFFuseConsumerOfSliceResult > mlir::tileAndFuseConsumer (RewriterBase &rewriter, Operation *consumer, MutableArrayRef< LoopLikeOpInterface > loops, const InnerTileAlignmentFnTy &fn=nullptr)
 Fuse the consumer operation into the loop nest provided by loops.
FailureOr< SmallVector< scf::ForOp > > mlir::lowerToLoopsUsingSCFForOp (RewriterBase &rewriter, TilingInterface op)
 Method to lower an op that implements the TilingInterface to loops/scalars.
FailureOr< scf::SCFTilingResult > mlir::tileReductionUsingScf (RewriterBase &b, PartialReductionOpInterface op, ArrayRef< OpFoldResult > tileSizes)
 Method to tile a reduction and generate a parallel op within a serial loop.

Variables

SmallVector< Operation * > mlir::scf::mergeOps
 Computation function returning, for the op currently being tiled or fused, the per-iteration-domain-dimension InnerTileAlignment array.