已开启
【26.2.0众测】TorchNPU 26.1.0 众测任务交付:安装验证、快速入门迁移训练、torch.compile 13项后端体验与问题反馈(gcw_8p1hhlB0) #38
【26.2.0众测】TorchNPU 26.1.0 众测任务交付:安装验证、快速入门迁移训练、torch.compile 13项后端体验与问题反馈(gcw_8p1hhlB0) #38
已开启
GMOW创建于 11 天前
GMOW
GMOW
11 天前

一、变更说明

本人按《TorchNPU 众测任务书》完成 TorchNPU 26.1.0 众测三项任务(软件安装、快速入门迁移训练、torch.compile 体验与实践),证明材料提交至以 gitcode 账号命名的独立文件夹 gcw_8p1hhlB0/,并已按《TorchNPU 26.1.0 众测任务提交格式要求》的交付件样本格式组织(任务1/任务2/补充 三级目录,交付件说明.txt + 链接交付件.xls)。

环境:Atlas 800T A2(Ascend 910B3, 64GB)/ CANN 9.1.0 / TorchNPU 2.7.1.post8 与 2.9.0.post6(26.1.0 配套)/ PyTorch 2.7.1 与 2.9.0 / Python 3.11 / Ubuntu 24.04 aarch64

二、变更内容(101 个文件)

01_tasks/2026/torch_npu_public_beta/gcw_8p1hhlB0/
├── README.md                        # 材料总览(截图嵌入+结果汇总表)
├── 任务1-安装与快速入门/             # 任务书 4.2.1 + 4.2.2
│   ├── 交付件说明.txt / 链接交付件.xls
│   ├── 软件安装/1_pip_list截图.png、2_torch_npu导入截图.png
│   └── 快速入门/1_训练脚本.py、2_训练成功截图.png、3_权重文件截图.png
├── 任务2-torch.compile体验与实践/    # 任务书 5.2(13 个改写示例)
│   ├── 交付件说明.txt / 链接交付件.xls
│   ├── Guard Filter/(0_公共模块 + 1~6 脚本 + 7/8/9 截图)
│   ├── Inductor-Triton ~ TorchAir-GE 7 个后端文件夹
│   │   (各含 0_公共模块 + 1_改写脚本 + 2_正确性验证截图 + 3_性能对比截图)
│   └── Inductor-MLIR/ 额外含 4_规避方案AB对比截图.png
└── 补充-测试报告与原始日志/
    ├── 众测测试报告.md(7 问题 + 8 建议 + 汇总表)
    ├── issue提交记录.md / 复现命令清单.md / run_task3.sh / env_setup.sh
    ├── 原始日志/(19 个:4.2.x + 13 示例)
    ├── GuardFilter-每示例截图/、MLIR问题定位/、故障卡问题证据/、对照脚本/

三、任务完成情况(对照任务书)

任务 成功基准 完成情况
4.2.1 软件安装 torch_npu 可正常导入并运行 ✅ 官方验证命令输出 tensor(..., device='npu:0')
4.2.2 快速入门 训练跑通、生成 checkpoint、无报错中断 ✅ transfer_to_npu + AMP,train acc 99.4%,MNIST 测试集 98.1%,权重无 NaN
5.2.3 表1 Guard Filter 6 + 后端 7 改写;1 重编译消除 + 8 正确性 + 8 性能截图 ✅ 13 脚本 + 13 日志 + 截图齐全(每示例终端截图同时含正确性与性能输出,已注明)

四、torch.compile 实测结果(resnet18, bs=8, 910B3, torch 2.9.0 + torch_npu 2.9.0.post6)

后端 正确性 稳态加速比
Inductor-Triton(默认) PASS 0.04x(慢 25 倍) ⚠️
Inductor-MLIR FAIL(max diff 0.72) ⚠️ 1.36x
Inductor-DVM PASS 1.38x
NPUGraphs PASS 1.34x
NPUGraph_EX PASS 1.47x
AOT_Eager PASS 0.65x(符合预期)
TorchAir-GE PASS 1.95x(最优)

Guard Filter 重编译消除:01/03/04/05 PASS、06 guard 削减 81%、02 未消除(C 层 GlobalStateGuard 限制)。⚠️ 项为如实记录的问题反馈(任务书:有效的问题反馈是验收通过的重要依据)。

五、已提交的社区 Issue(标题带【26.2.0众测】)

问题详情与 8 条改进建议见 补充-测试报告与原始日志/众测测试报告.md;体验问卷(平台侧)已填写。

六、复现方式

  • 任务1:source 补充-测试报告与原始日志/env_setup.sh 后按 复现命令清单.md 执行
  • 任务2:补充-测试报告与原始日志/run_task3.sh <01~13|all>(自动 venv PyTorch 2.9.0 + 限编译线程防 OOM)
  • 正确性结论确定性复现;性能数字小幅波动

七、自测确认

likedislike
合并受阻
ascend-robotascend-robot成员
11 天前 添加了label:ascend-cla/yes
ascend-robot
ascend-robot成员
11 天前 评论:

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

⚠️ This PR does not yet meet the following requirements:lgtm (requires ≥ 2 person(s) per module)、approve (requires ≥ 1 person(s) per module)

Module Approval Details

module lgtm status approve status
repo-Ascend/pytorch-ecosystem ❌ (0/2)(You can also ask: xushuaiyxf, huangjingwei, chenrayray, helixing, yi_jiabin) ❌ (0/1)(You can also ask: zyw-hw, ltllt1, xushuaiyxf, TaroKK, helixing)

💡 Tip:

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

CLA Signature Pass

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

likedislike
GMOWGMOW
11 天前 设置为草稿状态
此处折叠了10条事件消息 查看更多
GMOWGMOW
11 天前 修改了pull request 的描述
GMOW
GMOW
11 天前 评论:

compile

likedislike
GMOWGMOW
11 天前 修改了pull request 的描述
此处折叠了16条事件消息 查看更多
ascend-robotascend-robot成员
1 天前 添加了label:ascend-cla/yes