Prhub

#53035 [CI][XPU] Skip test_fused_shared_expert.py on XPU

原始 PR 作者 mayuyuace 合并时间 2026-08-20 14:56 文件变更 1 提交数 2 评论 2 代码增减 +6 / -0

执行摘要

XPU 上跳过 fused_shared_expert 测试

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

该 PR 简单直接,无需精读。关注测试跳过策略的合理性,确保未来功能支持时能及时调整。

讨论亮点

无实质性 review 讨论。jikunshang 批准了 PR,并触发了 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 测试 modified 4.09

关键源码片段

tests/model_executor/layers/test_fused_shared_expert.py test-coverage

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

# 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",
)# 注意:后续测试用例无需修改,整个模块将被跳过

评论区精华

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

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

风险与影响

风险极低。该改动仅跳过测试,不影响产品代码。但需注意:若未来 XPU 支持相关功能,该跳过条件需更新;且跳过整个文件可能掩盖其他潜在问题。

影响范围仅限于 XPU 平台的 CI 测试执行,减少无效测试失败,节省 CI 资源。对其他平台无影响。

测试跳过策略

关联 Issue

未识别关联 Issue

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

完整报告

参与讨论