9 #ifndef MLIR_DIALECT_XEGPU_TRANSFORMS_TRANSFORMS_H
10 #define MLIR_DIALECT_XEGPU_TRANSFORMS_TRANSFORMS_H
12 #include "llvm/ADT/SmallVector.h"
13 #include "llvm/Support/LogicalResult.h"
21 class RewritePatternSet;
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 populateXeGPUUnrollPatterns(RewritePatternSet &patterns, const UnrollOptions &options)
Collect a set of patterns to unroll xegpu operations to a smaller shapes.
void populateXeGPUFoldAliasOpsPatterns(RewritePatternSet &patterns)
Appends patterns for folding aliasing ops into XeGPU ops into patterns.
void populateXeGPUWgToSgDistributePatterns(RewritePatternSet &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< SmallVector< Type >(ShapedType type, ArrayRef< int64_t > tileShape)> UnrolledTypeFnType
Function that converts a ShapedType (TensorDescType or VectorType) into the unrolled type based on th...
UnrollOptions & setFilterConstraint(FilterConstraintFnType constraint)
std::function< std::optional< SmallVector< int64_t > >(Operation *op)> NativeShapeFnType
Function that computes the target shape for unrolling.
UnrollOptions & setUnrolledTypesFn(UnrolledTypeFnType fn)
NativeShapeFnType nativeShape
std::function< LogicalResult(Operation *op)> FilterConstraintFnType
Callback function that indicates whether vector unrolling should be attempted on the operation.
UnrolledTypeFnType getUnrolledTypes
FilterConstraintFnType filterConstraint
UnrollOptions & setNativeShapeFn(NativeShapeFnType fn)