vllm.models.inkling2.nvidia.ops.allreduce
¶
MNNVL all-reduce fused with Inkling2's hidden-stream short conv and the AttnRes mix + RMSNorm of the next sublayer.
Each rank pushes its bf16 partial rows (the attention output, or the MoE expert rows combined in fp32 over each token's top-k slots and rounded once) into every rank's Lamport buffer (one shot), or each row's channel shards to their owner ranks, which reduce and broadcast them (two shots). Every row is summed over the ranks in rank order in fp32 (identical bits on all ranks), rounded once to bf16 and run through the short conv (conv-state cache write, optional residual update) and the AttnRes mix + RMSNorm in the same kernel.
Classes:
-
Inkling2AllReduceWorkspace–Multicast Lamport buffers and generation flags of the fused kernel.
Functions:
-
all_reduce_conv_mix–All-reduce this rank's partial sum over TP, then
short_convit into
Inkling2AllReduceWorkspace
¶
Multicast Lamport buffers and generation flags of the fused kernel.
Methods:
-
plan–Whether each sublayer's (attention, MoE) all-reduce of
Source code in vllm/models/inkling2/nvidia/ops/allreduce.py
plan(num_tokens)
¶
Whether each sublayer's (attention, MoE) all-reduce of
num_tokens runs fused, and whether in two shots.
Source code in vllm/models/inkling2/nvidia/ops/allreduce.py
_multicast_memory(size, group)
¶
FlashInfer's symmetric multicast memory at the minimum allocation and multicast granularities (its recommended multicast granularity rounds every allocation up to 512 MiB).
Source code in vllm/models/inkling2/nvidia/ops/allreduce.py
all_reduce_conv_mix(workspace, x, combine, conv_weight, cache, positions, block_table, seq_idx, slot_mapping, query_start, stream_offset, stream_width, conv_out, residual, addend, stack, last, queries, norm_weight, norm_eps, eps=1e-06, two_shot=False)
¶
All-reduce this rank's partial sum over TP, then short_conv it into
conv_out (with the optional (residual + addend) + y update), then
attn_res over [*stack, (last +) conv_out] with each query.
The partial sum is the bf16 x, or combine = (down, src2dst): each
token's top-k expert rows of down summed in order in fp32 and rounded
once to bf16. Returns the (Q, T, D) bf16 mix outputs, or without
norm_weight the fp32 mixes before the RMSNorm.
Source code in vllm/models/inkling2/nvidia/ops/allreduce.py
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 | |