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 module
topk_bitonic
Block-wide bitonic sort top-k for the MLA/MSA indexer.
Replaces topk_gpu, which is pathological when k ≈ N (e.g. the
k = N = 2048 DeepSeek-V3 / MiniMax-M3 indexer config). For N > 2048 a
streaming variant folds TILE-wide tiles into a running top-TILE
champion, selecting K ≤ TILE out of arbitrarily large N.
comptime values
HSEL_TRACE_EVENTS
comptime HSEL_TRACE_EVENTS = Int(32)
PERSISTENT_TOPK_MAX_N
comptime PERSISTENT_TOPK_MAX_N = Int(2048)
Structs
-
PlainSink: Writes the selected columns to one int32 buffer. -
RowBoundsPtr: Row bounds read from a[rows]int32 device buffer.
Traits
-
RowBound: Per-row live-column count and output sink for the bounded top-k kernels. -
TopkSink: Where a top-k kernel writes each selected column.
Functions
-
persistent_topk_block: Launch block-wide bitonic top-k fortotal_seq_lenscore rows. -
persistent_topk_block_split: Launch bitonic top-k, splitting the N dimension when rows under-fill GPU.