MLIR
16.0.0git
|
#include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
#include "mlir/Dialect/SCF/IR/SCF.h"
#include "mlir/Dialect/Tensor/IR/Tensor.h"
#include "mlir/Dialect/Tensor/Transforms/Transforms.h"
#include "mlir/Dialect/Utils/StaticValueUtils.h"
#include "mlir/IR/PatternMatch.h"
#include "llvm/Support/Debug.h"
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "mlir-tensor-split-padding" |
to separate the cases where we don't need padding (all pad sizes are actually zeros) and where we indeed need padding. More... | |
Functions | |
static bool | isZero (OpFoldResult attrOrValue) |
Returns true if the the given attrOrValue is a constant zero. More... | |
static Value | getAsValue (OpFoldResult attrOrValue, OpBuilder &builder, Location loc) |
Gets the given attrOrValue as a Value by creating constant ops for attributes. More... | |
#define DEBUG_TYPE "mlir-tensor-split-padding" |
to separate the cases where we don't need padding (all pad sizes are actually zeros) and where we indeed need padding.
Definition at line 23 of file SplitPadding.cpp.
|
static |
Gets the given attrOrValue
as a Value by creating constant ops for attributes.
Definition at line 36 of file SplitPadding.cpp.
References mlir::OpBuilder::clone(), mlir::OpBuilder::create(), mlir::failure(), mlir::Operation::getResults(), isZero(), mlir::OpRewritePattern< SourceOp >::OpRewritePattern(), mlir::RewriterBase::replaceOpWithNewOp(), and mlir::success().
|
static |
Returns true if the the given attrOrValue
is a constant zero.
Definition at line 28 of file SplitPadding.cpp.
References mlir::getConstantIntValue().
Referenced by getAsValue().