Conversation
bench_qwen_tp_allreduce covers the decode/draft shapes (1 and 8 rows, 80 KB). Long prefill reduces whole chunks: 4096 rows x 5120 hidden is 41.9 MB per call, two calls per layer, 85.9 GB over a 64-layer 65K prefill. That is a different bandwidth regime, and it decides whether the 25% of prefill time spent in tp_all_reduce is a hardware floor or our own overhead. Measured on 4x2080Ti (GPU0-1 PHB, GPU2-3 NV2, cross-pair SYS): rows payload ms/call algbw busbw 512 5.2 MB 0.895 5.86 GB/s 8.79 GB/s 1024 10.5 MB 1.746 6.01 9.01 2048 21.0 MB 3.496 6.00 9.00 4096 41.9 MB 6.864 6.11 9.17 8192 83.9 MB 13.725 6.11 9.17 Flat from 5 MB up, so the collective is bandwidth-bound, not launch-bound: 2048 calls x 6.864 ms = 14.06 s against a measured tp_all_reduce of 14.64 s. Doubling the chunk halves the call count and doubles the per-call time for the same total, which is why the 4096 -> 8192 -> 16384 chunk sweep moved prefill 1157 -> 1140 -> 1125 tok/s.
|
Closing: this cannot build against It cannot build, three ways. The target it links is Its subject is covered. The question this bench exists to answer — how the TP all-reduce behaves as the payload grows with the prefill chunk, and whether that is a hardware floor — is answered on the Ascend side in The branch is deleted. Thanks — the payload-sweep question was the right one to ask, it just turned out to have a latency answer rather than a bandwidth one, on a different backend than this was written for. |
Why
tp_all_reduceis 25.7% of 65K prefill time, and the existingbench_qwen_tp_allreduceonly covers decode/draft shapes (1 and 8 rows, ~80 KB). Long prefill reduces whole chunks: 4096 rows x 5120 hidden is 41.9 MB per call, two calls per layer, 85.9 GB over a 64-layer 65K prefill. Without a measurement in that regime there was no way to tell whether that 25% was a hardware floor or our own overhead.Measured
4x RTX 2080 Ti, TP4 (GPU0-1 PHB, GPU2-3 NV2, cross-pair SYS over QPI):
Conclusion
Bandwidth is flat from 5 MB upward, so the collective is bandwidth-bound rather than launch-bound. 2048 calls x 6.864 ms = 14.06 s, against a measured
tp_all_reduceof 14.64 s — the phase is at its floor.This also explains the chunk sweep: doubling the chunk halves the call count and doubles per-call time for the same total, and measured prefill at 4096/8192/16384 was 1157/1140/1125 tok/s. Chunk size is not a lever here.
Test plan
New standalone bench, no engine code touched. Run with:
Requires an NCCL-enabled build (
-DNCCL_ROOT=...); prints a clear message and exits non-zero otherwise.