<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Nccl-Tests on Council of Elrond</title><link>https://songkou.github.io/tags/nccl-tests/</link><description>Recent content in Nccl-Tests on Council of Elrond</description><generator>Hugo</generator><language>en</language><lastBuildDate>Wed, 09 Sep 2026 14:30:00 +0800</lastBuildDate><atom:link href="https://songkou.github.io/tags/nccl-tests/index.xml" rel="self" type="application/rss+xml"/><item><title>NCCL and NVLink Notes</title><link>https://songkou.github.io/posts/nvlink-nccl-scaleup-scaleout/</link><pubDate>Wed, 05 Aug 2026 21:00:00 +0800</pubDate><guid>https://songkou.github.io/posts/nvlink-nccl-scaleup-scaleout/</guid><description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; this post is a re-write based on articles found on the internet, cross-checked against NVIDIA&amp;rsquo;s NCCL documentation and published NVLink specifications, and kept here for future reference. This revision restructures the post around a much more complete source article covering NCCL&amp;rsquo;s core concepts, algorithms, protocols, tuning, and troubleshooting.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id="1-what-nccl-is-and-why-a-memcpy-needs-a-library"&gt;1. What NCCL is, and why a memcpy needs a library&lt;/h2&gt;
&lt;p&gt;Training a model across many GPUs is, mechanically, a loop of compute and synchronization. With 8 GPUs data-parallel training a 7B model, each card holds ~14 GB of bf16 gradients after every backward pass, and all 8 copies must be merged into one identical result on every card — hundreds of thousands of times over a run. The standard tool for this is NVIDIA&amp;rsquo;s &lt;strong&gt;NCCL&lt;/strong&gt; (NVIDIA Collective Communications Library, usually pronounced &amp;ldquo;Nickel&amp;rdquo;). NCCL is not a training framework and not a scheduler; it is the layer that moves tensors between GPUs, with topology awareness and per-path optimization for PCIe, NVLink, NVSwitch, InfiniBand, RoCE, and plain Ethernet. Every &amp;ldquo;data parallel&amp;rdquo;, &amp;ldquo;tensor parallel&amp;rdquo;, or &amp;ldquo;parameter sharding&amp;rdquo; feature in PyTorch, TensorFlow, JAX, Megatron-LM, DeepSpeed, Horovod, or vLLM eventually lands on the small set of primitives this post walks through — in training &lt;em&gt;and&lt;/em&gt; in large-model inference (tensor/pipeline/expert parallel, KV-cache traffic).&lt;/p&gt;</description></item></channel></rss>