MLIR 24.0.0git
VectorContractMultiLevelUnroll.cpp File Reference

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "x86-vector-contract-multi-level-unroll"

Functions

static void buildMNLoopBody (MLUCandidate &candidate, OpBuilder &b, Location loc, Value ivM, Value ivN)
static SmallVector< Value > buildKLoopBody (MLUCandidate &candidate, OpBuilder &b, Location loc, Value ivM, Value ivN, Value ivK, ValueRange iterArgs)
static bool isZeroVector (Value v)
static bool isSimpleTransferOp (VectorTransferOpInterface op)
static bool noMemoryEffectsBetween (Operation *start, Operation *end)
static Value makeRankReducingSubview (OpBuilder &b, Location loc, Value base, ValueRange indices, VectorType targetType)
static SmallVector< Value > slice (OpBuilder &b, Location loc, Value value, VectorType nativeType)
static Value splice (OpBuilder &b, Location loc, ValueRange values, VectorType regTileType)
static std::optional< SmallVector< int64_t > > getFromNativeShapeAttr (Operation *op)
static void setNativeShapeAttr (VectorTransferOpInterface op, VectorType nativeType)
static LogicalResult matchCanonicalMatmul (MLUCandidate &candidate, PatternRewriter &rewriter)
static LogicalResult matchTypesAndShape (MLUCandidate &candidate, const MatchTypesAndShapeFn &matchTypesAndShapeForTarget, PatternRewriter &rewriter)
static LogicalResult matchAccumulationLoop (MLUCandidate &candidate, PatternRewriter &rewriter)
static void makeAccInitializationBackedByMemory (MLUCandidate &candidate, PatternRewriter &rewriter)
static void makeAccResultBackedByMemory (MLUCandidate &candidate, PatternRewriter &rewriter)
static void buildLoopNestForCandidate (MLUCandidate &candidate, PatternRewriter &rewriter)
static LogicalResult matchTypesAndShapeForAMX (Type inputElemType, Type accumulatorElemType, bool isInVnniLayout, ArrayRef< int64_t > contractShape, SmallVectorImpl< int64_t > &contractRegTileShape, SmallVectorImpl< int64_t > &contractNativeShape)

Variables

static constexpr auto nativeShapeAttrName = "x86_vcmlu_native_shape"

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "x86-vector-contract-multi-level-unroll"

Definition at line 21 of file VectorContractMultiLevelUnroll.cpp.

Function Documentation

◆ buildKLoopBody()

SmallVector< Value > buildKLoopBody ( MLUCandidate & candidate,
OpBuilder & b,
Location loc,
Value ivM,
Value ivN,
Value ivK,
ValueRange iterArgs )
static

◆ buildLoopNestForCandidate()

void buildLoopNestForCandidate ( MLUCandidate & candidate,
PatternRewriter & rewriter )
static

◆ buildMNLoopBody()

void buildMNLoopBody ( MLUCandidate & candidate,
OpBuilder & b,
Location loc,
Value ivM,
Value ivN )
static

◆ getFromNativeShapeAttr()

std::optional< SmallVector< int64_t > > getFromNativeShapeAttr ( Operation * op)
static

◆ isSimpleTransferOp()

bool isSimpleTransferOp ( VectorTransferOpInterface op)
static

◆ isZeroVector()

bool isZeroVector ( Value v)
static

◆ makeAccInitializationBackedByMemory()

◆ makeAccResultBackedByMemory()

◆ makeRankReducingSubview()

Value makeRankReducingSubview ( OpBuilder & b,
Location loc,
Value base,
ValueRange indices,
VectorType targetType )
static

◆ matchAccumulationLoop()

LogicalResult matchAccumulationLoop ( MLUCandidate & candidate,
PatternRewriter & rewriter )
static

◆ matchCanonicalMatmul()

LogicalResult matchCanonicalMatmul ( MLUCandidate & candidate,
PatternRewriter & rewriter )
static

◆ matchTypesAndShape()

LogicalResult matchTypesAndShape ( MLUCandidate & candidate,
const MatchTypesAndShapeFn & matchTypesAndShapeForTarget,
PatternRewriter & rewriter )
static

◆ matchTypesAndShapeForAMX()

LogicalResult matchTypesAndShapeForAMX ( Type inputElemType,
Type accumulatorElemType,
bool isInVnniLayout,
ArrayRef< int64_t > contractShape,
SmallVectorImpl< int64_t > & contractRegTileShape,
SmallVectorImpl< int64_t > & contractNativeShape )
static

◆ noMemoryEffectsBetween()

◆ setNativeShapeAttr()

void setNativeShapeAttr ( VectorTransferOpInterface op,
VectorType nativeType )
static

◆ slice()

◆ splice()

Value splice ( OpBuilder & b,
Location loc,
ValueRange values,
VectorType regTileType )
static

Definition at line 197 of file VectorContractMultiLevelUnroll.cpp.

References b, mlir::ValueRange::getTypes(), and result.

Referenced by buildKLoopBody(), and buildMNLoopBody().

Variable Documentation

◆ nativeShapeAttrName

auto nativeShapeAttrName = "x86_vcmlu_native_shape"
staticconstexpr