MLIR 22.0.0git
Specialize.cpp File Reference

Go to the source code of this file.

Classes

class  mlir::impl::LinalgSpecializeGenericOpsPassBase< DerivedT >

Namespaces

namespace  mlir
 Include the generated interface declarations.
namespace  mlir::impl
 Attribute collections provide a dictionary-like interface.

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

std::unique_ptr<::mlir::Passmlir::impl::createLinalgSpecializeGenericOpsPass ()
std::unique_ptr<::mlir::Passmlir::createLinalgSpecializeGenericOpsPass ()
static bool areBinOpsSwapped (GenericOp genericOp)

Macro Definition Documentation

◆ CONV_OP_SPECIALIZER

#define CONV_OP_SPECIALIZER ( ConvOpTy)
Value:
if (isaConvolutionOpOfType<ConvOpTy>(genericOp, &dilations, &strides)) \
return specializeToConvOp<ConvOpTy>(rewriter, genericOp, dilations, \
strides); \
bool isaConvolutionOpOfType(LinalgOp op, SmallVector< int64_t > *dilations, SmallVector< int64_t > *strides)
Given a linalg op this function returns true if it is a convolution op of type ConvOpTy and populates...

◆ DEBUG_TYPE

#define DEBUG_TYPE   "linalg-specialization"

Definition at line 28 of file Specialize.cpp.

◆ GEN_PASS_DEF_LINALGSPECIALIZEGENERICOPSPASS

#define GEN_PASS_DEF_LINALGSPECIALIZEGENERICOPSPASS

Definition at line 24 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 30 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 37 of file Specialize.cpp.

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

Function Documentation

◆ areBinOpsSwapped()

bool areBinOpsSwapped ( GenericOp genericOp)
static