IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /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. /get-started.md).

Mojo function

mma_desc_sbo_lbo

def mma_desc_sbo_lbo[dtype: DType, *, BMN: Int, BK: Int, swizzle_mode: TensorMapSwizzle, is_k_major: Bool, page_dense: Bool = False]() -> Tuple[Int, Int]

Returns the (stride, leading) byte offsets of an MMA operand descriptor.

The offsets are the two strides the canonical descriptor layout exposes: the stride of the second sub-mode of mode 0 and of mode 1. They are derived directly from the tile geometry, so no legacy Layout has to be built to create a descriptor.

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, the operand is K-major; otherwise MN-major.
  • ​page_dense (Bool): When True, uses the page-dense (row-major atoms) tile.

Returns:

Tuple[Int, Int]: The stride byte offset (SBO) and leading byte offset (LBO).

Was this page helpful?