MLIR
15.0.0git
|
#include "mlir/Conversion/TosaToLinalg/TosaToLinalg.h"
#include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
#include "mlir/Dialect/Linalg/IR/Linalg.h"
#include "mlir/Dialect/Math/IR/Math.h"
#include "mlir/Dialect/SCF/IR/SCF.h"
#include "mlir/Dialect/Tensor/IR/Tensor.h"
#include "mlir/Dialect/Tensor/Utils/Utils.h"
#include "mlir/Dialect/Tosa/IR/TosaOps.h"
#include "mlir/Dialect/Tosa/Utils/CoversionUtils.h"
#include "mlir/Dialect/Utils/ReshapeOpsUtils.h"
#include "mlir/IR/Matchers.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/Transforms/DialectConversion.h"
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"
#include <numeric>
Go to the source code of this file.
Functions | |
static mlir::Value | applyPad (Location loc, Value input, ArrayRef< int64_t > pad, Attribute padAttr, OpBuilder &rewriter) |
static mlir::Value | reifyConstantDim (Attribute attr, ImplicitLocOpBuilder &builder) |
static mlir::Value | getConvOutputDim (Location loc, Value initDim, Attribute padBeforeAttr, Attribute padAfterAttr, Value kernelDim, Attribute strideAttr, Attribute dilationAttr, Type inputETy, OpBuilder &rewriter) |
static SmallVector< Value > | inferDynamicDimsForConv (Location loc, Value input, Value weight, ShapedType resultTy, ArrayAttr padAttr, ArrayAttr strideAttr, ArrayAttr dilationAttr, int64_t weightHDim, int64_t weightWDim, OpBuilder &rewriter) |
static void | createDepthwiseConvCollapseMap (int64_t outputRank, SmallVector< ReassociationExprs, 4 > &reassociationMap, OpBuilder &rewriter) |
|
static |
Definition at line 33 of file TosaToLinalgNamed.cpp.
References mlir::Type::cast(), mlir::OpBuilder::create(), mlir::tensor::createPadScalarOp(), mlir::Builder::getIndexAttr(), and mlir::Value::getType().
Referenced by createDepthwiseConvCollapseMap().
|
static |
Definition at line 149 of file TosaToLinalgNamed.cpp.
References applyPad(), mlir::Attribute::cast(), mlir::Location::cast(), mlir::Type::cast(), mlir::tosa::checkHasDynamicBatchDims(), clamp(), mlir::tosa::condenseValues(), mlir::OpBuilder::create(), mlir::failure(), mlir::AffineMap::get(), mlir::DenseIntElementsAttr::get(), mlir::Builder::getAffineDimExpr(), mlir::Operation::getAttr(), mlir::Builder::getBoolAttr(), mlir::Builder::getContext(), getElementType(), mlir::Builder::getFloatAttr(), mlir::FloatType::getFloatSemantics(), mlir::Builder::getI32IntegerAttr(), mlir::Builder::getI32Type(), mlir::Builder::getI64Type(), mlir::Builder::getI64VectorAttr(), mlir::Builder::getI8IntegerAttr(), mlir::Builder::getIntegerAttr(), mlir::Type::getIntOrFloatBitWidth(), mlir::Builder::getMultiDimIdentityMap(), mlir::tosa::getNParallelLoopsAttrs(), mlir::Value::getType(), mlir::tosa::getValuesFromIntArrayAttribute(), mlir::Builder::getZeroAttr(), inferDynamicDimsForConv(), mlir::Type::isa(), max(), min(), mlir::RewriterBase::notifyMatchFailure(), mlir::ConversionPatternRewriter::notifyMatchFailure(), mlir::RewriterBase::replaceOp(), mlir::ConversionPatternRewriter::replaceOp(), mlir::RewriterBase::replaceOpWithNewOp(), and mlir::success().
|
static |
Definition at line 77 of file TosaToLinalgNamed.cpp.
References mlir::ImplicitLocOpBuilder::create(), mlir::OpBuilder::create(), mlir::Value::getType(), reifyConstantDim(), and subtract().
Referenced by inferDynamicDimsForConv().
|
static |
Definition at line 100 of file TosaToLinalgNamed.cpp.
References mlir::Type::cast(), mlir::tosa::condenseValues(), mlir::OpBuilder::create(), getConvOutputDim(), and mlir::Value::getType().
Referenced by createDepthwiseConvCollapseMap().
|
static |
Definition at line 67 of file TosaToLinalgNamed.cpp.
References mlir::ImplicitLocOpBuilder::create(), mlir::ImplicitLocOpBuilder::createOrFold(), and mlir::Builder::getIndexType().
Referenced by getConvOutputDim().