MLIR  21.0.0git
Macros | Functions
PadTilingInterface.cpp File Reference
#include "mlir/Dialect/Linalg/Transforms/Transforms.h"
#include "mlir/Dialect/Affine/IR/AffineOps.h"
#include "mlir/Dialect/Complex/IR/Complex.h"
#include "mlir/Dialect/Tensor/IR/Tensor.h"
#include "mlir/Dialect/Utils/StaticValueUtils.h"
#include "mlir/IR/AffineExpr.h"
#include "mlir/IR/BuiltinAttributes.h"
#include "mlir/IR/BuiltinTypeInterfaces.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/IR/OpDefinition.h"
#include "mlir/IR/Value.h"
#include "mlir/Interfaces/TilingInterface.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/Casting.h"

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "pad-tiling-interface"
 
#define DBGS()   (llvm::dbgs() << "[" DEBUG_TYPE << "]: ")
 
#define DBGSNL()   (llvm::dbgs() << "\n")
 

Functions

static SmallVector< OpFoldResultgetFullRankPaddingSizes (Builder &b, ArrayRef< OpFoldResult > indexingSizes, const PadTilingInterfaceOptions &options)
 Form a "full-rank" padding specification so that the application is easy. More...
 
static Value padOperand (RewriterBase &rewriter, TilingInterface opToPad, TypedValue< RankedTensorType > v, ArrayRef< OpFoldResult > paddedShape, Attribute paddingValueAttr)
 Pad a single operand to paddedShape using paddingValueAttr as padding Value. More...
 

Macro Definition Documentation

◆ DBGS

#define DBGS ( )    (llvm::dbgs() << "[" DEBUG_TYPE << "]: ")

Definition at line 31 of file PadTilingInterface.cpp.

◆ DBGSNL

#define DBGSNL ( )    (llvm::dbgs() << "\n")

Definition at line 32 of file PadTilingInterface.cpp.

◆ DEBUG_TYPE

#define DEBUG_TYPE   "pad-tiling-interface"

Definition at line 25 of file PadTilingInterface.cpp.

Function Documentation

◆ getFullRankPaddingSizes()

static SmallVector<OpFoldResult> getFullRankPaddingSizes ( Builder b,
ArrayRef< OpFoldResult indexingSizes,
const PadTilingInterfaceOptions options 
)
static

Form a "full-rank" padding specification so that the application is easy.

Definition at line 36 of file PadTilingInterface.cpp.

References DBGS, mlir::Builder::getIndexAttr(), mlir::isZeroInteger(), and options.

Referenced by mlir::linalg::computePaddedShape().

◆ padOperand()

static Value padOperand ( RewriterBase rewriter,
TilingInterface  opToPad,
TypedValue< RankedTensorType >  v,
ArrayRef< OpFoldResult paddedShape,
Attribute  paddingValueAttr 
)
static

Pad a single operand to paddedShape using paddingValueAttr as padding Value.

Definition at line 187 of file PadTilingInterface.cpp.

References mlir::OpBuilder::create(), DBGS, mlir::get(), mlir::getConstantIntValue(), mlir::getElementTypeOrSelf(), and mlir::linalg::makeComposedPadHighOp().

Referenced by mlir::linalg::rewriteAsPaddedOp().