MLIR
20.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 = std::function< std::optional< SmallVector< int64_t > >(Operation *op)> |
using | UnrollTraversalOrderFnType = std::function< std::optional< SmallVector< int64_t > >(Operation *op)> |
Function that returns the traversal order (in terms of "for loop order", i.e. More... | |
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. More... | |
UnrollVectorOptions & | setUnrollTraversalOrderFn (UnrollTraversalOrderFnType traversalOrderFn) |
Public Attributes | |
FilterConstraintFnType | filterConstraint = nullptr |
Callback function that indicates whether vector unrolling should be attempted on the operation. More... | |
NativeShapeFnType | nativeShape = nullptr |
Function that returns the shape of the vector to unroll to for a given operation. More... | |
UnrollTraversalOrderFnType | traversalOrderCallback = nullptr |
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.
using mlir::vector::UnrollVectorOptions::NativeShapeFnType = std::function<std::optional<SmallVector<int64_t> >(Operation *op)> |
Definition at line 46 of file VectorRewritePatterns.h.
using mlir::vector::UnrollVectorOptions::UnrollTraversalOrderFnType = std::function<std::optional<SmallVector<int64_t> >(Operation *op)> |
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::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().
UnrollTraversalOrderFnType mlir::vector::UnrollVectorOptions::traversalOrderCallback = nullptr |
Definition at line 72 of file VectorRewritePatterns.h.
Referenced by setUnrollTraversalOrderFn().