NCCL is the de facto standard for collective GPU communication in large-scale distributed training, relying heavily on plugins to customize runtime behavior. However, these plugins execute as unverified native code within NCCL's address space, risking job crashes, silent state corruption, and downtime from restarts during policy updates. Inspired by kernel extensibility models, we introduce NCCLbpf, a verified, high-performance extension framework embedding a userspace eBPF runtime directly into NCCL's existing plugin interfaces, without modifying NCCL itself. NCCLbpf offers load-time static verification to prevent unsafe plugin execution, structured cross-plugin maps enabling composable policies and closed-loop adaptation, and atomic policy hot-reloads eliminating downtime previously required for policy updates. Evaluations on 8x NVIDIA B300 GPUs connected via NVLink demonstrate that NCCLbpf imposes just 80-130 ns overhead per tuner decision (less than 0.03% of collective latency), prevents all tested unsafe plugin behaviors at load-time, and enables a message-size-aware eBPF policy that improves AllReduce throughput by up to 27% over NCCL's default in the 4-128 MiB range.
翻译:NCCL是大规模分布式训练中GPU集体通信的事实标准,其高度依赖插件来定制运行时行为。然而,这些插件作为未经验证的原生代码在NCCL地址空间内执行,存在作业崩溃、静默状态损坏以及策略更新期间因重启导致停机等风险。受内核可扩展性模型启发,我们提出NCCLbpf——一种经过验证的高性能扩展框架,它将用户态eBPF运行时直接嵌入NCCL现有的插件接口,而无需修改NCCL本身。NCCLbpf提供加载时静态验证以防止不安全插件执行,通过结构化跨插件映射实现可组合策略与闭环自适应,并支持原子化策略热更新,消除了先前策略更新所需的停机时间。在通过NVLink连接的8×NVIDIA B300 GPU上的评估表明:NCCLbpf每次调谐决策仅引入80–130纳秒开销(不足集体通信延迟的0.03%),能在加载时阻止所有测试的不安全插件行为,并支持一种基于消息大小的eBPF策略,该策略在4–128 MiB范围内相比NCCL默认方案将AllReduce吞吐量提升高达27%。