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 REPLACE_BINARY_OP(NEWOP, OPERANDS_SWAP)
#define REPLACE_UNARY_OP(NEWOP)
#define CONV_OP_SPECIALIZER(ConvOpTy)

Functions

static bool areBinOpsSwapped (GenericOp genericOp)

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.

◆ REPLACE_BINARY_OP

#define REPLACE_BINARY_OP ( NEWOP,
OPERANDS_SWAP )
Value:
(rewriter.replaceOpWithNewOp<NEWOP>( \
genericOp, \
ValueRange{genericOp.getDpsInputs()[(OPERANDS_SWAP) ? 1 : 0], \
genericOp.getDpsInputs()[(OPERANDS_SWAP) ? 0 : 1]}, \
ValueRange{genericOp.getDpsInits()[0]}))
This class provides an abstraction over the different types of ranges over Values.
Definition ValueRange.h:387

Definition at line 31 of file Specialize.cpp.

Referenced by mlir::linalg::specializeGenericOp().

◆ REPLACE_UNARY_OP

#define REPLACE_UNARY_OP ( NEWOP)
Value:
(rewriter.replaceOpWithNewOp<NEWOP>(genericOp, \
ValueRange{genericOp.getDpsInputs()[0]}, \
ValueRange{genericOp.getDpsInits()[0]}))

Definition at line 38 of file Specialize.cpp.

Referenced by mlir::linalg::specializeGenericOp().

Function Documentation

◆ areBinOpsSwapped()

bool areBinOpsSwapped ( GenericOp genericOp)
static