Day 280/365 of GPU Programming: Diving into NCCL and How PyTorch Calls AllReduce
NandoDF · x · 2026-10-12
Developer levidiamode's day 279-280 of a 365-day GPU programming challenge covers NCCL (NVIDIA Collective Communications Library).
- NCCL basics: NCCL enables fast GPU-to-GPU communication with point-to-point and collective primitives — Scatter, Gather, All-to-all, AllReduce, Broadcast, Reduce, AllGather, ReduceScatter.
- PyTorch + NCCL: Following a GPU Mode lecture by Meta research scientist Daniel Johnson, the post traces how PyTorch training code ends up calling NCCL AllReduce, and why AllReduce ops run on their own CUDA stream.
- Screenshots include a training trace showing sgemm kernels interleaved with nccl::allreduce calls, plus a recommended deep-dive blog on data-parallel training.
More from Infra
- Baseten's 'Inference Engineering' book back in print, free copies at re:Invent — philipkiely · 2026-11-29
- Debate: inference demand makes H100s more valuable while NVDA stock heads south — teortaxesTex · 2026-11-29
- Prefetching MoE experts 2 layers ahead boosts V100 decode speed 29.9% — WaroftanksPro · 2026-11-29
- Leopold's $880K-per-H100 revenue claim vs "Nvidia has zero moat" draws flak — teortaxesTex · 2026-11-29
- JITEngine from Berkeley ecosystem synthesizes custom Mac LLM inference engines, up to 2.7x faster — CShorten30 · 2026-11-29
- Dev Uses Neon to Build 'ultra' CLI That Wraps Google Colab GPUs — andrew_n_carr · 2026-11-29