Mojo struct
BlockScaledTilePayload
@register_passable(trivial)
struct BlockScaledTilePayload[a_type: DType, b_type: DType, sfa_type: DType, sfb_type: DType, a_tile_layout: Layout, b_tile_layout: Layout, sfa_tile_layout: Layout, sfb_tile_layout: Layout, num_pipeline_stages: Int]
Tile payload for block-scaled matmul (A, B, SFA, SFB tiles).
Fields
- a_tiles (
BlockScaledTilePayload[a_type, b_type, sfa_type, sfb_type, a_tile_layout, b_tile_layout, sfa_tile_layout, sfb_tile_layout, num_pipeline_stages].ATileArray): - b_tiles (
BlockScaledTilePayload[a_type, b_type, sfa_type, sfb_type, a_tile_layout, b_tile_layout, sfa_tile_layout, sfb_tile_layout, num_pipeline_stages].BTileArray): - sfa_tiles (
BlockScaledTilePayload[a_type, b_type, sfa_type, sfb_type, a_tile_layout, b_tile_layout, sfa_tile_layout, sfb_tile_layout, num_pipeline_stages].SFATileArray): - sfb_tiles (
BlockScaledTilePayload[a_type, b_type, sfa_type, sfb_type, a_tile_layout, b_tile_layout, sfa_tile_layout, sfb_tile_layout, num_pipeline_stages].SFBTileArray):
Implemented traits
AnyType,
Copyable,
ImplicitlyCopyable,
ImplicitlyDestructible,
Movable,
TilePayload
comptime members
__copyinit__is_trivial
comptime __copyinit__is_trivial = True
__del__is_trivial
comptime __del__is_trivial = True
__moveinit__is_trivial
comptime __moveinit__is_trivial = True
ATile
comptime ATile = BlockScaledTilePayload[a_type, b_type, sfa_type, sfb_type, a_tile_layout, b_tile_layout, sfa_tile_layout, sfb_tile_layout, num_pipeline_stages].ATileArray.Tile
ATileArray
comptime ATileArray = SMemTileArrayType[a_type, a_tile_layout, num_pipeline_stages, 128]
BTile
comptime BTile = BlockScaledTilePayload[a_type, b_type, sfa_type, sfb_type, a_tile_layout, b_tile_layout, sfa_tile_layout, sfb_tile_layout, num_pipeline_stages].BTileArray.Tile
BTileArray
comptime BTileArray = SMemTileArrayType[b_type, b_tile_layout, num_pipeline_stages, 128]
SFATile
comptime SFATile = BlockScaledTilePayload[a_type, b_type, sfa_type, sfb_type, a_tile_layout, b_tile_layout, sfa_tile_layout, sfb_tile_layout, num_pipeline_stages].SFATileArray.Tile
SFATileArray
comptime SFATileArray = SMemTileArrayType[sfa_type, sfa_tile_layout, num_pipeline_stages, 128]
SFBTile
comptime SFBTile = BlockScaledTilePayload[a_type, b_type, sfa_type, sfb_type, a_tile_layout, b_tile_layout, sfa_tile_layout, sfb_tile_layout, num_pipeline_stages].SFBTileArray.Tile
SFBTileArray
comptime SFBTileArray = SMemTileArrayType[sfb_type, sfb_tile_layout, num_pipeline_stages, 128]
Methods
__init__
__init__(a_tiles: SMemTileArrayType[a_type, a_tile_layout, num_pipeline_stages, 128], b_tiles: SMemTileArrayType[b_type, b_tile_layout, num_pipeline_stages, 128], sfa_tiles: SMemTileArrayType[sfa_type, sfa_tile_layout, num_pipeline_stages, 128], sfb_tiles: SMemTileArrayType[sfb_type, sfb_tile_layout, num_pipeline_stages, 128]) -> Self
get_tile
get_tile[k_group_size: Int](self, stage: UInt32, k_idx: Int) -> Tuple[BlockScaledTilePayload[a_type, b_type, sfa_type, sfb_type, a_tile_layout, b_tile_layout, sfa_tile_layout, sfb_tile_layout, num_pipeline_stages].ATile, BlockScaledTilePayload[a_type, b_type, sfa_type, sfb_type, a_tile_layout, b_tile_layout, sfa_tile_layout, sfb_tile_layout, num_pipeline_stages].BTile, BlockScaledTilePayload[a_type, b_type, sfa_type, sfb_type, a_tile_layout, b_tile_layout, sfa_tile_layout, sfb_tile_layout, num_pipeline_stages].SFATile, BlockScaledTilePayload[a_type, b_type, sfa_type, sfb_type, a_tile_layout, b_tile_layout, sfa_tile_layout, sfb_tile_layout, num_pipeline_stages].SFBTile]
Get A, B, SFA, SFB tiles at the specified stage and k-group index.
Returns:
get_a_tile
get_a_tile[k_group_size: Int](self, stage: UInt32, k_idx: Int) -> BlockScaledTilePayload[a_type, b_type, sfa_type, sfb_type, a_tile_layout, b_tile_layout, sfa_tile_layout, sfb_tile_layout, num_pipeline_stages].ATile
Get A tile at the specified stage and k-group index.
Returns:
BlockScaledTilePayload
get_b_tile
get_b_tile[k_group_size: Int](self, stage: UInt32, k_idx: Int) -> BlockScaledTilePayload[a_type, b_type, sfa_type, sfb_type, a_tile_layout, b_tile_layout, sfa_tile_layout, sfb_tile_layout, num_pipeline_stages].BTile
Get B tile at the specified stage and k-group index.
Returns:
BlockScaledTilePayload
get_sfa_tile
get_sfa_tile[k_group_size: Int](self, stage: UInt32, k_idx: Int) -> BlockScaledTilePayload[a_type, b_type, sfa_type, sfb_type, a_tile_layout, b_tile_layout, sfa_tile_layout, sfb_tile_layout, num_pipeline_stages].SFATile
Get SFA tile at the specified stage and k-group index.
Returns:
BlockScaledTilePayload
get_sfb_tile
get_sfb_tile[k_group_size: Int](self, stage: UInt32, k_idx: Int) -> BlockScaledTilePayload[a_type, b_type, sfa_type, sfb_type, a_tile_layout, b_tile_layout, sfa_tile_layout, sfb_tile_layout, num_pipeline_stages].SFBTile
Get SFB tile at the specified stage and k-group index.
Returns:
BlockScaledTilePayload
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!