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
SMemBuffer
struct SMemBuffer[dtype: DType, layout: Layout, pipeline_stages: Int, BM: Int, BN: Int, WM: Int, WN: Int]
Manages shared memory and returns 2D tile slices of the buffer.
Fieldsβ
- βbuffer (
SMemBuffer[dtype, layout, pipeline_stages, BM, BN, WM, WN].SMemTile):
Implemented traitsβ
AnyType,
Copyable,
ImplicitlyCopyable,
ImplicitlyDeletable,
Movable,
RegisterPassable,
TrivialRegisterPassable
comptime membersβ
BlockTileTypeβ
comptime BlockTileType = LayoutTensor[dtype, LayoutTensor._compute_tile_layout[BM, BN]()[Int(0)], MutAnyOrigin, address_space=AddressSpace.SHARED, layout_int_type=_get_layout_type(pipeline_layout[layout, pipeline_stages](), AddressSpace.SHARED), linear_idx_type=_get_index_type(pipeline_layout[layout, pipeline_stages](), AddressSpace.SHARED), masked=_tile_is_masked[pipeline_layout[layout, pipeline_stages](), BM, BN](), alignment=Int(128)]
SMemTileβ
comptime SMemTile = LayoutTensor[dtype, pipeline_layout[layout, pipeline_stages](), MutAnyOrigin, address_space=AddressSpace.SHARED, alignment=Int(128)]
WarpTileTypeβ
comptime WarpTileType = LayoutTensor[dtype, LayoutTensor._compute_tile_layout[WM, WN]()[Int(0)], MutAnyOrigin, address_space=AddressSpace.SHARED, layout_int_type=_get_layout_type(pipeline_layout[layout, pipeline_stages](), AddressSpace.SHARED), linear_idx_type=_get_index_type(pipeline_layout[layout, pipeline_stages](), AddressSpace.SHARED), masked=_tile_is_masked[pipeline_layout[layout, pipeline_stages](), BM, BN]() or _tile_is_masked[LayoutTensor._compute_tile_layout[BM, BN]()[Int(0)], WM, WN](), alignment=Int(128)]
Methodsβ
__init__β
def __init__() -> Self
get_tileβ
def get_tile(self, stage: Int) -> Self.BlockTileType
Returns:
Self.BlockTileType
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!