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_descriptor

def smem_descriptor[dtype: DType, //, *, BMN: Int, BK: Int, swizzle_mode: TensorMapSwizzle, is_k_major: Bool, page_dense: Bool = False](ptr: Pointer[Scalar[dtype], address_space=AddressSpace.SHARED, _safe=False]) -> MMASmemDescriptorPair

Creates an MMASmemDescriptorPair for an SM100 MMA operand tile in shared memory.

Selects either K-major or MN-major tile layout based on is_k_major, builds the canonical descriptor layout, and creates the corresponding pair of SMEM descriptors used by the SM100 UMMA instructions.

Parameters:

  • ​dtype (DType): Element type of the operand.
  • ​BMN (Int): Block tile size along the M or N dimension.
  • ​BK (Int): Block tile size along the K dimension.
  • ​swizzle_mode (TensorMapSwizzle): Swizzle mode for the shared memory access pattern.
  • ​is_k_major (Bool): When True, uses K-major (A/Q@K') layout; when False, uses MN-major (V/P@V) layout.
  • ​page_dense (Bool): When True, selects the page-dense (row-major atoms) variant of the tile layout for the SM100 row-major page-fold path.

Args:

Returns:

MMASmemDescriptorPair: An MMASmemDescriptorPair ready for use with SM100 UMMA instructions.

Was this page helpful?