Mojo struct
BlockScaledSmem
struct BlockScaledSmem[a_type: DType, b_type: DType, c_type: DType, sfa_dtype: DType, sfb_dtype: DType, transpose_b: Bool, *, config: BlockScaledMatmulConfig[a_type, b_type, c_type, sfa_dtype, sfb_dtype, transpose_b]]
SMEM struct for block-scaled matmul with CLC scheduler pipeline.
Thin wrapper over BlockScaledTileCore + SmemPipelineBundle.
Fieldsβ
- βcore (
BlockScaledSmem[a_type, b_type, c_type, sfa_dtype, sfb_dtype, transpose_b, config=config].Core): - βpipelines (
BlockScaledSmem[a_type, b_type, c_type, sfa_dtype, sfb_dtype, transpose_b, config=config].Pipelines):
Implemented traitsβ
AnyType,
ImplicitlyDestructible
comptime membersβ
Coreβ
comptime Core = BlockScaledTileCore[a_type, b_type, c_type, sfa_dtype, sfb_dtype, transpose_b, config=config]
Pipelinesβ
comptime Pipelines = SmemPipelineBundle[BlockScaledSmem[a_type, b_type, c_type, sfa_dtype, sfb_dtype, transpose_b, config=config].Core.num_group_pipeline_stages, BlockScaledSmem[a_type, b_type, c_type, sfa_dtype, sfb_dtype, transpose_b, config=config].Core.num_accum_pipeline_stages, config.num_clc_pipeline_stages, BlockScaledTilePayload[a_type, b_type, sfa_dtype, sfb_dtype, IndexList(BlockScaledTileCore[a_type, b_type, c_type, sfa_dtype, sfb_dtype, transpose_b, config=config].BM, BlockScaledTileCore[a_type, b_type, c_type, sfa_dtype, sfb_dtype, transpose_b, config=config].BK, __list_literal__=NoneType(None)), IndexList(BlockScaledTileCore[a_type, b_type, c_type, sfa_dtype, sfb_dtype, transpose_b, config=config].BN, BlockScaledTileCore[a_type, b_type, c_type, sfa_dtype, sfb_dtype, transpose_b, config=config].BK, __list_literal__=NoneType(None)), IndexList(BlockScaledTileCore[a_type, b_type, c_type, sfa_dtype, sfb_dtype, transpose_b, config=config].SFA_DIM0, BlockScaledTileCore[a_type, b_type, c_type, sfa_dtype, sfb_dtype, transpose_b, config=config].SFA_DIM1, __list_literal__=NoneType(None)), IndexList(BlockScaledTileCore[a_type, b_type, c_type, sfa_dtype, sfb_dtype, transpose_b, config=config].SFB_DIM0, BlockScaledTileCore[a_type, b_type, c_type, sfa_dtype, sfb_dtype, transpose_b, config=config].SFB_DIM1, __list_literal__=NoneType(None)), BlockScaledTileCore[a_type, b_type, c_type, sfa_dtype, sfb_dtype, transpose_b, config=config].num_pipeline_stages]]
Methodsβ
a_tilesβ
a_tiles(ref[AddressSpace._value] self) -> BlockScaledSmem[a_type, b_type, c_type, sfa_dtype, sfb_dtype, transpose_b, config=config].Core.ATileArray
Get A tile array accessor.
Returns:
BlockScaledSmem[a_type, b_type, c_type, sfa_dtype, sfb_dtype, transpose_b, config=config].Core.ATileArray
b_tilesβ
b_tiles(ref[AddressSpace._value] self) -> BlockScaledSmem[a_type, b_type, c_type, sfa_dtype, sfb_dtype, transpose_b, config=config].Core.BTileArray
Get B tile array accessor.
Returns:
BlockScaledSmem[a_type, b_type, c_type, sfa_dtype, sfb_dtype, transpose_b, config=config].Core.BTileArray
c_tilesβ
c_tiles(ref[AddressSpace._value] self) -> BlockScaledSmem[a_type, b_type, c_type, sfa_dtype, sfb_dtype, transpose_b, config=config].Core.CTileArray
Get C tile array accessor.
Returns:
BlockScaledSmem[a_type, b_type, c_type, sfa_dtype, sfb_dtype, transpose_b, config=config].Core.CTileArray
sfa_tilesβ
sfa_tiles(ref[AddressSpace._value] self) -> BlockScaledSmem[a_type, b_type, c_type, sfa_dtype, sfb_dtype, transpose_b, config=config].Core.SFATileArray
Get SFA tile array accessor.
Returns:
BlockScaledSmem[a_type, b_type, c_type, sfa_dtype, sfb_dtype, transpose_b, config=config].Core.SFATileArray
sfb_tilesβ
sfb_tiles(ref[AddressSpace._value] self) -> BlockScaledSmem[a_type, b_type, c_type, sfa_dtype, sfb_dtype, transpose_b, config=config].Core.SFBTileArray
Get SFB tile array accessor.
Returns:
BlockScaledSmem[a_type, b_type, c_type, sfa_dtype, sfb_dtype, transpose_b, config=config].Core.SFBTileArray
ab_pipeline_sizeβ
static ab_pipeline_size() -> Int
Total size of A+B tiles for all pipeline stages (in elements).
Returns:
sf_pipeline_sizeβ
static sf_pipeline_size() -> Int
Total size of SFA+SFB tiles for all pipeline stages (in elements).
Returns:
c_output_sizeβ
total_tile_sizeβ
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!