MLIR
22.0.0git
|
#include "mlir/Dialect/Linalg/Transforms/Transforms.h"
Public Types | |
enum class | CopyBackOp : int8_t { None = 0 , BufferizationMaterializeInDestination = 1 , LinalgCopy = 2 } |
Public Member Functions | |
LinalgPaddingOptions & | setPaddingValues (ArrayRef< Attribute > pv) |
LinalgPaddingOptions & | setPaddingDimensions (ArrayRef< int64_t > pd) |
LinalgPaddingOptions & | setPadToMultipleOf (ArrayRef< int64_t > m) |
LinalgPaddingOptions & | setSizeToPadTo (unsigned operandIndex, unsigned dimIndex, OpFoldResult size) |
OpFoldResult | getSizeToPadTo (unsigned operandIndex, unsigned dimIndex) const |
Given the operand index and shape dim it returns the size to pad to. More... | |
LinalgPaddingOptions & | setNofoldFlags (ArrayRef< bool > pp) |
LinalgPaddingOptions & | setHoistPaddings (ArrayRef< int64_t > hp) |
LinalgPaddingOptions & | setTransposePaddings (ArrayRef< SmallVector< int64_t >> tp) |
LinalgPaddingOptions & | setCopyBackOp (CopyBackOp op) |
Public Attributes | |
SmallVector< Attribute > | paddingValues |
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... | |
DenseMap< std::pair< unsigned, unsigned >, OpFoldResult > | sizeToPadTo |
A mapping between an operand and shape dim, and a size for a padding dimension. More... | |
SmallVector< bool > | nofoldFlags |
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... | |
Definition at line 281 of file Transforms.h.
|
strong |
Enumerator | |
---|---|
None | |
BufferizationMaterializeInDestination | |
LinalgCopy |
Definition at line 338 of file Transforms.h.
|
inline |
Given the operand index and shape dim it returns the size to pad to.
Definition at line 312 of file Transforms.h.
References sizeToPadTo.
|
inline |
Definition at line 346 of file Transforms.h.
References copyBackOp.
|
inline |
Definition at line 326 of file Transforms.h.
References hoistPaddings.
|
inline |
Definition at line 320 of file Transforms.h.
References nofoldFlags.
|
inline |
Definition at line 290 of file Transforms.h.
References paddingDimensions.
|
inline |
Definition at line 284 of file Transforms.h.
References paddingValues.
|
inline |
Definition at line 296 of file Transforms.h.
References padToMultipleOf.
|
inline |
Definition at line 305 of file Transforms.h.
References sizeToPadTo.
|
inline |
Definition at line 334 of file Transforms.h.
References transposePaddings.
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 345 of file Transforms.h.
Referenced by setCopyBackOp().
SmallVector<int64_t> mlir::linalg::LinalgPaddingOptions::hoistPaddings |
A number of loops to hoist the PadOp out for every operand.
Definition at line 325 of file Transforms.h.
Referenced by setHoistPaddings().
SmallVector<bool> mlir::linalg::LinalgPaddingOptions::nofoldFlags |
A flag for every operand to mark the PadOp as nofold which enables packing for statically shaped operands.
Definition at line 319 of file Transforms.h.
Referenced by setNofoldFlags().
SmallVector<int64_t> mlir::linalg::LinalgPaddingOptions::paddingDimensions |
A list of iterator dimensions to pad.
Definition at line 289 of file Transforms.h.
Referenced by setPaddingDimensions().
SmallVector<Attribute> mlir::linalg::LinalgPaddingOptions::paddingValues |
A padding value for every operand.
Definition at line 283 of file Transforms.h.
Referenced by setPaddingValues().
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 295 of file Transforms.h.
Referenced by setPadToMultipleOf().
DenseMap<std::pair<unsigned, unsigned>, OpFoldResult> mlir::linalg::LinalgPaddingOptions::sizeToPadTo |
A mapping between an operand and shape dim, and a size for a padding dimension.
Each size is expected to be greater or equal than the corresponding shape dim. If no value is provided then the constant upper bound will be used.
Definition at line 304 of file Transforms.h.
Referenced by getSizeToPadTo(), and setSizeToPadTo().
SmallVector<SmallVector<int64_t> > mlir::linalg::LinalgPaddingOptions::transposePaddings |
A permutation vector for every operand used to transpose the packed PadOp results.
Definition at line 332 of file Transforms.h.
Referenced by setTransposePaddings().