Prhub

#28749 Fix nightly CI test for GLM-4.6 + B200

原始 PR 作者 b8zhong 合并时间 2026-06-25 03:34 文件变更 2 提交数 3 评论 4 代码增减 +10 / -6

执行摘要

修复 GLM-4.6 在 B200 上的 CI 失败

Nightly CI test for GLM-4.6 on B200 始终失败,而本地测试正常。PR body 提到可能权重下载不完整,但实际根因是 B200 硬件(SM100)上的 MoE runner 后端未正确配置。

建议快速合入。这是一个针对硬件特定配置的精准修复,改动量小且经过验证。

讨论亮点

无人工 review 讨论。仅 Gemini 代码助手自动评论确认变更直观。

实现拆解

  1. Python/sglang/srt/server_args.py: 在 Glm4MoeForCausalLM 模型分支中,将条件判断从 self.quantization == "modelopt_fp4" 扩展为 self.quantization in {"modelopt_fp4", None}。这样当量化参数为 None(即未量化)时,也能设置 moe_runner_backend = "flashinfer_trtllm",确保 SM100 上使用正确的 MoE 后端。
  2. scripts/ci/utils/slash_command_handler.py: 修改 _LEGACY_SUITE_TO_RUNNER_CONFIG 映射,将 "nightly-8-gpu-common" 的值从单个字符串 "8-gpu-h200" 改为列表 ["8-gpu-h200", "8-gpu-b200"]。同时更新 detect_suite 函数以处理列表值,使 /rerun-test 命令能同时将测试分发到 H200 和 B200。
文件 模块 状态 重要度
python/sglang/srt/server_args.py 模型配置 modified 5.29
scripts/ci/utils/slash_command_handler.py CI 脚本 modified 4.48

关键源码片段

python/sglang/srt/server_args.py core-logic

核心修复:放宽 Glm4MoeForCausalLM 模型在 SM100 上 MoE runner 后端的条件判断,支持未量化场景。

# python/sglang/srt/server_args.py ( 第 4329-4337 行 )
                if (
                    self.quantization in {"modelopt_fp4", None} # 原为 == "modelopt_fp4",现支持 None(未量化)
                    and self.moe_a2a_backend == "none"
                    and self.moe_runner_backend == "auto"
                ):
                    self.moe_runner_backend = "flashinfer_trtllm"
                    logger.info(
                        "Use flashinfer_trtllm as MoE runner backend on sm100 for Glm4MoeForCausalLM"
                    )
scripts/ci/utils/slash_command_handler.py infrastructure

修复 /rerun-test 命令对 nightly-8-gpu-common 套件的分发逻辑,确保同时运行在 H200 和 B200。

# scripts/ci/utils/slash_command_handler.py# 第 728 行:映射改为列表,同时分发到 H200 和 B200
"nightly-8-gpu-common": ["8-gpu-h200", "8-gpu-b200"],# detect_suite 函数(第 833-843 行)适配列表值
if mappable:
    results = []
    for s in mappable:
        rcs = _LEGACY_SUITE_TO_RUNNER_CONFIG[s]
        if isinstance(rcs, str):
            rcs = [rcs] # 兼容旧格式
        for rc in rcs:
            results.append(_resolve_runner_config(rc, full_path, s))
    return results

评论区精华

没有提炼出高价值讨论线程

当前评论区没有形成足够清晰的争议点或结论,后续有更多讨论时会体现在这里。

风险与影响

风险较低。server_args.py 的改动仅放宽条件判断,加入 None 值,不影响现有量化模型的逻辑。CI 脚本改动将 nightly-8-gpu-common 套件额外分发到 B200,可能增加 CI 资源消耗,但属于预期行为。

直接影响:GLM-4.6 模型在 B200(SM100)上能正确配置 MoE runner,修复 nightly CI 测试。间接影响:/rerun-test 命令现在会将 nightly-8-gpu-common 套件同时分发到 H200 和 B200,确保 Blackwell 硬件上的测试覆盖。

核心路径变更 CI 配置变更

关联 Issue

未识别关联 Issue

当前没有检测到明确关联的 Issue 链接,后续同步到相关引用后会出现在这里。

完整报告

参与讨论