已合并
test(nn): add test for nn api: torch.nn.Parameter, torch.nn.Buffer #31892
dinglaiping创建于 3月17日
test(nn): add test for nn api: torch.nn.Parameter, torch.nn.Buffer #31892
已合并
从已删除 :addtest-nn-api-2.8.0合入到Ascend/pytorchv2.8.0
Pull Request已成功合入, 合并人@ascend-robot
(感谢 dinglaiping 的贡献)3月17日 创建了 pull request,commit 3ec55ad7
Ddinglaiping
3月17日 关联了issue:[Usage]: [Usage]: test目录下面的test_nn.py继承自pytorch社区,但是里面并没有专门验证torch.nn.Parameter, torch.nn.Buffer的测试用例,需要补充
3月17日 关联了issue:[Usage]: [Usage]: test目录下面的test_nn.py继承自pytorch社区,但是里面并没有专门验证torch.nn.Parameter, torch.nn.Buffer的测试用例,需要补充
AtlasAccount
3月17日 评论:
3月17日 评论:
ascend-robot
3月17日 评论:
3月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
PR Approval Progress
✅ Congratulations! All modules have met the lgtm and approve requirements.
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| test | ✅ liwei386, htchu (2/2) | ✅ liwei386, htchu (2/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月17日 添加了label:ascend-cla/yes
Ddinglaiping
3月17日 update merge request[project id: 7404318, iid: 31892, commit_id: d777df6290ec057bc683890232f681cc3d16fa2c] virtual merging success
3月17日 update merge request[project id: 7404318, iid: 31892, commit_id: d777df6290ec057bc683890232f681cc3d16fa2c] virtual merging success
Ddinglaiping
3月17日 强制推送 1 个提交:6c713bdc-test(nn): add test for nn api: torch.nn.Parameter, torch.nn.Buffer
3月17日 强制推送 1 个提交:6c713bdc-test(nn): add test for nn api: torch.nn.Parameter, torch.nn.Buffer
Ddinglaiping
3月17日 update merge request[project id: 7404318, iid: 31892, commit_id: 35638a3674cea32b8808ed647b2b9ce600611e05] virtual merging success
3月17日 update merge request[project id: 7404318, iid: 31892, commit_id: 35638a3674cea32b8808ed647b2b9ce600611e05] virtual merging success
3月17日 添加了label:ci-pipeline-failed
dinglaiping
3月17日 评论:
3月17日 评论:
compile


3月17日 删除了label:ci-pipeline-failed
3月17日 添加了label:ci-pipeline-running
3月17日 删除了label:ci-pipeline-running
3月17日 添加了label:ci-pipeline-passed
ascend-robot
3月17日 评论:
3月17日 评论:
流水线 PR-pipeline_pytorch#10989 已完成
| 阶段 | 任务名 | 状态 | 详情 |
|---|---|---|---|
| 编译构建 | 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 | ✅ | >>> |


3月18日 添加了label:approved
3月18日 添加了label:lgtm
ascend-robot
3月18日 评论:
3月18日 评论:
3月18日 合入了pull request
【合入来源】
【修改方案】
用例设计原则
本次验证结合官方用例复用与自定义用例补充的方式,遵循 “最小化、核心化、针对性” 原则,核心思路为:
验证用例核心验证点
在 NPU(npu:0)环境下,覆盖 2 个 API 的核心功能及实际使用场景,Parameter、Buffer通过自定义用例补充验证点,整体验证点如下:
【资料变更】
不涉及
【接口变更】
不涉及
【功能验证】
整体结论:
本次验证通过 补充自定义用例的方式,在 NPU(npu:0)环境下完成 2 个核心 API 的全量验证,用例均执行成功,核心功能全覆盖,基础能力与操作逻辑均正常可用。
核心功能验证结果:
用例合理性说明:自定义用例虽简洁,但具备充分有效性与合理性。
运行日志
[root@hostname-fqv42:~/torchnpuapi# python /root/torchnpuapi/test_nn_api.py
..
Ran 2 tests in 5.263s
OK
root@hostname-fqv42:~/torchnpuapi#
【CheckList】