MLIR 23.0.0git
Specialize.cpp File Reference

Go to the source code of this file.

Namespaces

namespace  mlir
 Include the generated interface declarations.

Macros

#define GEN_PASS_DEF_LINALGSPECIALIZEGENERICOPSPASS
#define DEBUG_TYPE   "linalg-specialization"
#define CONV_OP_SPECIALIZER(ConvOpTy)

Functions

static bool areBinOpsSwapped (GenericOp genericOp)
static bool findIndexOfScalarOperand (GenericOp genericOp, int &index)
static FailureOr< LinalgOp > specializeLinalgElementwise (RewriterBase &rewriter, GenericOp genericOp, bool emitCategoryOp)

Macro Definition Documentation

◆ CONV_OP_SPECIALIZER

#define CONV_OP_SPECIALIZER ( ConvOpTy)
Value:
if (std::optional<DilationsAndStrides> convParams = \
return specializeToConvOp<ConvOpTy>( \
rewriter, genericOp, convParams->dilations, convParams->strides); \
std::optional< DilationsAndStrides > matchConvolutionOpOfType(LinalgOp op)
Given a linalg op this function returns DilationsAndStrides if it is a convolution op of type ConvOpT...

◆ DEBUG_TYPE

#define DEBUG_TYPE   "linalg-specialization"

Definition at line 29 of file Specialize.cpp.

◆ GEN_PASS_DEF_LINALGSPECIALIZEGENERICOPSPASS

#define GEN_PASS_DEF_LINALGSPECIALIZEGENERICOPSPASS

Definition at line 25 of file Specialize.cpp.

Function Documentation

◆ areBinOpsSwapped()

bool areBinOpsSwapped ( GenericOp genericOp)
static

◆ findIndexOfScalarOperand()

bool findIndexOfScalarOperand ( GenericOp genericOp,
int & index )
static

Definition at line 80 of file Specialize.cpp.

References mlir::Block::front(), and mlir::Operation::getOperands().

Referenced by specializeLinalgElementwise().

◆ specializeLinalgElementwise()