|
MLIR 24.0.0git
|
Options that control the vector unrolling. More...
#include "mlir/Dialect/Vector/Transforms/VectorRewritePatterns.h"
Public Types | |
| using | FilterConstraintFnType = std::function<LogicalResult(Operation *op)> |
| using | NativeShapeFnType |
| using | UnrollTraversalOrderFnType |
| Function that returns the traversal order (in terms of "for loop order", i.e. | |
Public Member Functions | |
| UnrollVectorOptions & | setFilterConstraint (FilterConstraintFnType constraint) |
| UnrollVectorOptions & | setNativeShapeFn (NativeShapeFnType fn) |
| UnrollVectorOptions & | setNativeShape (ArrayRef< int64_t > shape) |
| Set the native shape to use for unrolling. | |
| UnrollVectorOptions & | setUnrollTraversalOrderFn (UnrollTraversalOrderFnType traversalOrderFn) |
Public Attributes | |
| FilterConstraintFnType | filterConstraint = nullptr |
| Callback function that indicates whether vector unrolling should be attempted on the operation. | |
| NativeShapeFnType | nativeShape = nullptr |
| Function that returns the shape of the vector to unroll to for a given operation. | |
| UnrollTraversalOrderFnType | traversalOrderCallback = nullptr |
| SmallVector< int64_t > | unrollOrderForContractOp = {} |
| Unrolling order for ContractionOp. | |
| bool | reverseDefaultTraversalOrder = false |
| Controls whether to reverse the unrolling order. | |
Options that control the vector unrolling.
Definition at line 36 of file VectorRewritePatterns.h.
| using mlir::vector::UnrollVectorOptions::FilterConstraintFnType = std::function<LogicalResult(Operation *op)> |
Definition at line 37 of file VectorRewritePatterns.h.
Definition at line 46 of file VectorRewritePatterns.h.
Function that returns the traversal order (in terms of "for loop order", i.e.
slowest varying dimension to fastest varying dimension) that should be used when unrolling the given operation into units of the native vector size.
Definition at line 70 of file VectorRewritePatterns.h.
|
inline |
Definition at line 41 of file VectorRewritePatterns.h.
References filterConstraint.
|
inline |
Set the native shape to use for unrolling.
Definition at line 58 of file VectorRewritePatterns.h.
References nativeShape.
|
inline |
Definition at line 52 of file VectorRewritePatterns.h.
References nativeShape.
Referenced by mlir::x86::populateVectorContractMultiLevelUnrollForAMXPatterns(), and mlir::spirv::unrollVectorsInFuncBodies().
|
inline |
Definition at line 74 of file VectorRewritePatterns.h.
References traversalOrderCallback.
| FilterConstraintFnType mlir::vector::UnrollVectorOptions::filterConstraint = nullptr |
Callback function that indicates whether vector unrolling should be attempted on the operation.
Definition at line 40 of file VectorRewritePatterns.h.
Referenced by setFilterConstraint().
| NativeShapeFnType mlir::vector::UnrollVectorOptions::nativeShape = nullptr |
Function that returns the shape of the vector to unroll to for a given operation.
The unrolling is aborted if the function returns std::nullopt.
Definition at line 51 of file VectorRewritePatterns.h.
Referenced by setNativeShape(), and setNativeShapeFn().
Controls whether to reverse the unrolling order.
Definition at line 85 of file VectorRewritePatterns.h.
| UnrollTraversalOrderFnType mlir::vector::UnrollVectorOptions::traversalOrderCallback = nullptr |
Definition at line 72 of file VectorRewritePatterns.h.
Referenced by setUnrollTraversalOrderFn().
| SmallVector<int64_t> mlir::vector::UnrollVectorOptions::unrollOrderForContractOp = {} |
Unrolling order for ContractionOp.
In general, this could be used by any other Op, but in practice it isn't and the name reflects that. The user is responsible for making sure that the number of indices matches the number of loops to be unrolled.
Definition at line 83 of file VectorRewritePatterns.h.