vllm.models.glm5next.nvidia.specialized_decode.logits_gather
¶
All-gather of the vocab-parallel LM head logits straight into [M, vocab].
Stock gathers the [M, vocab / tp] shards with NCCL into [tp, M, vocab / tp] and
permutes that into [M, vocab]: ~62 us of all-gather and ~19 us of copy at 64 rows
(the verify step of MTP3 at 16 requests, or 64 requests without MTP). Here each
rank stores its shard into column block rank of every rank's symmetric
[M, vocab] buffer over NVLink, then every CTA meets its counterparts on the other
ranks at a flag barrier, and the caller reads the local buffer. Unicast stores
to the peers beat one NVLS multicast store per vector (34 vs 39 us at 64 rows,
destination out of L2).
Two buffers (and flag sets) alternate: a rank starting gather k + 2 has passed gather k + 1's barrier, which its peers reach only after their streams finished with gather k's logits.
Classes:
-
LogitsGather–tensor_model_parallel_all_gatherof [M, vocab shard] BF16 logits for
LogitsGather
¶
tensor_model_parallel_all_gather of [M, vocab shard] BF16 logits for
M <= capacity, returned as a view of a buffer that the next gather but one
overwrites. Construction is collective over the TP group.
Methods:
-
__call__–Eager calls only: the host alternates the buffers.
Source code in vllm/models/glm5next/nvidia/specialized_decode/logits_gather.py
__call__(logits)
¶
Eager calls only: the host alternates the buffers.
Source code in vllm/models/glm5next/nvidia/specialized_decode/logits_gather.py
_arrive(address)
¶
Publishes this CTA's stores and counts it in every rank's flag.