MLIR
19.0.0git
|
Functions | |
std::unique_ptr< Pass > | createEnableArmStreamingPass (const ArmStreamingMode=ArmStreamingMode::Streaming, const ArmZaMode=ArmZaMode::Disabled, bool onlyIfRequiredByOps=false) |
Pass to enable Armv9 Streaming SVE mode. More... | |
std::unique_ptr< Pass > | createTileAllocationPass () |
Pass that allocates tile IDs to ArmSME operations. More... | |
std::unique_ptr< Pass > | createOuterProductFusionPass () |
Pass that fuses 'arm_sme.outerproduct' ops into 2-way or 4-way widening variants. More... | |
std::unique_ptr< Pass > | createVectorLegalizationPass () |
Pass that legalizes vectors so they can be lowered to ArmSME. More... | |
void | populateOuterProductFusionPatterns (RewritePatternSet &patterns) |
unsigned | getSMETileSliceMinNumElts (Type type) |
Return minimum number of elements for the given element type in a vector of SVL bits. More... | |
bool | isValidSMETileElementType (Type type) |
Returns true if type is a valid element type for an SME tile or false otherwise. More... | |
bool | isValidSMETileVectorType (VectorType vType) |
Returns true if vType is a valid vector type for an SME tile or false otherwise. More... | |
std::optional< ArmSMETileType > | getSMETileType (VectorType) |
Returns the type of SME tile this vector type corresponds to, or none if the vector type does not fit within an SME tile. More... | |
LogicalResult | verifyOperationHasValidTileId (Operation *) |
Verifies the tile ID (if set) on this tile operation is valid. More... | |
scf::ForOp | createLoopOverTileSlices (PatternRewriter &rewriter, Location loc, Value initTile, std::function< Value(OpBuilder &, Location, Value, Value)> makeLoopBody) |
Generates a for loop over ZA tile slices where the induction variable is the tile slice index and each iteration yields a new tile. More... | |
bool | isMultipleOfSMETileVectorType (VectorType vType) |
Returns true if vType is a multiple of an SME tile size. More... | |
VectorType | getSMETileTypeForElement (Type elementType) |
Creates a vector type for the SME tile of elementType . More... | |
Variables | |
static constexpr unsigned | kInMemoryTileIdBase = 16 |
constexpr unsigned | MinStreamingVectorLengthInBits = 128 |
std::unique_ptr< Pass > mlir::arm_sme::createEnableArmStreamingPass | ( | const ArmStreamingMode | streamingMode = ArmStreamingMode::Streaming , |
const ArmZaMode | zaMode = ArmZaMode::Disabled , |
||
bool | onlyIfRequiredByOps = false |
||
) |
Pass to enable Armv9 Streaming SVE mode.
Definition at line 100 of file EnableArmStreaming.cpp.
scf::ForOp mlir::arm_sme::createLoopOverTileSlices | ( | PatternRewriter & | rewriter, |
Location | loc, | ||
Value | initTile, | ||
std::function< Value(OpBuilder &, Location, Value, Value)> | makeLoopBody | ||
) |
Generates a for loop over ZA tile slices where the induction variable is the tile slice index and each iteration yields a new tile.
Loop body is built via makeLoopBody
, which returns the next tile value.
Definition at line 75 of file Utils.cpp.
References mlir::OpBuilder::create(), mlir::Builder::getIndexType(), mlir::Value::getType(), and mlir::OpBuilder::setInsertionPointToStart().
std::unique_ptr< Pass > mlir::arm_sme::createOuterProductFusionPass | ( | ) |
Pass that fuses 'arm_sme.outerproduct' ops into 2-way or 4-way widening variants.
Definition at line 583 of file OuterProductFusion.cpp.
std::unique_ptr< Pass > mlir::arm_sme::createTileAllocationPass | ( | ) |
Pass that allocates tile IDs to ArmSME operations.
Definition at line 306 of file TileAllocation.cpp.
std::unique_ptr< Pass > mlir::arm_sme::createVectorLegalizationPass | ( | ) |
Pass that legalizes vectors so they can be lowered to ArmSME.
Definition at line 654 of file VectorLegalization.cpp.
unsigned mlir::arm_sme::getSMETileSliceMinNumElts | ( | Type | type | ) |
Return minimum number of elements for the given element type
in a vector of SVL bits.
Definition at line 18 of file Utils.cpp.
References mlir::Type::getIntOrFloatBitWidth(), isValidSMETileElementType(), and MinStreamingVectorLengthInBits.
Referenced by getSMETileTypeForElement(), isMultipleOfSMETileVectorType(), and isValidSMETileVectorType().
std::optional< ArmSMETileType > mlir::arm_sme::getSMETileType | ( | VectorType | type | ) |
Returns the type of SME tile this vector type corresponds to, or none if the vector type does not fit within an SME tile.
Definition at line 44 of file Utils.cpp.
References isValidSMETileVectorType().
VectorType mlir::arm_sme::getSMETileTypeForElement | ( | Type | elementType | ) |
Creates a vector type for the SME tile of elementType
.
Definition at line 114 of file Utils.cpp.
References mlir::get(), and getSMETileSliceMinNumElts().
bool mlir::arm_sme::isMultipleOfSMETileVectorType | ( | VectorType | vType | ) |
Returns true if vType
is a multiple of an SME tile size.
Returns false if the vType
exactly matches the size of an SME tile.
Definition at line 97 of file Utils.cpp.
References getSMETileSliceMinNumElts(), and isValidSMETileElementType().
bool mlir::arm_sme::isValidSMETileElementType | ( | Type | type | ) |
Returns true if type
is a valid element type for an SME tile or false otherwise.
Definition at line 23 of file Utils.cpp.
References mlir::Type::isBF16(), mlir::Type::isF128(), mlir::Type::isF16(), mlir::Type::isF32(), mlir::Type::isF64(), and mlir::Type::isInteger().
Referenced by getSMETileSliceMinNumElts(), isMultipleOfSMETileVectorType(), and isValidSMETileVectorType().
bool mlir::arm_sme::isValidSMETileVectorType | ( | VectorType | vType | ) |
Returns true if vType
is a valid vector type for an SME tile or false otherwise.
Definition at line 29 of file Utils.cpp.
References getSMETileSliceMinNumElts(), and isValidSMETileElementType().
Referenced by getSMETileType(), and mlir::populateArmSMEToLLVMConversionPatterns().
void mlir::arm_sme::populateOuterProductFusionPatterns | ( | RewritePatternSet & | patterns | ) |
Definition at line 574 of file OuterProductFusion.cpp.
References mlir::RewritePatternSet::add(), and mlir::RewritePatternSet::getContext().
LogicalResult mlir::arm_sme::verifyOperationHasValidTileId | ( | Operation * | op | ) |
|
staticconstexpr |
|
constexpr |
Definition at line 31 of file Utils.h.
Referenced by getSMETileSliceMinNumElts().