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_prefill

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

Computes the rank-3 global-memory shape for a prefill (non-decoding, non-fused) Q tensor TMA tile.

Parameters:

  • ​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], ComptimeInt[depth]]

Was this page helpful?