MLIR  19.0.0git
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"

Public Types

using ControlFnTy = std::function< std::tuple< bool, bool >(tensor::ExtractSliceOp candidateSliceOp, OpResult originalProducer, bool isDestinationOperand)>
 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 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
 

Detailed Description

Options used to control tile + fuse.

Definition at line 96 of file TileUsingInterface.h.

Member Typedef Documentation

◆ ControlFnTy

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

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.

It retuns two booleans

  • returns true if the fusion should be done through the candidate slice
  • returns true if a replacement for the fused producer needs to be yielded from within the tiled loop. Note that it is valid to return true only if the slice fused is disjoint across all iterations of the tiled loop. It is up to the caller to ensure that this is true for the fused producers.

Definition at line 117 of file TileUsingInterface.h.

Member Function Documentation

◆ setFusionControlFn()

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

Definition at line 123 of file TileUsingInterface.h.

References fusionControlFn.

◆ setTilingOptions()

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

Definition at line 99 of file TileUsingInterface.h.

References options, and tilingOptions.

Member Data Documentation

◆ fusionControlFn

ControlFnTy mlir::scf::SCFTileAndFuseOptions::fusionControlFn
Initial value:
= [](tensor::ExtractSliceOp, OpResult, bool) {
return std::make_tuple(true, false);
}

Definition at line 120 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 98 of file TileUsingInterface.h.

Referenced by setTilingOptions().


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