已合并
【社区任务】Ascend for PyTorch测试用例解耦(1)交付件 #35
【社区任务】Ascend for PyTorch测试用例解耦(1)交付件 #35
已合并
村雨雨雨创建于 17 天前
村雨雨雨
村雨雨雨
17 天前

本次提交为【社区任务】Ascend for PyTorch测试用例解耦(1)交付件,目录名与改造测试文件保持一致,包含解耦交付报告、NPU 测试日志、运行截图,用于任务验收。

任务信息

  • 目标测试文件:test/ao/sparsity/test_activation_sparsifier.py
  • 场景:场景三(无需解耦改造,NPU 测试通过)
  • 涉及模块:torch.ao.pruning._experimental.activation_sparsifier(激活稀疏化)

核心结论

1、本用例无硬件耦合:无 cuda 硬编码与设备实例、无 CUDA 专属装饰器、无写死 CUDA 的算子与张量、无 CUDA 专属判断分支,张量默认在 CPU 创建,因此按指导书判定为无需解耦改造。已按上游规范为 TestActivationSparsifier 补充类属性 hw_classification = HardwareClassification.GENERIC,改造前后用例集合不变(1 个测试方法;剔除分类属性后 AST 与改动前逐字节一致),不影响原有 CPU/GPU 社区 CI。

2、PyTorch 上游社区 PR:https://github.com/pytorch/pytorch/pull/192479 ,状态:Merged(2026-09-14 05:49:13 UTC 合入 main,合入提交 6996e37e76ee,改动 +3/−0)。

3、TorchNPU 变更:无需修改。本次仅为上游测试类补充硬件分类元数据,不引入新的设备接口,TorchNPU 侧无需同步修改,也不涉及既有 Patch 的替换或删除。

4、NPU 验证:在 A2(Ascend910B3)和 A5(950PR)平台完成自测,共 1 个用例,通过 1,失败 0,跳过 0。两平台均以三个入口验证(目标文件直跑 / 聚合入口 pytest / 聚合入口 unittest),全部 exit=0;上游社区 CI 共 320 项检查,无 failure。

硬件平台 涉及用例数 通过 失败 跳过 结论
A2(Ascend910B3) 1 1 0 0 通过
A5(950PR) 1 1 0 0 通过

交付文件清单

路径 说明
task_1_test_activation_sparsifier/test_activation_sparsifier解耦交付报告.md 用例硬件解耦交付报告(背景 / 方案 / PR / 验证结果 / 源码一致性 / 交付 Checklist)
task_1_test_activation_sparsifier/log/A2-test_activation_sparsifier.log A2(Ascend910B3)平台日志:环境自检 + 版本校验 + 三个入口 + 汇总
task_1_test_activation_sparsifier/log/A5-test_activation_sparsifier.log A5(950PR)平台日志:环境自检 + 版本校验 + 三个入口 + 汇总
task_1_test_activation_sparsifier/screenshots/A2-environment.png、A2-test_activation_sparsifier.png A2 环境自检图 / 目标用例通过图
task_1_test_activation_sparsifier/screenshots/A5-environment.png、A5-test_activation_sparsifier.png A5 环境自检图 / 目标用例通过图

目录按指导书固定结构组织(交付报告 + log/ + screenshots/);上游 CI 逐项结果、AST 一致性检查、合入补丁快照、复跑脚本等过程材料已归纳进交付报告正文(2 / 3.2 / 3.3 / 4.9 / 5 节),不单独随包提交。

likedislike
Pull Request已成功合入, 合并人@ascend-robot
(感谢 村雨雨雨 的贡献)
村雨雨雨村雨雨雨
17 天前 关联了issue:【社区任务】Ascend for PyTorch测试用例解耦(1)【已领取】,【社区任务】Ascend for PyTorch测试用例解耦(11)【已领取】
ascend-robotascend-robot成员
17 天前 添加了label:ascend-cla/yes
ascend-robot
ascend-robot成员
17 天前 评论:

Thanks for your pull-request.
The full list of commands accepted by me can be found at here.
You can get sig-info at here.
You can self-configure the PR merge rules for this repository. For more details, please refer to Here.


PR Approval Progress

✅ Congratulations! All modules have met the lgtm and approve requirements.

Module Approval Details

module lgtm status approve status
repo-Ascend/pytorch-ecosystem ✅ qianxiyue, xuyun15 (2/2) ✅ qianxiyue (1/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

Murasame_214, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
村雨雨雨村雨雨雨
17 天前 修改了pull request 的描述
此处折叠了25条事件消息 查看更多
ascend-robotascend-robot成员
10 天前 添加了label:ascend-cla/yes
hid87721478成员
9 天前 评论:

/approve

likedislike
ascend-robotascend-robot成员
9 天前 添加了label:approved
xuyun15成员
2 天前 评论:

/lgtm

likedislike
ascend-robotascend-robot成员
2 天前 添加了label:lgtm
ascend-robotascend-robot成员
2 天前 合入了pull request