MLIR
22.0.0git
|
#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/UB/IR/UBOps.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< OpFoldResult > | getFullRankPaddingSizes (Builder &b, ArrayRef< OpFoldResult > indexingSizes, const PadTilingInterfaceOptions &options) |
Form a "full-rank" padding specification so that the application is easy. More... | |
static int64_t | extractConstantMultiplier (AffineExpr expr) |
Extracts the constant multiplier from an affine expression of the form d * c or c * d , where d is an AffineDimExpr and c is an AffineConstantExpr. 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... | |
#define DBGS | ( | ) | (llvm::dbgs() << "[" DEBUG_TYPE << "]: ") |
Definition at line 32 of file PadTilingInterface.cpp.
#define DBGSNL | ( | ) | (llvm::dbgs() << "\n") |
Definition at line 33 of file PadTilingInterface.cpp.
#define DEBUG_TYPE "pad-tiling-interface" |
Definition at line 26 of file PadTilingInterface.cpp.
|
static |
Extracts the constant multiplier from an affine expression of the form d * c
or c * d
, where d
is an AffineDimExpr and c
is an AffineConstantExpr.
Returns 1 if the expression is not a simple multiplication of a dimension and a constant.
Definition at line 63 of file PadTilingInterface.cpp.
References mlir::Mul.
Referenced by mlir::linalg::computePaddedShape().
|
static |
Form a "full-rank" padding specification so that the application is easy.
Definition at line 37 of file PadTilingInterface.cpp.
References DBGS, mlir::Builder::getIndexAttr(), mlir::isZeroInteger(), and options.
Referenced by mlir::linalg::computePaddedShape().
|
static |
Pad a single operand to paddedShape
using paddingValueAttr
as padding Value.
Definition at line 227 of file PadTilingInterface.cpp.
References DBGS, mlir::get(), mlir::getConstantIntValue(), mlir::getElementTypeOrSelf(), and mlir::linalg::makeComposedPadHighOp().
Referenced by mlir::linalg::rewriteAsPaddedOp().