For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).
Mojo struct
StandardTilePayload
struct StandardTilePayload[a_type: DType, b_type: DType, a_shape: IndexList[Int(2)], b_shape: IndexList[Int(2)], num_pipeline_stages: Int]
Tile payload for standard matmul (A and B tiles).
Uses explicit dimensions for tile arrays. The tiles are stored as TileTensor with row_major layout. TileTensors are passed directly to TMA/MMA. at TMA/MMA boundaries.
Parametersβ
- βa_type (
DType): Element type of the A operand tiles. - βb_type (
DType): Element type of the B operand tiles. - βa_shape (
IndexList[Int(2)]): A tile dimensions as(BM, BK). - βb_shape (
IndexList[Int(2)]): B tile dimensions as(BN, BK). - βnum_pipeline_stages (
Int): Number of pipeline buffer stages.
Fieldsβ
- βa_tiles (
StandardTilePayload[a_type, b_type, a_shape, b_shape, num_pipeline_stages].ATileArray): - βb_tiles (
StandardTilePayload[a_type, b_type, a_shape, b_shape, num_pipeline_stages].BTileArray):
Implemented traitsβ
AnyType,
Copyable,
ImplicitlyCopyable,
ImplicitlyDeletable,
Movable,
RegisterPassable,
TilePayload,
TrivialRegisterPassable
comptime membersβ
ATileβ
comptime ATile = StandardTilePayload[a_type, b_type, a_shape, b_shape, num_pipeline_stages].ATileArray.Tile
ATileArrayβ
comptime ATileArray = SMemTileArray2D[a_type, a_shape[Int(0)], a_shape[Int(1)], num_pipeline_stages]
BTileβ
comptime BTile = StandardTilePayload[a_type, b_type, a_shape, b_shape, num_pipeline_stages].BTileArray.Tile
BTileArrayβ
comptime BTileArray = SMemTileArray2D[b_type, b_shape[Int(0)], b_shape[Int(1)], num_pipeline_stages]
Methodsβ
__init__β
def __init__(a_tiles: SMemTileArray2D[a_type, a_shape[Int(0)], a_shape[Int(1)], num_pipeline_stages], b_tiles: SMemTileArray2D[b_type, b_shape[Int(0)], b_shape[Int(1)], num_pipeline_stages]) -> Self
get_tileβ
def get_tile[k_group_size: Int](self, stage: UInt32, k_idx: Int) -> Tuple[TileTensor[a_type, Layout[*?, *?], MutAnyOrigin, address_space=AddressSpace.SHARED], TileTensor[b_type, Layout[*?, *?], MutAnyOrigin, address_space=AddressSpace.SHARED]]
Get A and B tiles at the specified stage and k-group index.
Parameters:
- βk_group_size (
Int): Number of K-group tiles stored per pipeline stage.
Args:
- βstage (
UInt32): Pipeline stage index into the circular buffer. - βk_idx (
Int): K-group index within the current pipeline stage.
Returns:
get_a_tileβ
def get_a_tile[k_group_size: Int](self, stage: UInt32, k_idx: Int) -> Self.ATile
Get A tile at the specified stage and k-group index.
Parameters:
- βk_group_size (
Int): Number of K-group tiles stored per pipeline stage.
Args:
- βstage (
UInt32): Pipeline stage index into the circular buffer. - βk_idx (
Int): K-group index within the current pipeline stage.
Returns:
Self.ATile
get_b_tileβ
def get_b_tile[k_group_size: Int](self, stage: UInt32, k_idx: Int) -> Self.BTile
Get B tile at the specified stage and k-group index.
Parameters:
- βk_group_size (
Int): Number of K-group tiles stored per pipeline stage.
Args:
- βstage (
UInt32): Pipeline stage index into the circular buffer. - βk_idx (
Int): K-group index within the current pipeline stage.
Returns:
Self.BTile
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!