MLIR  20.0.0git
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
mlir::scf::SCFTileAndFuseOptions Struct Reference

Options used to control tile + fuse. More...

#include "mlir/Dialect/SCF/Transforms/TileUsingInterface.h"

Classes

struct  ControlFnResult
 Control function to check if a slice needs to be fused or not, The control function receives 1) the slice along which fusion is to be done, 2) the producer value that is to be fused 3) a boolean value set to true if the fusion is from a destination operand. More...
 

Public Types

using ControlFnTy = std::function< std::optional< ControlFnResult >(tensor::ExtractSliceOp candidateSliceOp, OpResult originalProducer, bool isDestinationOperand)>
 

Public Member Functions

SCFTileAndFuseOptionssetTilingOptions (SCFTilingOptions options)
 
SCFTileAndFuseOptionssetFusionControlFn (ControlFnTy controlFn)
 

Public Attributes

SCFTilingOptions tilingOptions
 The tiling options used to control the tiling of the consumer. More...
 
ControlFnTy fusionControlFn
 The default control function implements greedy fusion without yielding a replacement for any of the fused results. More...
 
std::optional< FrozenRewritePatternSetcleanupPatterns = std::nullopt
 An optional set of rewrite patterns to apply to the results of tiling before fusion. More...
 

Detailed Description

Options used to control tile + fuse.

Definition at line 122 of file TileUsingInterface.h.

Member Typedef Documentation

◆ ControlFnTy

using mlir::scf::SCFTileAndFuseOptions::ControlFnTy = std::function<std::optional<ControlFnResult>( tensor::ExtractSliceOp candidateSliceOp, OpResult originalProducer, bool isDestinationOperand)>

Definition at line 144 of file TileUsingInterface.h.

Member Function Documentation

◆ setFusionControlFn()

SCFTileAndFuseOptions& mlir::scf::SCFTileAndFuseOptions::setFusionControlFn ( ControlFnTy  controlFn)
inline

Definition at line 153 of file TileUsingInterface.h.

References fusionControlFn.

◆ setTilingOptions()

SCFTileAndFuseOptions& mlir::scf::SCFTileAndFuseOptions::setTilingOptions ( SCFTilingOptions  options)
inline

Definition at line 125 of file TileUsingInterface.h.

References options, and tilingOptions.

Member Data Documentation

◆ cleanupPatterns

std::optional<FrozenRewritePatternSet> mlir::scf::SCFTileAndFuseOptions::cleanupPatterns = std::nullopt

An optional set of rewrite patterns to apply to the results of tiling before fusion.

This will track deleted and newly inserted tensor.extract_slice ops and update the worklist.

Definition at line 161 of file TileUsingInterface.h.

◆ fusionControlFn

ControlFnTy mlir::scf::SCFTileAndFuseOptions::fusionControlFn
Initial value:
= [](tensor::ExtractSliceOp, OpResult,
bool) -> std::optional<ControlFnResult> {
return ControlFnResult{};
}

The default control function implements greedy fusion without yielding a replacement for any of the fused results.

Definition at line 149 of file TileUsingInterface.h.

Referenced by setFusionControlFn().

◆ tilingOptions

SCFTilingOptions mlir::scf::SCFTileAndFuseOptions::tilingOptions

The tiling options used to control the tiling of the consumer.

Definition at line 124 of file TileUsingInterface.h.

Referenced by setTilingOptions().


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