已合并
fix(nn): fix test for nn api: torch.nn.ParameterDict, torch.nn.ParameterList, torch.nn.Sequential #32058
dinglaiping创建于 3月19日
fix(nn): fix test for nn api: torch.nn.ParameterDict, torch.nn.ParameterList, torch.nn.Sequential #32058
已合并
从已删除 :fixtest-nn-api-2.9.0合入到Ascend/pytorchv2.9.0
Pull Request已成功合入, 合并人@ascend-robot
(感谢 dinglaiping 的贡献)3月19日 创建了 pull request,commit 111e5d33
Ddinglaiping
3月19日 关联了issue:[Bug]: 验证torch.nn.ParameterDict, torch.nn.ParameterList, torch.nn.Sequential这三个API的时候发现官网test目录下test_nn.py文件存在错误
3月19日 关联了issue:[Bug]: 验证torch.nn.ParameterDict, torch.nn.ParameterList, torch.nn.Sequential这三个API的时候发现官网test目录下test_nn.py文件存在错误
AtlasAccount
3月19日 评论:
3月19日 评论:
dinglaiping
3月19日 评论:
3月19日 评论:
compile


3月19日 添加了label:ci-pipeline-failed
ascend-robot
3月19日 评论:
3月19日 评论:
流水线 PR-pipeline_pytorch#11519 运行失败
| 阶段 | 任务名 | 状态 | 详情 |
|---|---|---|---|
| 编译构建 | Build_X86 | 🕚 | >>> |
| Build_ARM | 🕚 | >>> | |
| Build_LibTorch_x86 | 🕚 | >>> | |
| Build_X86_torchair | 🕚 | >>> | |
| Build_ARM_torchair | 🕚 | >>> | |
| Build_ARM_inductor | 🕚 | >>> | |
| 恶意代码检查 | Antipoison | ✅ | >>> |
| 编码安全与规范检查 | CodeCheck | ❌ | >>> |
| check_error | ✅ | >>> | |
| 开源片段检查 | SCA | ✅ | >>> |
| 开发者测试 | UT_X86_Part_01 | 🕚 | >>> |
| UT_X86_Part_02 | 🕚 | >>> | |
| UT_ARM_A3_Part_01 | 🕚 | >>> | |
| UT_ARM_A3_Part_02 | 🕚 | >>> | |
| UT_DIST_X86_Part_01 | 🕚 | >>> | |
| UT_DIST_X86_Part_02 | 🕚 | >>> | |
| UT_DIST_X86_Part_03 | 🕚 | >>> | |
| UT_DIST_X86_Part_04 | 🕚 | >>> | |
| UT_inductor_Part_01 | 🕚 | >>> | |
| UT_inductor_Part_02 | 🕚 | >>> | |
| UT_inductor_Part_03 | 🕚 | >>> | |
| UT_inductor_Part_04 | 🕚 | >>> | |
| UT_ARM_A2_Part_01 | 🕚 | >>> | |
| UT_ARM_A2_Part_02 | 🕚 | >>> | |
| 流水线 | PR-pipeline_pytorch | ❌ | >>> |


dinglaiping
3月19日 评论:
3月19日 评论:
compile


3月19日 删除了label:ci-pipeline-failed
3月19日 添加了label:ci-pipeline-running
3月19日 删除了label:ci-pipeline-running
3月19日 添加了label:ci-pipeline-failed
ascend-robot
3月19日 评论:
3月19日 评论:
流水线 PR-pipeline_pytorch#11527 运行失败
| 阶段 | 任务名 | 状态 | 详情 |
|---|---|---|---|
| 编译构建 | Build_X86 | ✅ | >>> |
| Build_ARM | ✅ | >>> | |
| Build_LibTorch_x86 | ✅ | >>> | |
| Build_X86_torchair | 🛑 | >>> | |
| Build_ARM_torchair | 🛑 | >>> | |
| Build_ARM_inductor | 🛑 | >>> | |
| 恶意代码检查 | Antipoison | ✅ | >>> |
| 编码安全与规范检查 | CodeCheck | ✅ | >>> |
| check_error | ✅ | >>> | |
| 开源片段检查 | SCA | ✅ | >>> |
| 开发者测试 | UT_X86_Part_01 | 🛑 | >>> |
| UT_X86_Part_02 | 🛑 | >>> | |
| UT_ARM_A3_Part_01 | 🛑 | >>> | |
| UT_ARM_A3_Part_02 | 🛑 | >>> | |
| UT_DIST_X86_Part_01 | 🛑 | >>> | |
| UT_DIST_X86_Part_02 | 🛑 | >>> | |
| UT_DIST_X86_Part_03 | 🛑 | >>> | |
| UT_DIST_X86_Part_04 | 🛑 | >>> | |
| UT_inductor_Part_01 | 🛑 | >>> | |
| UT_inductor_Part_02 | 🛑 | >>> | |
| UT_inductor_Part_03 | 🛑 | >>> | |
| UT_inductor_Part_04 | 🛑 | >>> | |
| UT_ARM_A2_Part_01 | ❌ | >>> | |
| UT_ARM_A2_Part_02 | ✅ | >>> | |
| 流水线 | PR-pipeline_pytorch | ❌ | >>> |


Ddinglaiping
3月20日 update merge request[project id: 7404318, iid: 32058, commit_id: a20cc8617f61c69d6093e8e7f8e206034fdf9608] virtual merging success
3月20日 update merge request[project id: 7404318, iid: 32058, commit_id: a20cc8617f61c69d6093e8e7f8e206034fdf9608] virtual merging success
Ddinglaiping
3月20日 强制推送 1 个提交:63b325f8-fix(nn): fix test for nn api: torch.nn.ParameterDict, torch.nn.ParameterList, torch.nn.Sequential
3月20日 强制推送 1 个提交:63b325f8-fix(nn): fix test for nn api: torch.nn.ParameterDict, torch.nn.ParameterList, torch.nn.Sequential
Ddinglaiping
3月20日 update merge request[project id: 7404318, iid: 32058, commit_id: 30985e6b5db00536bc6eea19998dbe3be6f0bbb9] virtual merging success
3月20日 update merge request[project id: 7404318, iid: 32058, commit_id: 30985e6b5db00536bc6eea19998dbe3be6f0bbb9] virtual merging success
ascend-robot
3月20日 评论:
3月20日 评论:
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
PR Approval Progress
✅ Congratulations! All modules have met the lgtm and approve requirements.
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| test | ✅ liwei386, yuhaiyan (2/2) | ✅ liwei386 (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
dinglaiping, thanks for your pull request. All authors of the commits have signed the CLA. 👍


3月20日 添加了label:ascend-cla/yes
dinglaiping
3月20日 评论:
3月20日 评论:
compile


3月20日 删除了label:ci-pipeline-failed
3月20日 添加了label:ci-pipeline-failed
3月20日 删除了label:ci-pipeline-failed
3月20日 添加了label:ci-pipeline-running
3月20日 删除了label:ci-pipeline-running
3月20日 添加了label:ci-pipeline-failed
ascend-robot
3月20日 评论:
3月20日 评论:
流水线 PR-pipeline_pytorch#11812 运行失败
| 阶段 | 任务名 | 状态 | 详情 |
|---|---|---|---|
| 编译构建 | Build_X86 | ✅ | >>> |
| Build_ARM | ✅ | >>> | |
| Build_LibTorch_x86 | ✅ | >>> | |
| Build_X86_torchair | 🛑 | >>> | |
| Build_ARM_torchair | 🛑 | >>> | |
| Build_ARM_inductor | 🛑 | >>> | |
| 恶意代码检查 | Antipoison | ✅ | >>> |
| 编码安全与规范检查 | CodeCheck | ✅ | >>> |
| check_error | ✅ | >>> | |
| 开源片段检查 | SCA | ✅ | >>> |
| 开发者测试 | UT_X86_Part_01 | 🛑 | >>> |
| UT_X86_Part_02 | 🛑 | >>> | |
| UT_ARM_A3_Part_01 | 🛑 | >>> | |
| UT_ARM_A3_Part_02 | 🛑 | >>> | |
| UT_DIST_X86_Part_01 | 🛑 | >>> | |
| UT_DIST_X86_Part_02 | 🛑 | >>> | |
| UT_DIST_X86_Part_03 | 🛑 | >>> | |
| UT_DIST_X86_Part_04 | 🛑 | >>> | |
| UT_inductor_Part_01 | 🛑 | >>> | |
| UT_inductor_Part_02 | 🛑 | >>> | |
| UT_inductor_Part_03 | 🛑 | >>> | |
| UT_inductor_Part_04 | 🛑 | >>> | |
| UT_ARM_A2_Part_01 | ❌ | >>> | |
| UT_ARM_A2_Part_02 | ❌ | >>> | |
| 流水线 | PR-pipeline_pytorch | ❌ | >>> |


dinglaiping
3月20日 评论:
3月20日 评论:
compile


3月20日 删除了label:ci-pipeline-failed
3月20日 添加了label:ci-pipeline-running
3月20日 删除了label:ci-pipeline-running
3月20日 添加了label:ci-pipeline-passed
ascend-robot
3月20日 评论:
3月20日 评论:
流水线 PR-pipeline_pytorch#11832 已完成
| 阶段 | 任务名 | 状态 | 详情 |
|---|---|---|---|
| 编译构建 | Build_X86 | ✅ | >>> |
| Build_ARM | ✅ | >>> | |
| Build_LibTorch_x86 | ✅ | >>> | |
| Build_X86_torchair | 🛑 | >>> | |
| Build_ARM_torchair | 🛑 | >>> | |
| Build_ARM_inductor | 🛑 | >>> | |
| 恶意代码检查 | Antipoison | ✅ | >>> |
| 编码安全与规范检查 | CodeCheck | ✅ | >>> |
| check_error | ✅ | >>> | |
| 开源片段检查 | SCA | ✅ | >>> |
| 开发者测试 | UT_X86_Part_01 | 🛑 | >>> |
| UT_X86_Part_02 | 🛑 | >>> | |
| UT_ARM_A3_Part_01 | 🛑 | >>> | |
| UT_ARM_A3_Part_02 | 🛑 | >>> | |
| UT_DIST_X86_Part_01 | 🛑 | >>> | |
| UT_DIST_X86_Part_02 | 🛑 | >>> | |
| UT_DIST_X86_Part_03 | 🛑 | >>> | |
| UT_DIST_X86_Part_04 | 🛑 | >>> | |
| UT_inductor_Part_01 | 🛑 | >>> | |
| UT_inductor_Part_02 | 🛑 | >>> | |
| UT_inductor_Part_03 | 🛑 | >>> | |
| UT_inductor_Part_04 | 🛑 | >>> | |
| UT_ARM_A2_Part_01 | ✅ | >>> | |
| UT_ARM_A2_Part_02 | ✅ | >>> | |
| 流水线 | PR-pipeline_pytorch | ✅ | >>> |


haiyan8
3月25日 评论:
3月25日 评论:
/lgtm


3月25日 添加了label:approvedlgtm
ascend-robot
3月25日 评论:
3月25日 评论:
3月25日 合入了pull request
【合入来源】
【修改方案】
【资料变更】
不涉及
【接口变更】
不涉及
【功能验证】
整体结论:
本次验证通过修复官网test_nn.py用例文件,验证3个API,功能正常:
ParameterDict:官方用例中键值对索引、新增、删除、遍历等操作均正常,容器内所有参数设备统一为npu:0,无设备漂移问题;
ParameterList:官方用例中数字索引、append新增、遍历等操作均正常,参数设备一致性与长度校验均通过,有序管理能力正常;
Sequential:官方用例中getitem/setitem/delitem/append/insert/extend/pop等所有核心操作均正常执行,操作后子模块设备均保持为npu:0,动态扩展与元素管理能力完整。
运行日志:
[root@hostname-fqv42 torchnpuapi]# docker exec -it test29 bash
root@hostname-fqv42:/home# cd /root/torchnpuapi
root@hostname-fqv42:~/torchnpuapi# python -m unittest test_nn_npu27.TestNN.test_ParameterList test_nn_npu27.TestNN.test_ParameterDict test_nn_npu27.TestNN.test_Sequential_getitem test_nn_npu27.TestNN.test_Sequential_setitem test_nn_npu27.TestNN.test_Sequential_delitem test_nn_npu27.TestNN.test_Sequential_append test_nn_npu27.TestNN.test_Sequential_insert test_nn_npu27.TestNN.test_Sequential_extend test_nn_npu27.TestNN.test_Sequential_pop -v
test_ParameterList (test_nn_npu27.TestNN.test_ParameterList) ... ok
test_ParameterDict (test_nn_npu27.TestNN.test_ParameterDict) ... ok
test_Sequential_getitem (test_nn_npu27.TestNN.test_Sequential_getitem) ... ok
test_Sequential_setitem (test_nn_npu27.TestNN.test_Sequential_setitem) ... ok
test_Sequential_delitem (test_nn_npu27.TestNN.test_Sequential_delitem) ... ok
test_Sequential_append (test_nn_npu27.TestNN.test_Sequential_append) ... ok
test_Sequential_insert (test_nn_npu27.TestNN.test_Sequential_insert) ... ok
test_Sequential_extend (test_nn_npu27.TestNN.test_Sequential_extend) ... ok
test_Sequential_pop (test_nn_npu27.TestNN.test_Sequential_pop) ... ok
Ran 9 tests in 0.057s
OK
root@hostname-fqv42:~/torchnpuapi#
【CheckList】