MLIR  16.0.0git
Classes | Namespaces | Enumerations | Functions
VectorRewritePatterns.h File Reference
#include <utility>
#include "mlir/Dialect/Vector/IR/VectorOps.h"
#include "mlir/Dialect/Vector/Utils/VectorUtils.h"
#include "mlir/IR/BuiltinOps.h"
#include "mlir/IR/PatternMatch.h"
+ Include dependency graph for VectorRewritePatterns.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  mlir::vector::VectorTransformsOptions
 Structure to control the behavior of vector transform patterns. More...
 
struct  mlir::vector::UnrollVectorOptions
 Options that control the vector unrolling. More...
 
struct  mlir::vector::VectorTransferFullPartialRewriter
 Apply splitFullAndPartialTransfer selectively via a pattern. More...
 
class  mlir::vector::ContractionOpToMatmulOpLowering
 Progressive lowering of a vector.contract a, b, c with row-major matmul semantics to:

%flattened_a = vector.shape_cast %a
%flattened_b = vector.shape_cast %b
%flattened_d = vector.matmul %flattened_a, %flattened_b
%d = vector.shape_cast %%flattened_d
%e = add %c, %d

vector.matmul later lowers to llvm.matrix.multiply. More...

 
class  mlir::vector::ContractionOpToOuterProductOpLowering
 Progressive lowering of a vector.contract a, b, c with row-major matmul semantics to a reduction_size-unrolled sequence: ``` at = vector.transpose a, [1, 0] bRow0 = vector.extract b[0] atRow0 = vector.extract at[0] c0 = vector.outerproduct atRow0, bRow0, c ... More...
 
class  mlir::vector::ContractionOpToDotLowering
 Progressive lowering of a vector.contract a, b, c with row-major matmul semantics to an output-size-unrolled sequence: ``` out = arith.constant ... More...
 
class  mlir::vector::ContractionOpLowering
 Progressive lowering of ContractionOp. More...
 

Namespaces

 mlir
 Include the generated interface declarations.
 
 mlir::vector
 

Enumerations

enum  mlir::vector::VectorTransposeLowering { mlir::vector::VectorTransposeLowering::EltWise = 0, mlir::vector::VectorTransposeLowering::Flat = 1, mlir::vector::VectorTransposeLowering::Shuffle = 2 }
 Enum to control the lowering of vector.transpose operations. More...
 
enum  mlir::vector::VectorMultiReductionLowering { mlir::vector::VectorMultiReductionLowering::InnerParallel = 0, mlir::vector::VectorMultiReductionLowering::InnerReduction = 1 }
 Enum to control the lowering of vector.multi_reduction operations. More...
 
enum  mlir::vector::VectorContractLowering { mlir::vector::VectorContractLowering::Dot = 0, mlir::vector::VectorContractLowering::Matmul = 1, mlir::vector::VectorContractLowering::OuterProduct = 2, mlir::vector::VectorContractLowering::ParallelArith = 3 }
 Enum to control the lowering of vector.contract operations. More...
 
enum  mlir::vector::VectorTransferSplit { mlir::vector::VectorTransferSplit::None = 0, mlir::vector::VectorTransferSplit::VectorTransfer = 1, mlir::vector::VectorTransferSplit::LinalgCopy = 2, mlir::vector::VectorTransferSplit::ForceInBounds = 3 }
 Enum to control the splitting of vector.transfer operations into in-bounds and out-of-bounds variants. More...
 

Functions

void mlir::vector::populateVectorTransposeLoweringPatterns (RewritePatternSet &patterns, VectorTransformsOptions options=VectorTransformsOptions())
 Insert TransposeLowering patterns into extraction/insertion. More...
 
void mlir::vector::populateVectorMultiReductionLoweringPatterns (RewritePatternSet &patterns, VectorMultiReductionLowering options)
 Collect a set of patterns to convert vector.multi_reduction op into a sequence of vector.reduction ops. More...
 
void mlir::vector::populateVectorContractLoweringPatterns (RewritePatternSet &patterns, VectorTransformsOptions options=VectorTransformsOptions())
 Collects patterns to progressively lower vector contraction ops on high-D into low-D reduction and product ops. More...
 
void mlir::vector::populateVectorReductionToContractPatterns (RewritePatternSet &patterns)
 Collect patterns to convert reduction op to vector.contract and fold transpose/broadcast ops into the contract. More...
 
void mlir::vector::populateVectorScanLoweringPatterns (RewritePatternSet &patterns)
 Collect patterns to convert scan op. More...
 
void mlir::vector::populateVectorTransferPermutationMapLoweringPatterns (RewritePatternSet &patterns)
 Collect a set of transfer read/write lowering patterns that simplify the permutation map (e.g., converting it to a minor identity map) by inserting broadcasts and transposes. More...
 
void mlir::vector::populateVectorTransferCollapseInnerMostContiguousDimsPatterns (RewritePatternSet &patterns)
 Collect a set of patterns to reduce the rank of the operands of vector transfer ops to operate on the largest contigious vector. More...
 
void mlir::vector::populateVectorInsertExtractStridedSliceDecompositionPatterns (RewritePatternSet &patterns)
 Populate patterns with the following patterns. More...
 
void mlir::vector::populateVectorInsertExtractStridedSliceTransforms (RewritePatternSet &patterns)
 Populate patterns with the following patterns. More...
 
void mlir::vector::populateVectorUnrollPatterns (RewritePatternSet &patterns, const UnrollVectorOptions &options)
 Collect a set of pattern to unroll vector operations to a smaller shapes. More...