MLIR: lib/Dialect/Linalg/Transforms/Tiling.cpp File Reference (original) (raw)

Go to the source code of this file.

Namespaces
Macros
#define GEN_PASS_DEF_LINALGTILINGPASS
#define DEBUG_TYPE "linalg-tiling"
#define GET_OP_LIST
Functions
static void emitIsPositiveIndexAssertion (ImplicitLocOpBuilder &b, OpFoldResult value)
Asserts that the given index-typed value is strictly positive. More...
static bool canOmitTileOffsetInBoundsCheck (OpFoldResult tileSize, OpFoldResult numThreads, OpFoldResult iterationSize)
Returns true if the maximum tile offset tileSize * numThreads-1 is less than iterationSize. More...
static OpFoldResult buildMax (OpBuilder &b, Location loc, ArrayRef< OpFoldResult > vals)
Build an affine_max of all the vals. More...
static OpFoldResult buildMin (OpBuilder &b, Location loc, ArrayRef< OpFoldResult > vals)
Build an affine_min of all the vals. More...
static void calculateTileOffsetsAndSizes (RewriterBase &b, Location loc, scf::ForallOp forallOp, ArrayRef< OpFoldResult > numThreads, SmallVector< Range > loopRanges, bool omitTileOffsetBoundsCheck, std::optional< ArrayRef< OpFoldResult >> nominalTileSizes, SmallVector< OpFoldResult > &tiledOffsets, SmallVector< OpFoldResult > &tiledSizes)
Fill out the tiledOffsets and tiledSizes to be used to tile to a given number of threads. More...
template
static FailureOr< TiledLinalgOp > tileLinalgOpImpl (RewriterBase &b, LinalgOp op, ArrayRef< OpFoldResult > tileSizes, const LinalgTilingOptions &options)
template
static FailureOr< TiledLinalgOp > tileLinalgOpImpl (RewriterBase &b, LinalgOp op, const LinalgTilingOptions &options)

DEBUG_TYPE

#define DEBUG_TYPE "linalg-tiling"

GEN_PASS_DEF_LINALGTILINGPASS

#define GEN_PASS_DEF_LINALGTILINGPASS

GET_OP_LIST

buildMax()

buildMin()

calculateTileOffsetsAndSizes()

canOmitTileOffsetInBoundsCheck()

emitIsPositiveIndexAssertion()

tileLinalgOpImpl() [1/2]

template

Definition at line 439 of file Tiling.cpp.

References mlir::applyPermutationToVector(), mlir::clone(), mlir::OpBuilder::clone(), doit(), mlir::detail::enumerate(), mlir::getAsOpFoldResult(), mlir::getConstantIntValue(), mlir::Builder::getContext(), mlir::AffineMap::getMultiDimIdentityMap(), mlir::AffineMap::getPermutationMap(), mlir::Operation::getResults(), mlir::linalg::getTensorOutputTypes(), mlir::linalg::insertSlicesBack(), mlir::inversePermutation(), mlir::linalg::isParallelIterator(), mlir::affine::makeComposedFoldedMultiResultAffineApply(), mlir::linalg::makeTiledLoopRanges(), mlir::linalg::makeTiledShapes(), mlir::linalg::TiledLinalgOp::op, options, mlir::linalg::TiledLinalgOp::tensorResults, and mlir::linalg::transformIndexOps().

tileLinalgOpImpl() [2/2]

template