MLIR  16.0.0git
Public Member Functions | List of all members
mlir::linalg::CodegenStrategy Struct Reference

Codegen strategy controls how a Linalg op is progressively lowered. More...

#include "mlir/Dialect/Linalg/Transforms/CodegenStrategy.h"

Public Member Functions

CodegenStrategytileAndFuse (StringRef opName, const LinalgTilingAndFusionOptions &options, const LinalgTransformationFilter::FilterFunction &f=nullptr)
 Append a pattern to tile the Op opName and fuse its producers with tiling and fusion options. More...
 
CodegenStrategytileAndFuseIf (bool b, StringRef opName, LinalgTilingAndFusionOptions options, LinalgTransformationFilter::FilterFunction f=nullptr)
 Conditionally append a pattern to tile the Op opName and fuse its producers with tiling and fusion options. More...
 
CodegenStrategytile (StringRef opName, const linalg::LinalgTilingOptions &options, const LinalgTransformationFilter::FilterFunction &f=nullptr)
 Append a pattern to add a level of tiling for Op opName with tiling options. More...
 
CodegenStrategytileIf (bool b, StringRef opName, linalg::LinalgTilingOptions options, LinalgTransformationFilter::FilterFunction f=nullptr)
 Conditionally append a pattern to add a level of tiling for LinalgOpType with tiling options. More...
 
CodegenStrategypad (StringRef opName, const linalg::LinalgPaddingOptions &options, const LinalgTransformationFilter::FilterFunction &f=nullptr)
 Append a pattern to pad and hoist the operands of Op opName with padding options. More...
 
CodegenStrategypadIf (bool b, StringRef opName, linalg::LinalgPaddingOptions options, LinalgTransformationFilter::FilterFunction f=nullptr)
 Conditionally append a pattern to pad and hoist the operands of Op opName with padding options. More...
 
CodegenStrategydecompose (const LinalgTransformationFilter::FilterFunction &f=nullptr)
 Append patterns to decompose convolutions. More...
 
CodegenStrategydecomposeIf (bool b, LinalgTransformationFilter::FilterFunction f=nullptr)
 Conditionally append patterns to decompose convolutions. More...
 
CodegenStrategypeel (StringRef opName, const LinalgPeelOptions &options, const LinalgTransformationFilter::FilterFunction &f=nullptr)
 Append a pattern to peel 'LinalgOpType'. More...
 
CodegenStrategypeelIf (bool b, StringRef opName, const LinalgPeelOptions &options, LinalgTransformationFilter::FilterFunction f=nullptr)
 Conditionally append a pattern to peel 'LinalgOpType'. More...
 
CodegenStrategyvectorLowering (LinalgVectorLoweringOptions options)
 Append a pattern to lower all vector operations. More...
 
CodegenStrategysetVectorTransferToSCFOptions (LinalgEnablingOptions options)
 Configure the post staged-patterns global enabling passes options. More...
 
void configurePassPipeline (OpPassManager &pm, MLIRContext *context, bool addEnablePass=true) const
 Apply the transformation patterns in sequence with cleanup transformations interleaved. More...
 

Detailed Description

Codegen strategy controls how a Linalg op is progressively lowered.

Definition at line 132 of file CodegenStrategy.h.

Member Function Documentation

◆ configurePassPipeline()

void mlir::linalg::CodegenStrategy::configurePassPipeline ( OpPassManager pm,
MLIRContext context,
bool  addEnablePass = true 
) const

Apply the transformation patterns in sequence with cleanup transformations interleaved.

Definition at line 29 of file CodegenStrategy.cpp.

References mlir::createLinalgStrategyRemoveMarkersPass().

◆ decompose()

CodegenStrategy& mlir::linalg::CodegenStrategy::decompose ( const LinalgTransformationFilter::FilterFunction f = nullptr)
inline

Append patterns to decompose convolutions.

Definition at line 183 of file CodegenStrategy.h.

◆ decomposeIf()

CodegenStrategy& mlir::linalg::CodegenStrategy::decomposeIf ( bool  b,
LinalgTransformationFilter::FilterFunction  f = nullptr 
)
inline

Conditionally append patterns to decompose convolutions.

Definition at line 189 of file CodegenStrategy.h.

◆ pad()

CodegenStrategy& mlir::linalg::CodegenStrategy::pad ( StringRef  opName,
const linalg::LinalgPaddingOptions options,
const LinalgTransformationFilter::FilterFunction f = nullptr 
)
inline

Append a pattern to pad and hoist the operands of Op opName with padding options.

Definition at line 168 of file CodegenStrategy.h.

◆ padIf()

CodegenStrategy& mlir::linalg::CodegenStrategy::padIf ( bool  b,
StringRef  opName,
linalg::LinalgPaddingOptions  options,
LinalgTransformationFilter::FilterFunction  f = nullptr 
)
inline

Conditionally append a pattern to pad and hoist the operands of Op opName with padding options.

Definition at line 177 of file CodegenStrategy.h.

◆ peel()

CodegenStrategy& mlir::linalg::CodegenStrategy::peel ( StringRef  opName,
const LinalgPeelOptions options,
const LinalgTransformationFilter::FilterFunction f = nullptr 
)
inline

Append a pattern to peel 'LinalgOpType'.

Definition at line 194 of file CodegenStrategy.h.

◆ peelIf()

CodegenStrategy& mlir::linalg::CodegenStrategy::peelIf ( bool  b,
StringRef  opName,
const LinalgPeelOptions options,
LinalgTransformationFilter::FilterFunction  f = nullptr 
)
inline

Conditionally append a pattern to peel 'LinalgOpType'.

Definition at line 202 of file CodegenStrategy.h.

◆ setVectorTransferToSCFOptions()

CodegenStrategy& mlir::linalg::CodegenStrategy::setVectorTransferToSCFOptions ( LinalgEnablingOptions  options)
inline

Configure the post staged-patterns global enabling passes options.

Definition at line 214 of file CodegenStrategy.h.

References options.

◆ tile()

CodegenStrategy& mlir::linalg::CodegenStrategy::tile ( StringRef  opName,
const linalg::LinalgTilingOptions options,
const LinalgTransformationFilter::FilterFunction f = nullptr 
)
inline

Append a pattern to add a level of tiling for Op opName with tiling options.

Definition at line 152 of file CodegenStrategy.h.

◆ tileAndFuse()

CodegenStrategy& mlir::linalg::CodegenStrategy::tileAndFuse ( StringRef  opName,
const LinalgTilingAndFusionOptions options,
const LinalgTransformationFilter::FilterFunction f = nullptr 
)
inline

Append a pattern to tile the Op opName and fuse its producers with tiling and fusion options.

Definition at line 136 of file CodegenStrategy.h.

◆ tileAndFuseIf()

CodegenStrategy& mlir::linalg::CodegenStrategy::tileAndFuseIf ( bool  b,
StringRef  opName,
LinalgTilingAndFusionOptions  options,
LinalgTransformationFilter::FilterFunction  f = nullptr 
)
inline

Conditionally append a pattern to tile the Op opName and fuse its producers with tiling and fusion options.

Definition at line 145 of file CodegenStrategy.h.

◆ tileIf()

CodegenStrategy& mlir::linalg::CodegenStrategy::tileIf ( bool  b,
StringRef  opName,
linalg::LinalgTilingOptions  options,
LinalgTransformationFilter::FilterFunction  f = nullptr 
)
inline

Conditionally append a pattern to add a level of tiling for LinalgOpType with tiling options.

Definition at line 161 of file CodegenStrategy.h.

References mlir::tile().

◆ vectorLowering()

CodegenStrategy& mlir::linalg::CodegenStrategy::vectorLowering ( LinalgVectorLoweringOptions  options)
inline

Append a pattern to lower all vector operations.

Definition at line 207 of file CodegenStrategy.h.


The documentation for this struct was generated from the following files: