快速结论:这个报错通常出现在 vLLM 0.24.0 于 Blackwell SM120(compute capability 12.0)显卡上加载 DeepSeek / Qwen 类模型并启用 CUDA graphs 时,属于 allocator 与 custom all-reduce 图捕获注册路径不兼容导致的崩溃;优先排查是否设置了 PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True。
适用环境:Issue 中已确认的环境为 vLLM 0.24.0;模型 deepseek-ai/DeepSeek-V4-Flash、Qwen/Qwen3.6-27B-FP8;硬件 2× NVIDIA RTX PRO 6000 Blackwell Workstation Edition(96 GB,TP=2),SM120 / compute capability 12.0;驱动 595.71.05(open kernel module);CUDA 13.0;PyTorch 2.11.0+cu130;Triton 3.6.0;flashinfer-python 0.6.14(git main,未发布);Python 3.12.3;Ubuntu 24.04.4 LTS。复现数据还来自 2× RTX PRO 5000 Blackwell(SM120,CUDA 13.0,torch 2.11.0+cu130,TP=2)。
最快修复方案:暂无确认的一步修复方案。Issue 明确验证过的可行做法是:在默认 allocator 下不设置 expandable_segments:True,CUDA graphs 可正常捕获;若必须使用 expandable_segments,可优先尝试应用 PR #43923(在捕获期间临时关闭 expandable_segments),该补丁已在同一硬件上验证 expandable_segments:True + TP=2 + full cudagraphs 可通过。
注意事项:PR #43923 自 5 月起仍在等待 review,未被合并到主线,需自行打补丁,属于未上游验证状态;Issue 中报告的多项 SM120 兼容缺口(DeepGemm / CUTLASS / cudagraph kernel、FP8 调优、cooperative_topk 等)被认为是相互独立的问题,本方案只针对其中 custom all-reduce 与图捕获的 allocator 交互这一类失败。该 Issue 已被标记 stale 并关闭,官方未给出综合修复。
问题场景
用户在 2× NVIDIA RTX PRO 6000 Blackwell Workstation Edition(SM120 / compute capability 12.0,TP=2)上运行 vLLM 0.24.0,尝试用 deepseek-ai/DeepSeek-V4-Flash 与 Qwen/Qwen3.6-27B-FP8 提供服务。报告者称需要 9 项 workaround(5 个环境变量、4 个代码补丁)并禁用 2 个主要特性(CUDA graphs、speculative decoding)才能跑通,其中一个崩溃点发生在 CUDA graphs 图捕获(默认 FULL_AND_PIECEWISE)与 custom all-reduce 注册交互时。
报错原文
CUDA out of memory
与图捕获路径相关的核心报错(来自复现矩阵):
Cuda error csrc/custom_all_reduce.cuh:455 'invalid argument'
原因分析
Issue 中给出了较明确的结论:该崩溃并非 SM120 独有,而是 allocator 交互问题。报错位置 csrc/custom_all_reduce.cuh:455 是 get_graph_buffer_ipc_meta() 中的 cudaIpcGetMemHandle;PyTorch 的 expandable_segments 通过 CUDA VMM(cuMemCreate)分配显存,而传统 CUDA IPC 无法导出这类内存,因此返回 'invalid argument'。Eager 模式下的 custom all-reduce 不受影响,因为初始化阶段的共享缓冲是扩展中的原始 cudaMalloc;只有图捕获注册路径会遍历 torch 分配的缓冲区。SM120 用户更容易撞上它,只是因为在这类卡上 expandable_segments 是常用规避手段。
其余被报告的问题(DeepGemm warmup 忽略 auto-disable、FP8 kernel 调优缺失、cooperative_topk cluster launch 被拒、breakable_cudagraph.py 与 DSA indexer torch fallback 路径等)Issue 认为属于相互独立的 DeepGemm / CUTLASS / cudagraph kernel 缺口,其中 9b 与 9c 可能是同一底层 bug。这些部分属于可能原因,未在本 Issue 中给出统一修复。
环境排查
- 确认 vLLM 版本是否为 0.24.0,以及构建时的 CUDA Archs 是否已设置(报告者的构建为
CUDA Archs: Not Set,可能影响 SM100/SM120 kernel 选择)。 - 确认 GPU 架构是否为 SM120 / compute capability 12.0(即
cap.major == 12),与 B100/B200 的 SM100(major == 10)区分开。 - 确认 CUDA 13.0、PyTorch 2.11.0+cu130、Triton 3.6.0、flashinfer-python 0.6.14、Python 3.12 的版本组合。
- 确认驱动 595.71.05(open kernel module)与 OS Ubuntu 24.04。
- 重点检查是否设置了
PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True,以及是否启用了 CUDA graphs(FULL_AND_PIECEWISE)。 - 检查
nvidia-smi topo -m的 GPU 拓扑(报告者为 PCIe/PHB 连接,无 NVLink,两块 GPU 同属一个 NUMA 节点)。 - 相关环境变量:
LD_LIBRARY_PATH=/usr/local/cuda-13.0/lib64、CUDA_HOME=/usr/local/cuda-13.0、PYTORCH_NVML_BASED_CUDA_CHECK=1、TORCHINDUCTOR_COMPILE_THREADS=1、TORCHINDUCTOR_CACHE_DIR=/tmp/torchinductor_sdi2sh。
解决步骤
- 先确认崩溃是否与 allocator 相关:在 2× RTX PRO 5000 Blackwell(SM120,CUDA 13.0,torch 2.11.0+cu130)TP=2 的复现矩阵中,默认 allocator 下 CUDA graphs 可完整捕获,custom AR 注册 4902 个 graph addresses,生成正常。
- 若复现时需要
PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True,该配置会触发Cuda error csrc/custom_all_reduce.cuh:455 'invalid argument'。 - 可优先尝试的修复:应用 PR #43923(在捕获期间临时关闭 expandable_segments,采用
cumem.py中已有的同类模式)。Issue 中报告者已在同一硬件上验证:打上该补丁后,expandable_segments:True+ TP=2 + full cudagraphs 可通过。 - 如暂时不打补丁,可先去掉
expandable_segments:True,回到默认 allocator 以绕过该崩溃点。 - 其余 SM120 相关缺口(DeepGemm warmup auto-disable、FP8 调优、cooperative_topk cluster launch、breakable cudagraph / DSA indexer torch fallback 路径)未被本 Issue 统一修复,需按各自独立 Issue 处理,不要期望单一补丁覆盖全部。
验证方法
在 SM120、TP=2 环境下开启 FULL_AND_PIECEWISE cudagraphs 并保留 expandable_segments:True,观察是否仍出现 csrc/custom_all_reduce.cuh:455 'invalid argument'。若打上 PR #43923 后 full cudagraphs 能完成捕获且模型正常生成,即说明该 allocator 交互问题已被绕过。Issue 中明确提示:expandable_segments 在 SM120 上常被用作其他问题的规避手段,因此修好这一处不代表其余 SM120 兼容缺口也已解决。
参考来源
AI 工具推荐
想把多个 AI 模型放在一个入口?
GamsGo AI 集成 ChatGPT、DeepSeek、Gemini、Claude、Midjourney、Veo 等常用模型,适合写作、绘图、视频和日常 AI 工作流。
推广链接:通过此链接购买,我可能获得佣金,不影响你的价格。
这个方案解决了吗?
可以继续搜索完整报错,或查看同一工具的其他排查指南。


![[Bug]: Scale-out token path breaks stop strings: stop text leaks into derendered output (include_stop_str_in_output ignored) and --tokens-on](https://www.chat-gpts.plus/wp-content/uploads/2026/10/57052-93eb6054-768x403.jpg)