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

q_gmem_shape_fused

def q_gmem_shape_fused[*, group: Int, q_num_heads: Int, depth: Int]() -> Coord[ComptimeInt[Int(-1)], ComptimeInt[(q_num_heads // group)], ComptimeInt[group], ComptimeInt[depth]]

Computes the rank-4 global-memory shape for a decoding or fused-GQA Q tensor TMA tile.

Parameters:

  • โ€‹group (Int): Grouped-query attention group size, in query heads per KV head.
  • โ€‹q_num_heads (Int): Number of query attention heads.
  • โ€‹depth (Int): Head dimension of the attention layer, in elements.

Returns:

Coord[ComptimeInt[Int(-1)], ComptimeInt[(q_num_heads // group)], ComptimeInt[group], ComptimeInt[depth]]

Was this page helpful?