9#ifndef MLIR_DIALECT_XEGPU_TRANSFORMS_TRANSFORMS_H
10#define MLIR_DIALECT_XEGPU_TRANSFORMS_TRANSFORMS_H
13#include "llvm/ADT/SmallVector.h"
14#include "llvm/Support/LogicalResult.h"
41 std::function<std::optional<SmallVector<int64_t>>(
Operation *op)>;
static llvm::ManagedStatic< PassManagerOptions > options
Operation is the basic unit of execution within MLIR.
void populateXeGPUOptimizeBlockLoadsPatterns(RewritePatternSet &patterns)
Appends patterns for optimizing block load operations into patterns.
void populateXeGPUUnrollPatterns(RewritePatternSet &patterns, const UnrollOptions &options)
Collect a set of patterns to unroll xegpu operations to a smaller shapes.
void populateXeGPUMoveFuncBodyToWarpOpPatterns(RewritePatternSet &patterns)
Appends patterns for moving function body into gpu.warp_execute_on_lane0 op.
void populateXeGPUFoldAliasOpsPatterns(RewritePatternSet &patterns)
Appends patterns for folding aliasing ops into XeGPU ops into patterns.
void populateXeGPUWgToSgDistributePatterns(RewritePatternSet &patterns)
Appends patterns for XeGPU workgroup to subgroup distribution into patterns.
void populateXeGPUSubgroupDistributePatterns(RewritePatternSet &patterns)
Appends patterns for XeGPU SIMT distribution into patterns.
Include the generated interface declarations.
const FrozenRewritePatternSet & patterns
Options to control the XeGPU unrolling.
std::function< std::optional< SmallVector< int64_t > >(Operation *op)> NativeShapeFnType
Function that computes the target shape for unrolling.
NativeShapeFnType nativeShape
std::function< LogicalResult(Operation *op)> FilterConstraintFnType
Callback function that indicates whether vector unrolling should be attempted on the operation.
UnrollOptions & setNativeShapeFn(NativeShapeFnType fn)
UnrolledTypeFnType getUnrolledTypes
std::function< SmallVector< Type >( ShapedType type, ArrayRef< int64_t > tileShape, bool returnSingleType)> UnrolledTypeFnType
Function that converts a ShapedType (TensorDescType or VectorType) into the unrolled type based on th...
FilterConstraintFnType filterConstraint
UnrollOptions & setUnrolledTypesFn(UnrolledTypeFnType fn)
UnrollOptions & setFilterConstraint(FilterConstraintFnType constraint)