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 struct

STMatrixOffsets

struct STMatrixOffsets[BM: Int, BN: Int, *, num_threads: Int, accum_dtype_size: Int, curr_repeat: Int, cumulative_repeat: Int, m_mma: Int]

Implemented traits​

AnyType, Copyable, ImplicitlyCopyable, ImplicitlyDeletable, Movable, RegisterPassable, TrivialRegisterPassable

comptime members​

b32_per_repeat​

comptime b32_per_repeat = (Int((mul accum_dtype_size, 4)) // Int(4))

local_frag_size_b32​

comptime local_frag_size_b32 = (curr_repeat * (Int((mul accum_dtype_size, 4)) // Int(4)))

ptr_offset​

comptime ptr_offset = ((Int((mul accum_dtype_size, 4)) // Int(4)) * Int((add (mul (BN // Int(8)), m_mma), cumulative_repeat)))

STLayout​

comptime STLayout = STMatrixLayout[BM, BN, num_threads=num_threads, accum_dtype_size=accum_dtype_size]

tmem_col_offset​

comptime tmem_col_offset = (Int((mul cumulative_repeat, 2)) * Int(4))

tmem_offset​

comptime tmem_offset = ((STMatrixOffsets[BM, BN, num_threads=num_threads, accum_dtype_size=accum_dtype_size, curr_repeat=curr_repeat, cumulative_repeat=cumulative_repeat, m_mma=m_mma].tmem_row_offset << Int(16)) + Int((mul cumulative_repeat, 8)))

tmem_row_offset​

comptime tmem_row_offset = (Int(16) * m_mma)

Methods​

__init__​

def __init__() -> Self