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

wgmma_desc_sbo_lbo

def wgmma_desc_sbo_lbo[dtype: DType, layout_t: TensorLayout, is_k_major: Bool = True, swizzle_mode: TensorMapSwizzle = TensorMapSwizzle.SWIZZLE_NONE]() -> Tuple[Int, Int]

Returns the (stride, leading) byte offsets of a WGMMA operand descriptor.

The two offsets are the sub-strides of the canonical descriptor layout, in 16 B units: mode 0's second sub-stride is the stride byte offset and mode 1's second sub-stride the leading byte offset. An MN-major operand swaps the two when the swizzle is off, per the PTX "asynchronous warpgroup-level majorness" table.

Parameters:

  • ​dtype (DType): Element data type of the tensor.
  • ​layout_t (TensorLayout): Type of the operand tile's layout, with mode 0 the MN extent and mode 1 the K extent.
  • ​is_k_major (Bool): Whether the operand is K-major (True) or MN-major (False).
  • ​swizzle_mode (TensorMapSwizzle): Memory access pattern swizzling mode.

Returns:

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

Was this page helpful?