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 struct

K2qCsrDeviceSizes

struct K2qCsrDeviceSizes

Host-computed sizing for the device CSR (allocated by the caller).

Fields​

  • ​batch (Int):
  • ​total_rows (Int):
  • ​max_kv_blocks (Int):
  • ​work_capacity (Int):
  • ​g (Int): CTAs over the q-range (hist/scatter grid.x).
  • ​kwarps (Int): Warps per CTA; each owns a contiguous q-sub-range.
  • ​g_total (Int): Number of units = g * kwarps (the tile_counts unit axis length).
  • ​q_per_cta (Int): Queries per CTA (ceil(total_q / g)).
  • ​q_per_warp (Int): Queries per warp (ceil(q_per_cta / kwarps)).

Implemented traits​

AnyType, Copyable, ImplicitlyDeletable, Movable

Methods​

tile_counts_len​

def tile_counts_len(self, head_kv: Int) -> Int

Length of the tile_counts scratch buffer (the caller allocates it).

Returns:

Int