# PR #27856 完整报告

- 仓库：`sgl-project/sglang`
- 标题：Remove extra_pytest_path from pr-test.yml
- 合并时间：2026-06-11 12:16
- 原文链接：http://prhub.com.cn/sgl-project/sglang/pull/27856

---

# 执行摘要

- 一句话：移除 CI 工作流中的额外 pytest 路径配置
- 推荐动作：值得快速合并。这是一个小的清理修复，消除了冗余配置并确保了正确的测试覆盖。建议在合并前确认 CI 中 `base-b-kernel-unit-1-gpu-b200` 套件已正确触发。

# 功能与动机

PR body 中仅说明“移除了 workflow 配置中的 extra_pytest_path”，未提及具体 Issue。但从 review 评论可知，原来通过 `extra_pytest_path` 在 base-B 路径上运行 FA4 测试的方式不再必要，因为已通过注册 `base-b-kernel-unit-1-gpu-b200` 套件来覆盖 Blackwell 的测试。因此动机是清理冗余配置并正确化测试覆盖。

# 实现拆解

1. **移除工作流配置**：在 `.github/workflows/pr-test.yml` 中删除 `extra_pytest_path: 'test/registered/jit/test_flash_attention_4.py'` 这一行。该配置原本强制在某个 CI job 中额外运行 FA4 测试文件。 
2. **添加 CI 注册**：在 `test/registered/jit/test_flash_attention_4.py` 中增加一行 `register_cuda_ci(est_time=120, suite="base-b-kernel-unit-1-gpu-b200")`。这会将 FA4 测试注册到 `base-b-kernel-unit-1-gpu-b200` 套件中，该套件预期在 Blackwell GPU 上运行。 
3. **确保测试覆盖**：通过新注册，FA4 测试不再依赖 `extra_pytest_path` 的强制导入，而是作为标准 CI 套件的一部分运行，避免了之前可能存在的覆盖缺失（review 评论指出原配置下 FA4 测试在 Blackwell 上实际未运行）。

关键文件：
- `.github/workflows/pr-test.yml`（模块 CI 配置；类别 infra；类型 infrastructure）: 删除了 extra_pytest_path 配置行，是配置清理的主要变更点。
- `test/registered/jit/test_flash_attention_4.py`（模块 测试注册；类别 test；类型 test-coverage）: 新增了一行 CI 注册，确保 FA4 测试在 Blackwell GPU 上运行，是维持测试覆盖的关键补充。

关键符号：未识别

## 关键源码片段

### `.github/workflows/pr-test.yml`

删除了 extra_pytest_path 配置行，是配置清理的主要变更点。

```yaml
# .github/workflows/pr-test.yml ( 部分 )
jobs:
  call-base-b-test:
    # ...
    with:
      caller_inputs: ${{ toJson(inputs) }}
      partitions: ${{ needs.check-changes.outputs.partitions }}
      run_timeout_minutes: '40'
      # 移除了 extra_pytest_path: 'test/registered/jit/test_flash_attention_4.py'
      # 该配置曾强制在某个 CI job 中额外运行 FA4 测试文件
    secrets: inherit

```

### `test/registered/jit/test_flash_attention_4.py`

新增了一行 CI 注册，确保 FA4 测试在 Blackwell GPU 上运行，是维持测试覆盖的关键补充。

```python
# test/registered/jit/test_flash_attention_4.py ( 部分 )
from sglang.test.ci.ci_register import register_cuda_ci

# 注册常规 large 套件（H100 上运行）
register_cuda_ci(est_time=120, suite="base-b-kernel-unit-1-gpu-large")
# 新增：注册 b200 套件（Blackwell GPU 上运行），替代原来的 extra_pytest_path
register_cuda_ci(est_time=120, suite="base-b-kernel-unit-1-gpu-b200")
# 注册夜间测试套件
register_cuda_ci(est_time=900, suite="nightly-kernel-1-gpu", nightly=True)

# 跳过 Hopper 以下架构（compute capability < 10.0）
skip_condition = torch.cuda.get_device_capability() < (10, 0)

```

# 评论区精华

Review 评论中，`chatgpt-codex-connector[bot]` 指出：删除 `extra_pytest_path` 会导致 FA4 测试不再在 Blackwell GPU 上运行，因为原测试注册在 `base-b-kernel-unit-1-gpu-large`（运行于 H100），且 `skip_condition` 跳过 compute capability < 10.0 的设备。但第二个 commit 已添加 `base-b-kernel-unit-1-gpu-b200` 注册，解决了该问题。最终评论状态为已解决。

- B200 测试覆盖丢失风险 (correctness): 作者通过添加 base-b-kernel-unit-1-gpu-b200 注册解决了该问题。评论被视为已解决。

# 风险与影响

- 风险：低风险。变更主要涉及 CI 配置和测试套件注册。如果 `base-b-kernel-unit-1-gpu-b200` 套件未在 CI 中正确配置或运行，可能导致 Blackwell GPU 上的 FA4 测试遗漏。但从 PR 作者后续添加的注册来看，风险已缓解。另外，`extra_pytest_path` 的移除可能影响其他依赖该路径的流程，但目前未发现。
- 影响：影响范围仅限于 CI 流程：FA4 测试将不再通过 `extra_pytest_path` 强制运行，而是作为标准套件 `base-b-kernel-unit-1-gpu-b200` 的一部分。对用户功能无影响，对开发者的 CI 体验有轻微改进（配置更简洁）。
- 风险标记：CI 配置变更 , 测试套件依赖

# 关联脉络

- 暂无明显关联 PR