vllm.models.step5.nvidia.ops.summary_update
¶
CSA region summaries, compressed once when a region's eighth row arrives.
A region summary is an online softmax over the region's eight index-key rows,
accumulated in position order. Only closed regions are ever scored, so the raw
[key | z] rows of each request's open region wait in a circular buffer
(Step5CSATailRing) and the summary is written once, by the row that closes
the region. A rejected draft that closed a region leaves a summary nobody
reads; it is rewritten when the region closes again.
Functions:
-
build_prefill_groups–Summary update metadata on device, without host slots or a sync.
-
summary_layout–(bytes between blocks, tokens per block) of a
[B, R, 256]cache. -
update_prefill–Summarize the regions this step closes, then store open-region rows.
-
update_verify–Uniform MTP verify update; graph capturable, no host metadata.
_replay_ring(Ring, base, first, last, dim, RING_CAPACITY)
¶
Accumulate the ring rows at positions [first, last) in order.
Source code in vllm/models/step5/nvidia/ops/summary_update.py
_store_summary(Mean, slot, dim, numerator, denominator, MEAN_BLOCK, BLOCK_SIZE)
¶
Write the summary of the region holding KV slot; blocks of Mean
are MEAN_BLOCK bytes apart.
Source code in vllm/models/step5/nvidia/ops/summary_update.py
_update_decode_values(slot, position, base, dim, key, z, Mean, Ring, RING_CAPACITY, MEAN_BLOCK, BLOCK_SIZE)
¶
Store an open-region row, or summarize the region this row closes.
Source code in vllm/models/step5/nvidia/ops/summary_update.py
build_prefill_groups(slots, positions, owners, query_start_loc)
¶
Summary update metadata on device, without host slots or a sync.
Returns [rows, 10] metadata [region, first offset, rows[8]];
non-head rows have region -1.
Source code in vllm/models/step5/nvidia/ops/summary_update.py
summary_layout(mean)
¶
(bytes between blocks, tokens per block) of a [B, R, 256] cache.
Source code in vllm/models/step5/nvidia/ops/summary_update.py
update_prefill(key, z, metadata, positions, ring_base, ring_slots, mean, ring, capacity)
¶
Summarize the regions this step closes, then store open-region rows.
Every ring read of the step precedes its writes, so a long chunk cannot overwrite open-region rows it still has to read.
Source code in vllm/models/step5/nvidia/ops/summary_update.py
update_verify(key, z, slots, query_start_loc, seq_lens, ring_base, mean, ring, capacity)
¶
Uniform MTP verify update; graph capturable, no host metadata.