mirror of
https://github.com/deepseek-ai/DeepInfer.git
synced 2026-10-28 23:07:09 +08:00
Uneven all_to_all on the neuron process group is unreliable at scale (EP=64: "Invalid NEFF" in prefill; test_ep at 64 ranks hung after 9/18 modes). EPBuffer now moves tokens without all_to_all: - dispatch: one all_gather of x / sf / weights / topk_idx packed as uint8 rows (row count = global max via a 0-dim MAX all_reduce, or the static num_max_tokens_per_rank with DEEPINFER_NEURON_EP_AG_ROWS=cap); each rank selects the rows routed to its local experts in the same (source rank, source token) order as before, so layout / metadata / cached dispatch are unchanged. - combine: per-token fp32 partials over local experts (bf16-rounded as before) + weights, one fp32 SUM reduce_scatter (all_reduce fallback with DEEPINFER_NEURON_EP_REDUCE=ar), chunked under DEEPINFER_NEURON_EP_CHUNK_BYTES (64 MiB). - The a2a path stays behind DEEPINFER_NEURON_EP_ALGO=a2a. test_ep passes on the neuron group at 2/4/8/16/32/64 ranks (combine bit-identical to the reference in practice); new test_collectives.py found that int32 all_gather with full-range values is wrong on a 16-rank neuron group for >= 1 MiB outputs (uint8 / fp32 fine) -- payloads move as bytes. Tiny model EP=8 on NeuronCores: 25/27 argmax vs the reference, same as EP=1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| deep_ep | ||
| deep_gemm | ||
| device | ||
| flash_mla | ||
| sampling | ||
| tile_kernels | ||
| nie_skip.py | ||
| run_all.sh | ||
| setup_trn2.sh | ||