MLIR
21.0.0git
|
Options to control the XeGPU unrolling. More...
#include "mlir/Dialect/XeGPU/Transforms/Transforms.h"
Public Types | |
using | FilterConstraintFnType = std::function< LogicalResult(Operation *op)> |
Callback function that indicates whether vector unrolling should be attempted on the operation. More... | |
using | NativeShapeFnType = std::function< std::optional< SmallVector< int64_t > >(Operation *op)> |
Function that computes the target shape for unrolling. More... | |
using | UnrolledTypeFnType = std::function< SmallVector< Type >(ShapedType type, ArrayRef< int64_t > tileShape)> |
Function that converts a ShapedType (TensorDescType or VectorType) into the unrolled type based on the tileShape. More... | |
Public Member Functions | |
UnrollOptions & | setFilterConstraint (FilterConstraintFnType constraint) |
UnrollOptions & | setNativeShapeFn (NativeShapeFnType fn) |
UnrollOptions & | setUnrolledTypesFn (UnrolledTypeFnType fn) |
Public Attributes | |
FilterConstraintFnType | filterConstraint = nullptr |
NativeShapeFnType | nativeShape = nullptr |
UnrolledTypeFnType | getUnrolledTypes = nullptr |
Options to control the XeGPU unrolling.
Its main purpose is to provide a way to customize the native shape of the operation.
Definition at line 27 of file Transforms.h.
using mlir::xegpu::UnrollOptions::FilterConstraintFnType = std::function<LogicalResult(Operation *op)> |
Callback function that indicates whether vector unrolling should be attempted on the operation.
Definition at line 30 of file Transforms.h.
using mlir::xegpu::UnrollOptions::NativeShapeFnType = std::function<std::optional<SmallVector<int64_t> >(Operation *op)> |
Function that computes the target shape for unrolling.
It returns an optional vector of integers representing the shape. If it returns std::nullopt
, unrolling is aborted for the given operation.
Definition at line 40 of file Transforms.h.
using mlir::xegpu::UnrollOptions::UnrolledTypeFnType = std::function<SmallVector<Type>( ShapedType type, ArrayRef<int64_t> tileShape)> |
Function that converts a ShapedType (TensorDescType or VectorType) into the unrolled type based on the tileShape.
It returns a vector of types representing the unrolled types for simplicity.
Definition at line 51 of file Transforms.h.
|
inline |
Definition at line 32 of file Transforms.h.
References filterConstraint.
|
inline |
Definition at line 43 of file Transforms.h.
References nativeShape.
|
inline |
Definition at line 54 of file Transforms.h.
References getUnrolledTypes.
FilterConstraintFnType mlir::xegpu::UnrollOptions::filterConstraint = nullptr |
Definition at line 31 of file Transforms.h.
Referenced by setFilterConstraint().
UnrolledTypeFnType mlir::xegpu::UnrollOptions::getUnrolledTypes = nullptr |
Definition at line 53 of file Transforms.h.
Referenced by setUnrolledTypesFn().
NativeShapeFnType mlir::xegpu::UnrollOptions::nativeShape = nullptr |
Definition at line 42 of file Transforms.h.
Referenced by setNativeShapeFn().