MLIR 22.0.0git
TilingInterfaceImpl.cpp File Reference

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "linalg-tiling-interface-impl"
#define GET_OP_LIST

Functions

static SmallVector< ValuegetIndicesForAccess (OpBuilder &b, Location loc, AffineMap indexingMap, ValueRange ivs)
 Return the SSA values that represent the data point accessed using a given indexingMap for a given point in the iteration space represented by ivs.
static LogicalResult inlinePayload (OpBuilder &b, LinalgOp linalgOp, ValueRange ivs, ValueRange argValues)
 Method to inline the payload of a linalgOp given the iteration space point and values for the arguments of the payload.
template<typename OpType>
static void registerOne (MLIRContext *ctx)
template<typename... OpTypes>
static void registerAll (MLIRContext *ctx)
 Variadic helper function.

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "linalg-tiling-interface-impl"

Definition at line 29 of file TilingInterfaceImpl.cpp.

◆ GET_OP_LIST

#define GET_OP_LIST

Definition at line 1403 of file TilingInterfaceImpl.cpp.

Function Documentation

◆ getIndicesForAccess()

SmallVector< Value > getIndicesForAccess ( OpBuilder & b,
Location loc,
AffineMap indexingMap,
ValueRange ivs )
static

Return the SSA values that represent the data point accessed using a given indexingMap for a given point in the iteration space represented by ivs.

Definition at line 40 of file TilingInterfaceImpl.cpp.

References b, mlir::AffineMap::get(), mlir::AffineMap::getNumDims(), mlir::AffineMap::getNumResults(), mlir::AffineMap::getNumSymbols(), mlir::AffineMap::getResults(), indices, and result.

Referenced by inlinePayload().

◆ inlinePayload()

LogicalResult inlinePayload ( OpBuilder & b,
LinalgOp linalgOp,
ValueRange ivs,
ValueRange argValues )
static

Method to inline the payload of a linalgOp given the iteration space point and values for the arguments of the payload.

Definition at line 56 of file TilingInterfaceImpl.cpp.

References b, mlir::Block::getArguments(), getIndicesForAccess(), mlir::Operation::getLoc(), mlir::Operation::getOperands(), mlir::Block::getTerminator(), indices, mlir::IRMapping::lookupOrDefault(), mlir::IRMapping::map(), success(), and mlir::Block::without_terminator().

◆ registerAll()

template<typename... OpTypes>
void registerAll ( MLIRContext * ctx)
static

Variadic helper function.

Definition at line 1399 of file TilingInterfaceImpl.cpp.

References mlir::linalg::registerOne().

◆ registerOne()

template<typename OpType>
void registerOne ( MLIRContext * ctx)
static

Definition at line 1391 of file TilingInterfaceImpl.cpp.