MLIR  17.0.0git
Public Member Functions | Public Attributes | List of all members
mlir::linalg::LinalgTilingOptions Struct Reference

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

+ Collaboration diagram for mlir::linalg::LinalgTilingOptions:

Public Member Functions

LinalgTilingOptionssetTileSizeComputationFunction (TileSizeComputationFunction fun)
 
LinalgTilingOptionssetTileSizes (const SmallVector< Value, 4 > &ts)
 Set the tileSizeComputationFunction to return the values ts. More...
 
LinalgTilingOptionssetTileSizes (ArrayRef< int64_t > ts)
 Convenience function to set the tileSizeComputationFunction to a function that computes tile sizes at the point they are needed. More...
 
LinalgTilingOptionsscalarizeDynamicDims ()
 Tile all dynamic dimensions by 1. More...
 
LinalgTilingOptionssetInterchange (ArrayRef< unsigned > interchange)
 
LinalgTilingOptionssetLoopType (LinalgTilingLoopType lt)
 
LinalgTilingOptionssetDistributionOptions (LinalgLoopDistributionOptions distributionOptions)
 
LinalgTilingOptionssetDistributionTypes (ArrayRef< StringRef > types)
 
LinalgTilingOptionssetPeeledLoops (ArrayRef< int64_t > loops)
 

Public Attributes

TileSizeComputationFunction tileSizeComputationFunction = nullptr
 Computation function that returns the tile sizes for each operation. More...
 
SmallVector< unsigned, 4 > interchangeVector = {}
 The interchange vector to reorder the tiled loops. More...
 
LinalgTilingLoopType loopType = LinalgTilingLoopType::Loops
 The type of tile loops to generate. More...
 
std::optional< LinalgLoopDistributionOptionsdistribution
 When specified, specifies distribution of generated tile loops to processors. More...
 
SmallVector< StringRef, 2 > distributionTypes = {}
 Specification markers of how to distribute the linalg.tiled_loop. More...
 
SmallVector< int64_t > peeledLoops
 Peel the specified loops. More...
 

Detailed Description

Definition at line 653 of file Transforms.h.

Member Function Documentation

◆ scalarizeDynamicDims()

LinalgTilingOptions& mlir::linalg::LinalgTilingOptions::scalarizeDynamicDims ( )

Tile all dynamic dimensions by 1.

I.e., scalarize those dimensions. Note: scalarizeDynamicDims and setTileSizes cannot be used together.

◆ setDistributionOptions()

LinalgTilingOptions& mlir::linalg::LinalgTilingOptions::setDistributionOptions ( LinalgLoopDistributionOptions  distributionOptions)
inline

Definition at line 701 of file Transforms.h.

References distribution.

Referenced by mlir::linalg::TileLoopNest::tileRootOp().

◆ setDistributionTypes()

LinalgTilingOptions& mlir::linalg::LinalgTilingOptions::setDistributionTypes ( ArrayRef< StringRef >  types)
inline

Definition at line 709 of file Transforms.h.

References distributionTypes.

◆ setInterchange()

LinalgTilingOptions& mlir::linalg::LinalgTilingOptions::setInterchange ( ArrayRef< unsigned >  interchange)
inline

Definition at line 683 of file Transforms.h.

References interchangeVector.

Referenced by mlir::linalg::TileLoopNest::tileRootOp().

◆ setLoopType()

LinalgTilingOptions& mlir::linalg::LinalgTilingOptions::setLoopType ( LinalgTilingLoopType  lt)
inline

Definition at line 691 of file Transforms.h.

References loopType.

Referenced by mlir::linalg::TileLoopNest::tileRootOp().

◆ setPeeledLoops()

LinalgTilingOptions& mlir::linalg::LinalgTilingOptions::setPeeledLoops ( ArrayRef< int64_t >  loops)
inline

Definition at line 717 of file Transforms.h.

References peeledLoops.

◆ setTileSizeComputationFunction()

LinalgTilingOptions& mlir::linalg::LinalgTilingOptions::setTileSizeComputationFunction ( TileSizeComputationFunction  fun)
inline

Definition at line 660 of file Transforms.h.

References tileSizeComputationFunction.

◆ setTileSizes() [1/2]

LinalgTilingOptions & mlir::linalg::LinalgTilingOptions::setTileSizes ( ArrayRef< int64_t >  ts)

Convenience function to set the tileSizeComputationFunction to a function that computes tile sizes at the point they are needed.

Allows proper interaction with folding.

Definition at line 55 of file Transforms.cpp.

References mlir::OpBuilder::create(), and mlir::OpBuilder::setInsertionPointToStart().

◆ setTileSizes() [2/2]

LinalgTilingOptions& mlir::linalg::LinalgTilingOptions::setTileSizes ( const SmallVector< Value, 4 > &  ts)
inline

Set the tileSizeComputationFunction to return the values ts.

The values must not fold away when tiling. Otherwise, use a more robust tileSizeComputationFunction.

Definition at line 667 of file Transforms.h.

References tileSizeComputationFunction.

Referenced by mlir::linalg::TileLoopNest::tileRootOp().

Member Data Documentation

◆ distribution

std::optional<LinalgLoopDistributionOptions> mlir::linalg::LinalgTilingOptions::distribution

When specified, specifies distribution of generated tile loops to processors.

Definition at line 698 of file Transforms.h.

Referenced by setDistributionOptions().

◆ distributionTypes

SmallVector<StringRef, 2> mlir::linalg::LinalgTilingOptions::distributionTypes = {}

Specification markers of how to distribute the linalg.tiled_loop.

Definition at line 707 of file Transforms.h.

Referenced by setDistributionTypes().

◆ interchangeVector

SmallVector<unsigned, 4> mlir::linalg::LinalgTilingOptions::interchangeVector = {}

The interchange vector to reorder the tiled loops.

Definition at line 681 of file Transforms.h.

Referenced by setInterchange().

◆ loopType

LinalgTilingLoopType mlir::linalg::LinalgTilingOptions::loopType = LinalgTilingLoopType::Loops

The type of tile loops to generate.

Definition at line 689 of file Transforms.h.

Referenced by setLoopType().

◆ peeledLoops

SmallVector<int64_t> mlir::linalg::LinalgTilingOptions::peeledLoops

Peel the specified loops.

Definition at line 715 of file Transforms.h.

Referenced by setPeeledLoops().

◆ tileSizeComputationFunction

TileSizeComputationFunction mlir::linalg::LinalgTilingOptions::tileSizeComputationFunction = nullptr

Computation function that returns the tile sizes for each operation.

Delayed construction of constant tile sizes should occur to interoperate with folding.

Definition at line 657 of file Transforms.h.

Referenced by setTileSizeComputationFunction(), and setTileSizes().


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