MLIR  19.0.0git
Public Types | Public Member Functions | Public Attributes | List of all members
mlir::vector::UnrollVectorOptions Struct Reference

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

UnrollVectorOptionssetFilterConstraint (FilterConstraintFnType constraint)
 
UnrollVectorOptionssetNativeShapeFn (NativeShapeFnType fn)
 
UnrollVectorOptionssetNativeShape (ArrayRef< int64_t > shape)
 Set the native shape to use for unrolling. More...
 
UnrollVectorOptionssetUnrollTraversalOrderFn (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
 

Detailed Description

Options that control the vector unrolling.

Definition at line 37 of file VectorRewritePatterns.h.

Member Typedef Documentation

◆ FilterConstraintFnType

Definition at line 38 of file VectorRewritePatterns.h.

◆ NativeShapeFnType

using mlir::vector::UnrollVectorOptions::NativeShapeFnType = std::function<std::optional<SmallVector<int64_t> >(Operation *op)>

Definition at line 47 of file VectorRewritePatterns.h.

◆ UnrollTraversalOrderFnType

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 71 of file VectorRewritePatterns.h.

Member Function Documentation

◆ setFilterConstraint()

UnrollVectorOptions& mlir::vector::UnrollVectorOptions::setFilterConstraint ( FilterConstraintFnType  constraint)
inline

Definition at line 42 of file VectorRewritePatterns.h.

References filterConstraint.

◆ setNativeShape()

UnrollVectorOptions& mlir::vector::UnrollVectorOptions::setNativeShape ( ArrayRef< int64_t >  shape)
inline

Set the native shape to use for unrolling.

Definition at line 59 of file VectorRewritePatterns.h.

References nativeShape.

◆ setNativeShapeFn()

UnrollVectorOptions& mlir::vector::UnrollVectorOptions::setNativeShapeFn ( NativeShapeFnType  fn)
inline

Definition at line 53 of file VectorRewritePatterns.h.

References nativeShape.

◆ setUnrollTraversalOrderFn()

UnrollVectorOptions& mlir::vector::UnrollVectorOptions::setUnrollTraversalOrderFn ( UnrollTraversalOrderFnType  traversalOrderFn)
inline

Definition at line 75 of file VectorRewritePatterns.h.

References traversalOrderCallback.

Member Data Documentation

◆ filterConstraint

FilterConstraintFnType mlir::vector::UnrollVectorOptions::filterConstraint = nullptr

Callback function that indicates whether vector unrolling should be attempted on the operation.

Definition at line 41 of file VectorRewritePatterns.h.

Referenced by setFilterConstraint().

◆ nativeShape

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 52 of file VectorRewritePatterns.h.

Referenced by setNativeShape(), and setNativeShapeFn().

◆ traversalOrderCallback

UnrollTraversalOrderFnType mlir::vector::UnrollVectorOptions::traversalOrderCallback = nullptr

Definition at line 73 of file VectorRewritePatterns.h.

Referenced by setUnrollTraversalOrderFn().


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