MLIR
22.0.0git
|
#include "mlir/Dialect/Linalg/Transforms/Transforms.h"
#include "mlir/Dialect/Affine/IR/AffineOps.h"
#include "mlir/Dialect/Bufferization/IR/Bufferization.h"
#include "mlir/Dialect/Complex/IR/Complex.h"
#include "mlir/Dialect/Linalg/IR/Linalg.h"
#include "mlir/Dialect/Tensor/IR/Tensor.h"
#include "mlir/Interfaces/ValueBoundsOpInterface.h"
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "linalg-padding" |
#define | DBGS() (llvm::dbgs() << "[" DEBUG_TYPE << "]: ") |
#define | DBGSNL() (llvm::dbgs() << "\n") |
Functions | |
static FailureOr< Value > | padOperandToSmallestStaticBoundingBox (RewriterBase &rewriter, linalg::LinalgOp opToPad, OpOperand *opOperand, const LinalgPaddingOptions &options) |
Pad the opOperand in the "paddingDimensions" using the padding value and the nofold flag found in "paddingValues" and "nofoldFlags", respectively. More... | |
#define DBGS | ( | ) | (llvm::dbgs() << "[" DEBUG_TYPE << "]: ") |
Definition at line 23 of file Padding.cpp.
#define DBGSNL | ( | ) | (llvm::dbgs() << "\n") |
Definition at line 24 of file Padding.cpp.
#define DEBUG_TYPE "linalg-padding" |
Definition at line 18 of file Padding.cpp.
|
static |
Pad the opOperand
in the "paddingDimensions" using the padding value and the nofold flag found in "paddingValues" and "nofoldFlags", respectively.
Exit early and return the opOperand
value if it already has the requested shape. i.e.:
Otherwise, try to pad the shape dimensions that match the iterator dimensions "paddingDimensions" and return the tensor::PadOp result if padding succeeds or failure otherwise.
Definition at line 187 of file Padding.cpp.
References DBGS, mlir::remark::failed(), mlir::IROperand< DerivedT, IRValueT >::get(), mlir::getElementTypeOrSelf(), mlir::OpOperand::getOperandNumber(), mlir::Value::getType(), mlir::linalg::makeComposedPadHighOp(), mlir::RewriterBase::notifyMatchFailure(), and options.
Referenced by mlir::linalg::rewriteAsPaddedOp().