MLIR  16.0.0git
TosaToLinalgNamed.cpp File Reference
#include "mlir/Conversion/TosaToLinalg/TosaToLinalg.h"
#include "mlir/Dialect/Arith/IR/Arith.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>
+ Include dependency graph for TosaToLinalgNamed.cpp:

Go to the source code of this file.


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 inputDim, Attribute padBeforeAttr, Attribute padAfterAttr, Value kernelDim, Attribute strideAttr, Attribute dilationAttr, Type inputETy, OpBuilder &rewriter)
static SmallVector< ValueinferDynamicDimsForConv (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)

Function Documentation

◆ applyPad()

static mlir::Value applyPad ( Location  loc,
Value  input,
ArrayRef< int64_t >  pad,
Attribute  padAttr,
OpBuilder rewriter 

◆ createDepthwiseConvCollapseMap()

static void createDepthwiseConvCollapseMap ( int64_t  outputRank,
SmallVector< ReassociationExprs, 4 > &  reassociationMap,
OpBuilder rewriter 

Definition at line 148 of file TosaToLinalgNamed.cpp.

References mlir::Builder::getAffineDimExpr().

◆ getConvOutputDim()

static mlir::Value getConvOutputDim ( Location  loc,
Value  inputDim,
Attribute  padBeforeAttr,
Attribute  padAfterAttr,
Value  kernelDim,
Attribute  strideAttr,
Attribute  dilationAttr,
Type  inputETy,
OpBuilder rewriter 

◆ inferDynamicDimsForConv()

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 

◆ reifyConstantDim()

static mlir::Value reifyConstantDim ( Attribute  attr,
ImplicitLocOpBuilder builder