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 ns开销(低于集体通信延迟的0.03%),在加载时成功拦截所有测试的不安全插件行为,并通过支持消息大小感知的eBPF策略,在4-128 MiB范围内将AllReduce吞吐量较NCCL默认策略提升最高达27%。