IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
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 function

smem_mma_subtile_offset

smem_mma_subtile_offset[mma_rows: Int, mma_cols: Int, BN: Int, BK: Int](bk_tile: Int, k_sub: Int, mma_idx: Int) -> Int

Element offset of an MMA sub-tile within a blocked (BN x BK) SMEM region.

The physical SMEM layout is num_repeats contiguous BN x BK blocks. This helper computes the scalar-element offset (from the stage base) of the MMA sub-tile at (bk_tile, k_sub, mma_idx).

The offset is layout-agnostic — callers that need a TileTensor view pair it with whatever within-tile stride their load pattern requires (see smem_mma_subtile for the default row-major form).

Returns:

Int