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

warp_idx_to_role

def warp_idx_to_role(warp_idx: UInt32) -> WarpRole

Maps a global warp index to its WarpRole based on warpgroup assignment.

Args:

  • warp_idx (UInt32): Global warp index within the CTA, where each warpgroup spans four consecutive warps. Determines the specialized role (softmax, correction, MMA, load, or FP8-to-BF16 conversion) via warp_idx // 4 for warpgroup assignment and direct index checks for warps 12 and above.

Returns:

WarpRole

Was this page helpful?