<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>CUDA - 标签 - 集合通信博客</title><link>https://hccl.club/tags/cuda/</link><description>CUDA - 标签 - 集合通信博客</description><generator>Hugo -- gohugo.io</generator><language>zh-CN</language><lastBuildDate>Sun, 06 Dec 2026 10:00:00 +0800</lastBuildDate><atom:link href="https://hccl.club/tags/cuda/" rel="self" type="application/rss+xml"/><item><title>计算通信重叠技术</title><link>https://hccl.club/docs/training/compute-communication-overlap/</link><pubDate>Fri, 06 Nov 2026 10:00:00 +0800</pubDate><author><name>Innoecho</name></author><guid>https://hccl.club/docs/training/compute-communication-overlap/</guid><description><![CDATA[<p>并行度越大，通信占训练时间的比重越高：数据并行下每 rank 的梯度 AllReduce 字节量几乎不随卡数下降，而每卡分到的计算量却在变小；张量并行与专家并行更是把通信塞进了每一层的关键路径。若计算与通信串行执行，步时就是两者之和，规模一大通信直接吃掉扩展性。</p>
<p>计算通信重叠 (compute-communication overlap) 是所有训练框架共同的核心工程：让通信 kernel 与计算 kernel 在时间上并发，把串行的和变成 max。本文先给手段总览，再拆开 CUDA stream 与 event 的底层机制、分层 AllReduce 的字节账、1F1B 流水的覆盖逻辑，最后讲度量方法与&quot;重叠过度&quot;的坑。</p>]]></description></item><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>从 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>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></channel></rss>