MLIR 22.0.0git
mlir::xegpu::UnrollOptions Struct Reference

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.
using NativeShapeFnType
 Function that computes the target shape for unrolling.
using UnrolledTypeFnType
 Function that converts a ShapedType (TensorDescType or VectorType) into the unrolled type based on the tileShape.

Public Member Functions

UnrollOptionssetFilterConstraint (FilterConstraintFnType constraint)
UnrollOptionssetNativeShapeFn (NativeShapeFnType fn)
UnrollOptionssetUnrolledTypesFn (UnrolledTypeFnType fn)

Public Attributes

FilterConstraintFnType filterConstraint = nullptr
NativeShapeFnType nativeShape = nullptr
UnrolledTypeFnType getUnrolledTypes = nullptr

Detailed Description

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.

Member Typedef Documentation

◆ FilterConstraintFnType

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.

◆ NativeShapeFnType

Initial value:
std::function<std::optional<SmallVector<int64_t>>(Operation *op)>
Operation is the basic unit of execution within MLIR.
Definition Operation.h:88

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.

◆ UnrolledTypeFnType

Initial value:
std::function<SmallVector<Type>(
ShapedType type, ArrayRef<int64_t> tileShape, bool returnSingleType)>

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. When returnSingleType is true, it returns a vector containing only one single unrolled type.

Definition at line 53 of file Transforms.h.

Member Function Documentation

◆ setFilterConstraint()

UnrollOptions & mlir::xegpu::UnrollOptions::setFilterConstraint ( FilterConstraintFnType constraint)
inline

Definition at line 32 of file Transforms.h.

References filterConstraint.

◆ setNativeShapeFn()

UnrollOptions & mlir::xegpu::UnrollOptions::setNativeShapeFn ( NativeShapeFnType fn)
inline

Definition at line 43 of file Transforms.h.

References nativeShape.

◆ setUnrolledTypesFn()

UnrollOptions & mlir::xegpu::UnrollOptions::setUnrolledTypesFn ( UnrolledTypeFnType fn)
inline

Definition at line 56 of file Transforms.h.

References getUnrolledTypes.

Member Data Documentation

◆ filterConstraint

FilterConstraintFnType mlir::xegpu::UnrollOptions::filterConstraint = nullptr

Definition at line 31 of file Transforms.h.

Referenced by setFilterConstraint().

◆ getUnrolledTypes

UnrolledTypeFnType mlir::xegpu::UnrollOptions::getUnrolledTypes = nullptr

Definition at line 55 of file Transforms.h.

Referenced by setUnrolledTypesFn().

◆ nativeShape

NativeShapeFnType mlir::xegpu::UnrollOptions::nativeShape = nullptr

Definition at line 42 of file Transforms.h.

Referenced by setNativeShapeFn().


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