vllm.models.kimi_k3.amd.specialized_decode.runtime.runner
¶
The specialized decode's per-rank state: one scratch buffer every launch shares (their mailbox tags differ), the device step epoch, the health words and the TP group's peer memory.
Mailbox tags carry the epoch the model bumps once a forward (step_begin,
which a CUDA graph captures), so no buffer is zeroed between steps.
The peer buffer's first PEER_HEAD bytes hold the output rank's flags, a
word a rank (alarm): a rank whose wait gives up sets its word there before it
stores anything else. The kernels see the buffer past the head.
Classes:
-
MonoRunner–Collective: every TP rank builds it at the same point.
MonoRunner
¶
Collective: every TP rank builds it at the same point.
Methods:
-
__init__–dcp: M1's ranks, 1 or the TP group (default: the DCP group's). -
step_begin–Once a forward, before its first mono launch (a graph captures it).
Attributes:
Source code in vllm/models/kimi_k3/amd/specialized_decode/runtime/runner.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | |
m1c
property
¶
DCP1 at qlen 4 / 8 (M1b in K2): M1a writes a bf16 query, K2's launch runs the decode attention (M1c) first, its M1b merging the KV splits.
__init__(device, dcp=None, m1=True)
¶
dcp: M1's ranks, 1 or the TP group (default: the DCP group's).
m1: the MLA layers run M1 (else vLLM's attention ops).