Prhub

#27526 [XPU CI] Re-enable stage B with docker-pull flow and split tests

原始 PR 作者 arathi-hlab 合并时间 2026-06-09 09:26 文件变更 7 提交数 4 评论 1 代码增减 +63 / -63

执行摘要

重新启用 XPU CI 的 stage B 测试并拆分测试套件

之前 stage B 的测试被合并到 stage A,导致 stage A 运行时间过长。PR #27282 将 stage A 切换为 docker-pull 流程后,能够以相同方式重新启用 stage B,分担重测试,从而提升 CI 整体效率和稳定性。

值得关注 CI 配置模式(预构建镜像拉取 + 多阶段拆分)的实践,可作为其他硬件后端 CI 优化的参考。核心开发人员无需深入阅读代码细节。

讨论亮点

无实质性讨论。由项目维护者 mingfeima 直接批准,gemini-code-assist[bot] 自动评论但未提供具体反馈。

实现拆解

  1. 修改 CI 工作流.github/workflows/pr-test-xpu.yml):取消注释原 stage B job 配置,改为使用与 stage A 一致的 xpu_ci_start_container.sh 辅助脚本和预构建镜像拉取流程,并添加对 wait-for-stage-a 的依赖。
  2. 拆分测试套件:将 6 个 XPU 测试文件的注册套件从 stage-a-test-1-gpu-xpu 改为 stage-b-test-1-gpu-xpu,包括 test_deepseek_ocrtest_deepseek_ocr_tritontest_intel_xpu_backendtest_topktest_chunk_gated_delta_rule
  3. 禁用 OOM 测试test_gemma_4_e2b.py 因在 stage B 运行器上启动时内存不足(OOM),在 register_xpu_ci 调用中添加 disabled 参数跳过注册,同时保留文件以通过 lint 钩子检查。
文件 模块 状态 重要度
.github/workflows/pr-test-xpu.yml CI 流程 modified 5.37
test/registered/xpu/test_gemma_4_e2b.py E2E 测试 modified 4.03
test/registered/xpu/test_deepseek_ocr_triton.py OCR 测试 modified 3.62
test/registered/attention/test_chunk_gated_delta_rule.py Attention 测试 modified 3.45
test/registered/xpu/test_deepseek_ocr.py OCR 测试 modified 3.45
test/registered/xpu/test_intel_xpu_backend.py XPU 后端 modified 3.45
test/registered/xpu/test_topk.py TopK 测试 modified 3.45

关键源码片段

test/registered/xpu/test_gemma_4_e2b.py test-coverage

因 OOM 禁用该测试注册,但保留文件通过 lint 检查

from sglang.test.ci.ci_register import register_xpu_ci# Single e2e test: boot + a short Q&A.
register_xpu_ci(
    est_time=240,
    suite="stage-b-test-1-gpu-xpu",
    # CI 注册时直接跳过,但保留文件使 pre-commit lint 通过
    disabled="OOM on stage-b XPU runner (server launch fails with --mem-fraction-static)",
)

评论区精华

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

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

风险与影响

低风险。变更仅涉及 CI 配置和测试注册,不影响运行时代码或核心逻辑。主要风险包括:

  • test_gemma_4_e2b 被添加 disabled 参数,可能遗漏回归直到内存问题解决。
  • stage B 测试依赖预构建镜像拉取,若镜像不可用则全部失败。
  • 部分测试(如 test_chunk_gated_delta_rule)估计时间长达 900 秒,可能导致 stage B 超时。

影响范围限于 XPU CI 测试。stage A 测试时间缩短(约减少 600 秒),但整个 CI 流水线增加 stage B,总耗时可能略有增加。开发团队需监控两个 stage 的成功率和稳定性,特别是 stage B 重测试的 flakiness。

测试覆盖缺失 CI 稳定性 资源限制

关联 Issue

未识别关联 Issue

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

完整报告

参与讨论