9#ifndef MLIR_DIALECT_XEGPU_TRANSFORMS_TRANSFORMS_H
10#define MLIR_DIALECT_XEGPU_TRANSFORMS_TRANSFORMS_H
15#include "llvm/ADT/SmallVector.h"
16#include "llvm/Support/LogicalResult.h"
43 std::function<std::optional<SmallVector<int64_t>>(
Operation *op)>;
static llvm::ManagedStatic< PassManagerOptions > options
Operation is the basic unit of execution within MLIR.
void populateXeGPUArrayLengthOptimizationPatterns(RewritePatternSet &patterns)
Appends patterns for array length optimization into patterns.
void populateXeGPUSgToLaneDistributeTypeConversionAndLegality(TypeConverter &typeConverter, RewritePatternSet &patterns, ConversionTarget &target, Operation *topLevelOp)
Defines type conversions and legality for XeGPU subgroup to lane distribution and appends the require...
void populateXeGPUUnrollPatterns(RewritePatternSet &patterns, const UnrollOptions &options)
Collect a set of patterns to unroll xegpu operations to a smaller shapes.
void populateXeGPUWgToSgDistributeTypeConversions(TypeConverter &converter, Operation *topLevelOp)
Define the type conversions needed for XeGPU workgroup to subgroup distribution.
void populateXeGPUMoveFuncBodyToWarpOpPatterns(RewritePatternSet &patterns)
Appends patterns for moving function body into gpu.warp_execute_on_lane0 op.
void populateXeGPUWgToSgDistributePatterns(RewritePatternSet &patterns)
Appends patterns for XeGPU workgroup to subgroup distribution into patterns.
void populateXeGPUSgToLaneDistributeTypeConversions(TypeConverter &typeConverter, Operation *topLevelOp)
Define only the type conversions needed for XeGPU subgroup to lane distribution.
void populateXeGPUPeepHoleOptimizerPatterns(RewritePatternSet &patterns)
Appends patterns for optimizing block load operations into patterns.
void populateXeGPUSubgroupDistributePatterns(RewritePatternSet &patterns)
Appends patterns for XeGPU SIMT distribution into patterns.
Include the generated interface declarations.
Options to control the XeGPU unrolling.
std::function< std::optional< SmallVector< int64_t > >(Operation *op)> NativeShapeFnType
Function that computes the target shape for unrolling.
std::function< SmallVector< Type >( ShapedType type, ArrayRef< int64_t > tileShape)> UnrolledTypeFnType
Function that converts a ShapedType (TensorDescType or VectorType) into the unrolled type based on th...
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
FilterConstraintFnType filterConstraint
UnrollOptions & setUnrolledTypesFn(UnrolledTypeFnType fn)
UnrollOptions & setFilterConstraint(FilterConstraintFnType constraint)