MLIR  20.0.0git
Public Types | Public Member Functions | Public Attributes | List of all members
mlir::linalg::LinalgPaddingOptions Struct Reference

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

Public Types

enum class  CopyBackOp : int8_t { None = 0 , BufferizationMaterializeInDestination = 1 , LinalgCopy = 2 }
 

Public Member Functions

LinalgPaddingOptionssetPaddingValues (ArrayRef< Attribute > pv)
 
LinalgPaddingOptionssetPaddingDimensions (ArrayRef< int64_t > pd)
 
LinalgPaddingOptionssetPadToMultipleOf (ArrayRef< int64_t > m)
 
LinalgPaddingOptionssetPackPaddings (ArrayRef< bool > pp)
 
LinalgPaddingOptionssetHoistPaddings (ArrayRef< int64_t > hp)
 
LinalgPaddingOptionssetTransposePaddings (ArrayRef< SmallVector< int64_t >> tp)
 
LinalgPaddingOptionssetCopyBackOp (CopyBackOp op)
 

Public Attributes

SmallVector< AttributepaddingValues
 A padding value for every operand. More...
 
SmallVector< int64_t > paddingDimensions
 A list of iterator dimensions to pad. More...
 
std::optional< SmallVector< int64_t > > padToMultipleOf
 A list of multiples to which each padding dimension should be padded to. More...
 
SmallVector< bool > packPaddings
 A flag for every operand to mark the PadOp as nofold which enables packing for statically shaped operands. More...
 
SmallVector< int64_t > hoistPaddings
 A number of loops to hoist the PadOp out for every operand. More...
 
SmallVector< SmallVector< int64_t > > transposePaddings
 A permutation vector for every operand used to transpose the packed PadOp results. More...
 
CopyBackOp copyBackOp = CopyBackOp::BufferizationMaterializeInDestination
 The op to be used for copying the padded result to the original destination tensor. More...
 

Detailed Description

Definition at line 278 of file Transforms.h.

Member Enumeration Documentation

◆ CopyBackOp

Enumerator
None 
BufferizationMaterializeInDestination 
LinalgCopy 

Definition at line 318 of file Transforms.h.

Member Function Documentation

◆ setCopyBackOp()

LinalgPaddingOptions& mlir::linalg::LinalgPaddingOptions::setCopyBackOp ( CopyBackOp  op)
inline

Definition at line 326 of file Transforms.h.

◆ setHoistPaddings()

LinalgPaddingOptions& mlir::linalg::LinalgPaddingOptions::setHoistPaddings ( ArrayRef< int64_t >  hp)
inline

Definition at line 306 of file Transforms.h.

References hoistPaddings.

◆ setPackPaddings()

LinalgPaddingOptions& mlir::linalg::LinalgPaddingOptions::setPackPaddings ( ArrayRef< bool >  pp)
inline

Definition at line 300 of file Transforms.h.

References packPaddings.

◆ setPaddingDimensions()

LinalgPaddingOptions& mlir::linalg::LinalgPaddingOptions::setPaddingDimensions ( ArrayRef< int64_t >  pd)
inline

Definition at line 287 of file Transforms.h.

References paddingDimensions.

◆ setPaddingValues()

LinalgPaddingOptions& mlir::linalg::LinalgPaddingOptions::setPaddingValues ( ArrayRef< Attribute pv)
inline

Definition at line 281 of file Transforms.h.

References paddingValues.

◆ setPadToMultipleOf()

LinalgPaddingOptions& mlir::linalg::LinalgPaddingOptions::setPadToMultipleOf ( ArrayRef< int64_t >  m)
inline

Definition at line 293 of file Transforms.h.

◆ setTransposePaddings()

LinalgPaddingOptions& mlir::linalg::LinalgPaddingOptions::setTransposePaddings ( ArrayRef< SmallVector< int64_t >>  tp)
inline

Definition at line 314 of file Transforms.h.

References transposePaddings.

Member Data Documentation

◆ copyBackOp

CopyBackOp mlir::linalg::LinalgPaddingOptions::copyBackOp = CopyBackOp::BufferizationMaterializeInDestination

The op to be used for copying the padded result to the original destination tensor.

Definition at line 325 of file Transforms.h.

◆ hoistPaddings

SmallVector<int64_t> mlir::linalg::LinalgPaddingOptions::hoistPaddings

A number of loops to hoist the PadOp out for every operand.

Definition at line 305 of file Transforms.h.

Referenced by setHoistPaddings().

◆ packPaddings

SmallVector<bool> mlir::linalg::LinalgPaddingOptions::packPaddings

A flag for every operand to mark the PadOp as nofold which enables packing for statically shaped operands.

Definition at line 299 of file Transforms.h.

Referenced by setPackPaddings().

◆ paddingDimensions

SmallVector<int64_t> mlir::linalg::LinalgPaddingOptions::paddingDimensions

A list of iterator dimensions to pad.

Definition at line 286 of file Transforms.h.

Referenced by setPaddingDimensions().

◆ paddingValues

SmallVector<Attribute> mlir::linalg::LinalgPaddingOptions::paddingValues

A padding value for every operand.

Definition at line 280 of file Transforms.h.

Referenced by setPaddingValues().

◆ padToMultipleOf

std::optional<SmallVector<int64_t> > mlir::linalg::LinalgPaddingOptions::padToMultipleOf

A list of multiples to which each padding dimension should be padded to.

Definition at line 292 of file Transforms.h.

◆ transposePaddings

SmallVector<SmallVector<int64_t> > mlir::linalg::LinalgPaddingOptions::transposePaddings

A permutation vector for every operand used to transpose the packed PadOp results.

Definition at line 312 of file Transforms.h.

Referenced by setTransposePaddings().


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