MLIR  20.0.0git
Functions
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/ConversionUtils.h"
#include "mlir/Dialect/Utils/IndexingUtils.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 "mlir/Interfaces/InferTypeOpInterface.h"
#include <numeric>
#include <type_traits>

Go to the source code of this file.

Functions

static mlir::Value applyPad (Location loc, Value input, ArrayRef< int64_t > pad, TypedAttr padAttr, OpBuilder &rewriter)
 
static mlir::Value linalgIntBroadcastExtSIAdd (PatternRewriter &rewriter, Location loc, Value bias, Value conv, Value result, ArrayRef< AffineMap > indexingMaps)
 
static AffineMap getBroadcastingMap (PatternRewriter &rewriter, Value source, Value result)
 
static mlir::Value linalgBroadcastAndMaybeExtSI (PatternRewriter &rewriter, Location loc, Value source, Value result)
 
static mlir::Value reifyConstantDim (int64_t attr, ImplicitLocOpBuilder &builder)
 
static mlir::Value getConvOrPoolOutputDim (Location loc, Value inputDim, int64_t padBeforeAttr, int64_t padAfterAttr, Value kernelDim, int64_t strideAttr, int64_t dilationAttr, OpBuilder &rewriter)
 
static SmallVector< ValueinferDynamicDimsForConv (Location loc, Value input, Value weight, ShapedType resultTy, ArrayRef< int64_t > padAttr, ArrayRef< int64_t > strideAttr, ArrayRef< int64_t > dilationAttr, ArrayRef< int64_t > inputSizeDims, ArrayRef< int64_t > kernelSizeDims, 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,
TypedAttr  padAttr,
OpBuilder rewriter 
)
static

◆ createDepthwiseConvCollapseMap()

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

Definition at line 225 of file TosaToLinalgNamed.cpp.

References mlir::Builder::getAffineDimExpr().

◆ getBroadcastingMap()

static AffineMap getBroadcastingMap ( PatternRewriter rewriter,
Value  source,
Value  result 
)
static

◆ getConvOrPoolOutputDim()

static mlir::Value getConvOrPoolOutputDim ( Location  loc,
Value  inputDim,
int64_t  padBeforeAttr,
int64_t  padAfterAttr,
Value  kernelDim,
int64_t  strideAttr,
int64_t  dilationAttr,
OpBuilder rewriter 
)
static

◆ inferDynamicDimsForConv()

static SmallVector<Value> inferDynamicDimsForConv ( Location  loc,
Value  input,
Value  weight,
ShapedType  resultTy,
ArrayRef< int64_t >  padAttr,
ArrayRef< int64_t >  strideAttr,
ArrayRef< int64_t >  dilationAttr,
ArrayRef< int64_t >  inputSizeDims,
ArrayRef< int64_t >  kernelSizeDims,
OpBuilder rewriter 
)
static

◆ linalgBroadcastAndMaybeExtSI()

static mlir::Value linalgBroadcastAndMaybeExtSI ( PatternRewriter rewriter,
Location  loc,
Value  source,
Value  result 
)
static

◆ linalgIntBroadcastExtSIAdd()

static mlir::Value linalgIntBroadcastExtSIAdd ( PatternRewriter rewriter,
Location  loc,
Value  bias,
Value  conv,
Value  result,
ArrayRef< AffineMap indexingMaps 
)
static

◆ reifyConstantDim()

static mlir::Value reifyConstantDim ( int64_t  attr,
ImplicitLocOpBuilder builder 
)
static

Definition at line 149 of file TosaToLinalgNamed.cpp.

References mlir::ImplicitLocOpBuilder::create().

Referenced by getConvOrPoolOutputDim().