vllm.v1.attention.ops.dcp_shardq.gather
¶
Push a DCP rank's KV shard into every rank's gathered context workspace.
Under DCP (interleave 1) rank r of W stores global token t iff
t % W == r, at local position t // W of its MLA and indexer caches. This
kernel copies the rank's tokens byte for byte to their global positions in
every rank's workspace, which holds each request's tokens in order in dense
64-token pages of the same formats. CTA (x, y) moves eight local tokens of
request y.
Classes:
DcpContextPushKernel
¶
Bases: VllmCuTeDSLJitKernel['DcpContextPushKernel.CompileKey']
Methods:
-
__call__–Push this rank's KV of each request's
seq_lenstokens (MLA entries
__call__(*, mla_cache, mla_block_table, index_cache, index_block_table, seq_lens, query_start_loc, dst_block_table, max_local_pages, dst_addrs, dst_index_offset, rank)
¶
Push this rank's KV of each request's seq_lens tokens (MLA entries
of its context only) to the workspace pages from dst_block_table[:, 0]
on. The caches are [blocks, block_size, token_bytes] byte views (MLA
blocks of whole pages, indexer blocks of one page). dst_addrs holds
every rank's workspace: MLA pages, then indexer pages at
dst_index_offset.