33 void transform::ApplyVectorToLLVMConversionPatternsOp::populatePatterns(
37 getReassociateFpReductions(), getForce_32bitVectorIndices());
41 transform::ApplyVectorToLLVMConversionPatternsOp::verifyTypeConverter(
42 transform::TypeConverterBuilderOpInterface builder) {
43 if (builder.getTypeConverterType() !=
"LLVMTypeConverter")
44 return emitOpError(
"expected LLVMTypeConverter");
52 void transform::ApplyCastAwayVectorLeadingOneDimPatternsOp::populatePatterns(
57 void transform::ApplyFoldArithExtensionPatternsOp::populatePatterns(
62 void transform::ApplyFoldElementwiseToVectorPatternsOp::populatePatterns(
67 void transform::ApplyVectorReductionToContractPatternsOp::populatePatterns(
73 void transform::ApplyLowerCreateMaskPatternsOp::populatePatterns(
78 void transform::ApplyRankReducingSubviewPatternsOp::populatePatterns(
83 void transform::ApplyTransferPermutationPatternsOp::populatePatterns(
88 void transform::ApplyDropUnitDimWithShapeCastPatternsOp::populatePatterns(
93 void transform::ApplyLowerBitCastPatternsOp::populatePatterns(
98 void transform::ApplyLowerBroadcastPatternsOp::populatePatterns(
103 void transform::ApplyLowerContractionPatternsOp::populatePatterns(
112 void transform::ApplyLowerMasksPatternsOp::populatePatterns(
117 void transform::ApplyLowerMaskedTransfersPatternsOp::populatePatterns(
122 void transform::ApplyMaterializeMasksPatternsOp::populatePatterns(
128 void transform::ApplyLowerMultiReductionPatternsOp::populatePatterns(
136 void transform::ApplyLowerOuterProductPatternsOp::populatePatterns(
141 void transform::ApplyLowerGatherPatternsOp::populatePatterns(
146 void transform::ApplyLowerScanPatternsOp::populatePatterns(
151 void transform::ApplyLowerShapeCastPatternsOp::populatePatterns(
156 void transform::ApplyLowerTransferPatternsOp::populatePatterns(
159 getMaxTransferRank());
162 void transform::ApplyLowerTransposePatternsOp::populatePatterns(
166 getLoweringStrategy()));
167 if (getAvx2LoweringStrategy()) {
168 auto avx2LoweringOptions =
172 .lower8x8xf32(
true));
174 patterns, avx2LoweringOptions, 10);
178 void transform::ApplyLowerInterleavePatternsOp::populatePatterns(
183 void transform::ApplyInterleaveToShufflePatternsOp::populatePatterns(
188 void transform::ApplyRewriteNarrowTypePatternsOp::populatePatterns(
194 void transform::ApplySplitTransferFullPartialPatternsOp::populatePatterns(
201 void transform::ApplyTransferToScfPatternsOp::populatePatterns(
217 class VectorTransformDialectExtension
219 VectorTransformDialectExtension> {
223 VectorTransformDialectExtension() {
224 declareGeneratedDialect<vector::VectorDialect>();
225 declareGeneratedDialect<LLVM::LLVMDialect>();
226 registerTransformOps<
228 #include "mlir/Dialect/Vector/TransformOps/VectorTransformOps.cpp.inc"
234 #define GET_OP_CLASSES
235 #include "mlir/Dialect/Vector/TransformOps/VectorTransformOps.cpp.inc"
#define MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(CLASS_NAME)
The DialectRegistry maps a dialect namespace to a constructor for the matching dialect.
void addExtensions()
Add the given extensions to the registry.
Conversion from types to the LLVM IR dialect.
Base class for extensions of the Transform dialect that supports injecting operations into the Transf...
void populateVectorTransferPermutationMapLoweringPatterns(RewritePatternSet &patterns, PatternBenefit benefit=1)
Collect a set of transfer read/write lowering patterns that simplify the permutation map (e....
void populateDropUnitDimWithShapeCastPatterns(RewritePatternSet &patterns, PatternBenefit benefit=1)
Collect a set of patterns that use vector.shape_cast to help fold unit dims.
void populateVectorNarrowTypeRewritePatterns(RewritePatternSet &patterns, PatternBenefit benefit=1)
Appends patterns for rewriting vector operations over narrow types with ops over wider types.
void populateVectorTransposeLoweringPatterns(RewritePatternSet &patterns, VectorTransformsOptions options, PatternBenefit benefit=1)
Populate the pattern set with the following patterns:
void populateElementwiseToVectorOpsPatterns(RewritePatternSet &patterns)
Collect a set of patterns that fold elementwise op on vectors to the vector dialect.
void populateVectorInterleaveToShufflePatterns(RewritePatternSet &patterns, PatternBenefit benefit=1)
void populateVectorShapeCastLoweringPatterns(RewritePatternSet &patterns, PatternBenefit benefit=1)
Populate the pattern set with the following patterns:
void populateVectorGatherLoweringPatterns(RewritePatternSet &patterns, PatternBenefit benefit=1)
Populate the pattern set with the following patterns:
void populateVectorTransferLoweringPatterns(RewritePatternSet &patterns, std::optional< unsigned > maxTransferRank=std::nullopt, PatternBenefit benefit=1)
Populate the pattern set with the following patterns:
void populateVectorTransferDropUnitDimsPatterns(RewritePatternSet &patterns, PatternBenefit benefit=1)
Collect a set of one dimension removal patterns.
void registerTransformDialectExtension(DialectRegistry ®istry)
void populateFoldArithExtensionPatterns(RewritePatternSet &patterns)
Collect a set of patterns that fold arithmetic extension on floating point into vector contract for t...
void populateSinkVectorOpsPatterns(RewritePatternSet &patterns, PatternBenefit benefit=1)
Patterns that remove redundant Vector Ops by re-ordering them with e.g.
void populateVectorBroadcastLoweringPatterns(RewritePatternSet &patterns, PatternBenefit benefit=1)
Populate the pattern set with the following patterns:
void populateVectorBitCastLoweringPatterns(RewritePatternSet &patterns, int64_t targetRank=1, PatternBenefit benefit=1)
Populates the pattern set with the following patterns:
void populateVectorMaskMaterializationPatterns(RewritePatternSet &patterns, bool force32BitVectorIndices, PatternBenefit benefit=1)
These patterns materialize masks for various vector ops such as transfers.
void populateVectorOuterProductLoweringPatterns(RewritePatternSet &patterns, PatternBenefit benefit=1)
Populate the pattern set with the following patterns:
void populateVectorMaskOpLoweringPatterns(RewritePatternSet &patterns, PatternBenefit benefit=1)
Populate the pattern set with the following patterns:
void populateVectorMultiReductionLoweringPatterns(RewritePatternSet &patterns, VectorMultiReductionLowering options, PatternBenefit benefit=1)
Collect a set of patterns to convert vector.multi_reduction op into a sequence of vector....
void populateVectorReductionToContractPatterns(RewritePatternSet &patterns, PatternBenefit benefit=1)
Collect patterns to convert reduction op to vector.contract and fold transpose/broadcast ops into the...
void populateVectorContractLoweringPatterns(RewritePatternSet &patterns, VectorTransformsOptions options, PatternBenefit benefit=1, bool disableOuterProductLowering=false)
Populate the pattern set with the following patterns:
void populateVectorTransferFullPartialPatterns(RewritePatternSet &patterns, const VectorTransformsOptions &options)
Populate patterns with the following patterns.
void populateVectorMaskLoweringPatternsForSideEffectingOps(RewritePatternSet &patterns)
Populates instances of MaskOpRewritePattern to lower masked operations with vector....
void populateVectorInterleaveLoweringPatterns(RewritePatternSet &patterns, int64_t targetRank=1, PatternBenefit benefit=1)
Populate the pattern set with the following patterns:
void populateCastAwayVectorLeadingOneDimPatterns(RewritePatternSet &patterns, PatternBenefit benefit=1)
Collect a set of leading one dimension removal patterns.
void populateVectorTransposeNarrowTypeRewritePatterns(RewritePatternSet &patterns, PatternBenefit benefit=1)
Appends patterns for emulating a sub-byte vector transpose.
void populateVectorScanLoweringPatterns(RewritePatternSet &patterns, PatternBenefit benefit=1)
Populate the pattern set with the following patterns:
void populateSpecializedTransposeLoweringPatterns(RewritePatternSet &patterns, LoweringOptions options=LoweringOptions(), int benefit=10)
Insert specialized transpose lowering patterns.
Include the generated interface declarations.
void populateVectorToSCFConversionPatterns(RewritePatternSet &patterns, const VectorTransferToSCFOptions &options=VectorTransferToSCFOptions())
Collect a set of patterns to convert from the Vector dialect to SCF + func.
void populateVectorToLLVMConversionPatterns(const LLVMTypeConverter &converter, RewritePatternSet &patterns, bool reassociateFPReductions=false, bool force32BitVectorIndices=false)
Collect a set of patterns to convert from the Vector dialect to LLVM.
When lowering an N-d vector transfer op to an (N-1)-d vector transfer op, a temporary buffer is creat...
VectorTransferToSCFOptions & enableFullUnroll(bool u=true)
VectorTransferToSCFOptions & setTargetRank(unsigned r)
Options for controlling specialized AVX2 lowerings.
LoweringOptions & setTransposeOptions(TransposeLoweringOptions options)
Structure to control the behavior of specialized AVX2 transpose lowering.