vllm.models.minimax_m3.amd.indexer_cp
¶
Indexer-only context parallelism for MiniMax M3 (AMD MSA indexer).
Every rank projects all H index heads and scores 1/P of the context blocks, then one exchange gives it each shard's candidates for the heads it owns, cutting the replicated index-cache read to 1/P. Shards cut to the full k so selection stays exact; candidates carry a generation tag, so all ranks must call this in lockstep.
Classes:
-
IndexerCpPeers–The buffers the CP selector exchanges through.
Functions:
-
get_indexer_cp_group–The group the candidate exchange runs over.
-
get_indexer_cp_peers–The buffers the CP selector exchanges through, allocated once per key.
IndexerCpPeers
dataclass
¶
The buffers the CP selector exchanges through.
cand_ptrs is every rank's candidate buffer; cp_gen is this rank's own.
Source code in vllm/models/minimax_m3/amd/indexer_cp.py
_ipc_alloc(nbytes, group)
¶
Allocate a zeroed, IPC-shared nbytes on every rank.
Returns a [world] int64 CPU tensor of their device addresses, never freed.
Source code in vllm/models/minimax_m3/amd/indexer_cp.py
get_indexer_cp_group()
¶
get_indexer_cp_peers(owned_heads, max_rows, topk)
¶
The buffers the CP selector exchanges through, allocated once per key.
Cached and shared by every layer, sized to max_rows so captured graphs
always address the same buffer. Every rank must reach this with the same key.