vllm.model_executor.kernels.attention.dsa.dcp_indexer_cutedsl
¶
Functions:
-
stable_topk_from_gathered_candidates_cutedsl–Select each row's global top-
topkfrom all ranks' candidates.
_dcp_merge_topk_and_interleave(vllm_config)
¶
(topk, cp_interleave) the DCP merge runs with.
Kpool indexers (GLM-5.x) merge pool ids: topk and the interleave are both
in units of index_kpool tokens.
Source code in vllm/model_executor/kernels/attention/dsa/dcp_indexer_cutedsl.py
stable_topk_from_gathered_candidates_cutedsl(gathered, topk, out=None)
¶
Select each row's global top-topk from all ranks' candidates.
gathered is rank-major [world_size, rows, topk, 2], as produced by a
dim-0 all-gather of each rank's [rows, topk, 2] candidates, and is read
in place: a dim-1 gather into [rows, world_size * topk, 2] would cost a
full reorder copy.