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

kpool_seed_tail_kernel

def kpool_seed_tail_kernel[dtype: DType, TailLayoutType: TensorLayout, tail_origin: MutOrigin, KLayoutType: TensorLayout, k_origin: ImmOrigin, GateLayoutType: TensorLayout, gate_origin: ImmOrigin, IROLayoutType: TensorLayout, iro_origin: ImmOrigin, CacheLenLayoutType: TensorLayout, SlotLayoutType: TensorLayout, slot_origin: ImmOrigin, TailEngine: TensorEngine, KEngine: TensorEngine, GateEngine: TensorEngine, IROEngine: TensorEngine, CacheLenEngine: TensorEngine, SlotEngine: TensorEngine, head_dim: Int, kpool: Int](tail: TileTensor[dtype, TailLayoutType, tail_origin, Engine=TailEngine], k: TileTensor[dtype, KLayoutType, k_origin, Engine=KEngine], gate: TileTensor[dtype, GateLayoutType, gate_origin, Engine=GateEngine], input_row_offsets: TileTensor[.uint32, IROLayoutType, iro_origin, Engine=IROEngine], cache_lengths: TileTensor[.uint32, CacheLenLayoutType, ImmutAnyOrigin, Engine=CacheLenEngine], slot_idx: TileTensor[.uint32, SlotLayoutType, slot_origin, Engine=SlotEngine], num_requests: Int32)

Stashes a prefill chunk's trailing tokens into the tail ring.

Compression writes only whole pools, so the tokens after the last complete pool have nowhere else to go. They are the members of the request's in-progress pool, and decode reads them back from the ring.

Only the trailing tokens this call owns are written, so a chunked prefill lands where a single one does.

Parameters:

Args:

Was this page helpful?