# PR #53035 完整报告

- 仓库：`vllm-project/vllm`
- 标题：[CI][XPU] Skip test_fused_shared_expert.py on XPU
- 合并时间：2026-08-20 14:56
- 原文链接：http://prhub.com.cn/vllm-project/vllm/pull/53035

---

# 执行摘要

- 一句话：XPU 上跳过 fused_shared_expert 测试
- 推荐动作：该 PR 简单直接，无需精读。关注测试跳过策略的合理性，确保未来功能支持时能及时调整。

# 功能与动机

PR body 说明 `this UT is meaningless on XPU`，即该单元测试在 XPU 平台上无意义，因为测试针对的 fused shared expert 功能依赖 ROCm 特定的 aiter 算子，XPU 不支持，导致测试在 XPU CI 上运行失败或无效。

# 实现拆解

1. **引入平台检测**：在 `tests/model_executor/layers/test_fused_shared_expert.py` 中新增导入 `from vllm.platforms import current_platform`。
2. **添加条件跳过**：在文件顶部（imports 之后）添加 `pytestmark = pytest.mark.skipif(current_platform.is_xpu(), reason="ROCm-specific aiter ops are not supported on XPU")`，使整个测试模块在 XPU 平台被跳过。
3. **无需其他配套**：由于是纯测试跳过逻辑，不涉及源码、配置或部署改动。

关键文件：
- `tests/model_executor/layers/test_fused_shared_expert.py`（模块 测试；类别 test；类型 test-coverage）: 该测试文件添加了 XPU 平台的条件跳过，是本次变更的核心。

关键符号：未识别

## 关键源码片段

### `tests/model_executor/layers/test_fused_shared_expert.py`

该测试文件添加了 XPU 平台的条件跳过，是本次变更的核心。

```python
# tests/model_executor/layers/test_fused_shared_expert.py

# 引入平台检测模块
from vllm.platforms import current_platform

# 通过 pytestmark 实现模块级条件跳过：当运行在 XPU 平台时跳过所有测试
pytestmark = pytest.mark.skipif(
    current_platform.is_xpu(),
    reason="ROCm-specific aiter ops are not supported on XPU",
)

# 注意：后续测试用例无需修改，整个模块将被跳过

```

# 评论区精华

无实质性 review 讨论。`jikunshang` 批准了 PR，并触发了 CI。

- 暂无高价值评论线程

# 风险与影响

- 风险：风险极低。该改动仅跳过测试，不影响产品代码。但需注意：若未来 XPU 支持相关功能，该跳过条件需更新；且跳过整个文件可能掩盖其他潜在问题。
- 影响：影响范围仅限于 XPU 平台的 CI 测试执行，减少无效测试失败，节省 CI 资源。对其他平台无影响。
- 风险标记：测试跳过策略

# 关联脉络

- PR #52976 [CI][ROCm] Standardize AMD test job labels by device: 涉及测试设备标签标准化，与本次 XPU 跳过逻辑有相似之处，可能影响 CI 测试的筛选。