<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>所有通信库系列 - 集合通信博客</title><link>https://hccl.club/posts/comm-libs/</link><description>所有通信库系列 | 集合通信博客</description><generator>Hugo -- gohugo.io</generator><language>zh-CN</language><lastBuildDate>Sun, 15 Nov 2026 18:00:00 +0800</lastBuildDate><atom:link href="https://hccl.club/posts/comm-libs/" rel="self" type="application/rss+xml"/><item><title>NCCL User Buffer Registration 深度解析：注册一次，集合通信全程零拷贝</title><link>https://hccl.club/posts/nccl-user-buffer-registration/</link><pubDate>Sun, 06 Dec 2026 10:00:00 +0800</pubDate><author><name>Innoecho</name></author><guid>https://hccl.club/posts/nccl-user-buffer-registration/</guid><description><![CDATA[<h1 id="nccl-user-buffer-registrationubr详解使用场景demo-与内部实现" class="headerLink">
    <a href="#nccl-user-buffer-registrationubr%e8%af%a6%e8%a7%a3%e4%bd%bf%e7%94%a8%e5%9c%ba%e6%99%afdemo-%e4%b8%8e%e5%86%85%e9%83%a8%e5%ae%9e%e7%8e%b0" class="header-mark"></a>NCCL User Buffer Registration（UBR）详解：使用场景、Demo 与内部实现</h1><blockquote>
  <p>本文基于 NCCL 2.32.7 源码（<code>src/register/</code> 重构版）。该版本中 UBR 子系统已相对 2.19
最初引入时的设计（<code>SENDRECV_BUF</code>/<code>READ_ONLY</code> 等标志）进行了重构，下文所有代码引用均以
该版本为准。</p>

</blockquote><h2 id="1-概述" class="headerLink">
    <a href="#1-%e6%a6%82%e8%bf%b0" class="header-mark"></a>1. 概述</h2><p><strong>User Buffer Registration（用户缓冲区注册）</strong> 是 NCCL 2.19 起提供的 API
（<code>ncclCommRegister</code> / <code>ncclCommDeregister</code>），允许应用把一段 CUDA 内存<strong>预先注册</strong>到
communicator，使后续集合操作可以直接对用户内存做零拷贝收发，而不再经过 NCCL 内部
FIFO 中转。</p>
<p>核心收益有两层：</p>
<ol>
<li><strong>消除每次调用的按需注册开销</strong>：RDMA/DMABUF 句柄导出、IPC 地址表交换、multicast
绑定等操作只在首次注册时做一次，之后每次集合调用直接命中缓存复用；</li>
<li><strong>消除数据中转拷贝</strong>：网络路径从&quot;用户 buffer → NCCL 内部已注册 FIFO → 对端 FIFO →
对端用户 buffer&quot;变成&quot;用户 buffer → 对端用户 buffer&quot;的直连 RDMA/P2P。</li>
</ol>]]></description></item><item><title>Grid、CTA 与 BarrierSession：CUDA 编程模型与 NCCL Device API 同步机制详解</title><link>https://hccl.club/posts/nccl-deviceapi-barriers/</link><pubDate>Sun, 06 Dec 2026 10:00:00 +0800</pubDate><author><name>Innoecho</name></author><guid>https://hccl.club/posts/nccl-deviceapi-barriers/</guid><description><![CDATA[<div class="barrier-post">

<p>NCCL 的 Device API 允许在 GPU kernel 里直接发起集合通信与同步，而读懂它的钥匙是把两套分层叠在一起：<strong>内核侧的线程分层</strong>（Thread → Warp → CTA → Grid）与<strong>通信侧的 rank 分层</strong>（LSA team → rail team → world team）。在两者的交点上，坐着一族 API——<strong>BarrierSession</strong>。本文用三章把这条线讲透：先讲 CUDA 编程模型的四层结构与硬件调度，再讲单机内同步与 NCCL 的 team 模型，最后逐参数拆解四种 BarrierSession 及用法。</p>]]></description></item><item><title>从 Native 到 GIN：主机侧网卡上 GPU 通信的四次进化</title><link>https://hccl.club/posts/native-gdr-gda-gin/</link><pubDate>Sat, 05 Dec 2026 22:00:00 +0800</pubDate><author><name>Innoecho</name></author><guid>https://hccl.club/posts/native-gdr-gda-gin/</guid><description><![CDATA[<div class="gin-post">

<p>跨节点集合通信的网卡是「主机侧」的：ConnectX 这类 RDMA 网卡通过 PCIe 挂在 CPU 根复合体下，而真正要搬的数据在 GPU 显存里。网卡与显存之间隔着 PCIe 与 CPU，这张「位置不对」的网卡催生了 NVIDIA 的四次架构级优化：</p>

<ul>
  <li><strong>Native</strong>：分段拷贝——数据先落主机内存再上网，CPU 全程经手；</li>
  <li><strong>GDR</strong>（GPUDirect RDMA）：网卡直达显存，数据路径打通，但控制仍归 CPU；</li>
  <li><strong>GDA</strong>（GPUDirect Async）：GPU kernel 发起通信、设备侧等待完成，CPU 退出逐操作循环；</li>
  <li><strong>GIN</strong>（GPU-Initiated Networking，NCCL 文档与源码中也写作 Gin）：GPU 线程现场构造 WQE、直接敲网卡门铃，连「提交」也归 GPU。</li>
</ul>]]></description></item><item><title>带宽时延积（BDP）可视化：带宽、时延与在途数据</title><link>https://hccl.club/posts/bandwidth/</link><pubDate>Fri, 20 Nov 2026 12:00:00 +0800</pubDate><author><name>Innoecho</name></author><guid>https://hccl.club/posts/bandwidth/</guid><description><![CDATA[<p>一条链路能跑多快，不只看<strong>带宽</strong>，还要看<strong>时延</strong>——两者的乘积定义了一个被反复提及却常常被低估的量：<strong>带宽时延积（Bandwidth-Delay Product，BDP）</strong>。它回答一个问题：<em>要跑满这条链路，最多需要同时「在路上」放多少数据？</em></p>

<p>本文用一根「水管」把这个关系做成可交互的动画：管径是带宽、管长是往返时延（RTT）、管子容积就是 BDP——也就是 in-flight data（在途数据）的上限。直接在输入框里改参数，你会直观看到三者如何互相影响。</p>]]></description></item><item><title>Cerebras WSE-3：一张晶圆上的 214 Pb/s 片上网络</title><link>https://hccl.club/docs/chips/cerebras-wse3/</link><pubDate>Sun, 15 Nov 2026 19:30:00 +0800</pubDate><author><name>Innoecho</name></author><guid>https://hccl.club/docs/chips/cerebras-wse3/</guid><description><![CDATA[<p>前七篇的芯片无论路线多激进，都共享一个前提：<strong>集群 = 多颗芯片 + 某种片间互连</strong>。Cerebras 的 WSE-3 连这个前提都推翻了——它不把芯片切小再拼起来，而是直接在一片 5nm 晶圆上做出 90 万个核心的完整引擎。当整个&quot;集群&quot;在一张晶圆上时，片间互连退化为片上网格，跨芯片通信退化为跨核心一跳，&ldquo;集合通信&quot;这个被 NCCL 做成一个产业的问题，在 WSE 上被硅片直接消化了。</p>
<p>官方对这条路的辩护词很直白：晶圆级集成用<strong>片上短导线</strong>取代片外通信——比跨封装连接器、PCB 甚至线缆&quot;容易得多&rdquo;（官方架构博客原文）。本篇拆解这张晶圆上的通信系统。</p>]]></description></item><item><title>Groq LPU：编译器排好每一比特的确定性网络</title><link>https://hccl.club/docs/chips/groq-lpu/</link><pubDate>Sun, 15 Nov 2026 19:00:00 +0800</pubDate><author><name>Innoecho</name></author><guid>https://hccl.club/docs/chips/groq-lpu/</guid><description><![CDATA[<p>如果问&quot;集合通信能不能完全不做运行时调度&quot;，前几篇的芯片给出的答案都是&quot;不能&quot;：NCCL 要探测拓扑、Gaudi 3 要拥塞控制、EFA 要流量调度——网络上有多少路、哪个时刻会堵，运行时才知道。Groq 的 LPU 给了另一个答案：<strong>不能预测，那就让一切提前定死</strong>。它的 TSP 架构里没有 HBM、没有缓存，芯片间互连&quot;无需路由器或控制器&quot;（官方博客原话），每一次数据搬移——包括跨芯片的——都在编译期排进了一张精确到时钟周期的表。</p>
<p>把通信做到&quot;全静态&quot;是前无古人的极端设计。本篇讲清楚它怎么工作、边界在哪里。</p>]]></description></item><item><title>Trainium2：为集合通信造了专用核的云厂商自研芯片</title><link>https://hccl.club/docs/chips/trainium2/</link><pubDate>Sun, 15 Nov 2026 17:30:00 +0800</pubDate><author><name>Innoecho</name></author><guid>https://hccl.club/docs/chips/trainium2/</guid><description><![CDATA[<p>主流 GPU 的集合通信长这样：NCCL 这个<strong>软件</strong>在<strong>通用</strong>硬件上跑算法。AWS Trainium2 把这条链路反过来做：芯片里直接放了 <strong>16 颗 CC-Core（Collective Communication Core，官方命名）</strong>——集合通信引擎是硅片的一部分，软件只是调用它。用更直白的话说，NVIDIA 把 AllReduce 做成一个库，AWS 把它做进了芯片。</p>
<p>这也是云厂商自研芯片和硬件厂商卖芯片最本质的区别：AWS 不需要 Trainium2 去兼容任何第三方的网卡、交换机或通信库——它只需要在自己的机房、自己的网络、自己的软件栈里跑得最快。于是通信设计可以极端定制。本篇拆解这份&quot;定制&quot;：NeuronLink v3、CC-Core、EFA/SRD。</p>]]></description></item><item><title>NCCL：GPU 集合通信的事实标准</title><link>https://hccl.club/posts/comm-libs/nccl/</link><pubDate>Sun, 15 Nov 2026 17:00:00 +0800</pubDate><author><name>Innoecho</name></author><guid>https://hccl.club/posts/comm-libs/nccl/</guid><description>&lt;p>NCCL（NVIDIA Collective Communications Library）是 GPU 集群上事实标准的集合通信库，官方定位一句话：&lt;strong>topology-aware（拓扑感知）的 GPU 间通信原语&lt;/strong>。PyTorch DDP/FSDP、DeepSpeed、vLLM 等框架的梯度同步与张量并行通信，最终都落到 NCCL 上。与 MPI 这类功能全面的消息库不同，NCCL 只做一件事：在 NVIDIA 硬件上把集合通信跑到接近互连的理论上限。理解 NCCL 的关键技术点，就理解了 GPU 集群通信的设计方法。&lt;/p></description></item><item><title>RCCL：AMD ROCm 的集合通信库</title><link>https://hccl.club/posts/comm-libs/rccl/</link><pubDate>Sun, 15 Nov 2026 16:00:00 +0800</pubDate><author><name>Innoecho</name></author><guid>https://hccl.club/posts/comm-libs/rccl/</guid><description><![CDATA[<p>RCCL（ROCm Communication Collectives Library）是 AMD ROCm 软件栈中的集合通信库。它不是独立设计的新库，而是 NCCL 的衍生实现（fork）：源码基于 NCCL、API 沿用 <code>nccl*</code> 前缀（只是流类型换成 <code>hipStream_t</code>），仓库版权声明里至今保留 NVIDIA 的署名。要把 RCCL 的来龙去脉讲清楚，关键是理解**&ldquo;移植&quot;在集合通信库这件事上意味着什么**：算法和协议可以通用，但拓扑感知的那一层必须为 AMD 的互连体系重写。</p>]]></description></item><item><title>昇腾 910 系列：HCCS 与国产超节点的通信底座</title><link>https://hccl.club/docs/chips/ascend-supernode/</link><pubDate>Sun, 15 Nov 2026 16:00:00 +0800</pubDate><author><name>Innoecho</name></author><guid>https://hccl.club/docs/chips/ascend-supernode/</guid><description><![CDATA[<p>这个博客的域名叫 hccl.club——HCCL 是 Huawei Collective Communication Library，昇腾 AI 处理器的集合通信库。它和 NCCL 的关系是&quot;角色对应&quot;而非&quot;代码同源&quot;：同一批原语（AllReduce、AllGather、ReduceScatter……），同一类算法（Ring/Tree + 分层），但跑在完全不同的硬件基座上——片间靠 HCCS 高速互连，跨节点靠 200GE RoCE 直出，而不是 NVLink + InfiniBand。</p>
<p>先打一针预防：昇腾的公开资料远不如 NVIDIA/AMD 完整，很多关键参数没有官方逐项披露。本篇把每条信息的<strong>来源级别</strong>写进正文（官方可查 / 权威拆解 / 媒体传闻），宁可标&quot;未证实&quot;也不混用口径——这是本博客处理公开资料的一贯做法。</p>]]></description></item></channel></rss>