vllm.models.kimi_k3.nvidia.specialized_decode.cutedsl.oproj.prepared
¶
Output projection fused with its TP all-reduce and post-attention AttnRes: rank
partials go into Lamport slots of a multicast [TP, 64, 7168] mailbox (parity alternates
by layer) and the consumer sums and re-arms them. TP16 B<=8 fuses producer and consumer
(MLA layers below B5 keep them split); above B8 the producer runs 16-token groups.
At twoshot_batches, given TwoShot buffers, the all-reduce is common.twoshot
(chunks pushed to their column owner, owner sums + multicasts, all Lamport-polled), so
each GPU receives ~2 x 14 KB per token instead of TP x 14 KB.
Classes:
-
OprojMailbox–Sentinel-armed multicast mailbox; defaults to [parity, TP, 64, 7168] BF16.
-
PreparedOproj–One decoder layer's o-projection + all-reduce + post-attention AttnRes.
Functions:
-
compile_oproj–Producer, consumer or fused kernel over a [TP, cap, 7168] parity view;
-
engine–Producer engine above B8 (GB300): grouped mma.sync for TP8 up to B16, else
-
producer–B<=8: one mma.sync pass, TP8 stages 8 (MLA 4) of 12 K blocks per warp. Above
OprojMailbox
¶
Sentinel-armed multicast mailbox; defaults to [parity, TP, 64, 7168] BF16.
Source code in vllm/models/kimi_k3/nvidia/specialized_decode/cutedsl/oproj/prepared.py
PreparedOproj
¶
One decoder layer's o-projection + all-reduce + post-attention AttnRes.
Source code in vllm/models/kimi_k3/nvidia/specialized_decode/cutedsl/oproj/prepared.py
compile_oproj(kind, k, batch, tp, nb, has_delta, mla, front=False, cap=64, twoshot=False)
cached
¶
Producer, consumer or fused kernel over a [TP, cap, 7168] parity view;
front: the consumer also publishes x_moe [1, 4, 7168] and the epoch hint.
twoshot: the two-shot pair (arguments as TwoShot.views).
Source code in vllm/models/kimi_k3/nvidia/specialized_decode/cutedsl/oproj/prepared.py
engine(batch, tp)
¶
Producer engine above B8 (GB300): grouped mma.sync for TP8 up to B16, else tcgen05.
producer(k, batch, tp, mla, twoshot=False, kind=None)
¶
B<=8: one mma.sync pass, TP8 stages 8 (MLA 4) of 12 K blocks per warp. Above
B8 (kind overrides engine): the tcgen05 engine, or 2-tile warps over 8 K
parts in 16-token groups, TP8 staging 2 of 6 K blocks per warp.