MLIR  21.0.0git
Public Types | Public Member Functions | Public Attributes | List of all members
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. 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

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

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.

◆ UnrolledTypeFnType

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.

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 54 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 53 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: