已合并
test(nn): add test for models api:torch.nn.Module, torch.nn.Module.state_dict, torch.nn.ModuleDict, torch.nn.ModuleList #31788
dinglaiping创建于 3月13日
test(nn): add test for models api:torch.nn.Module, torch.nn.Module.state_dict, torch.nn.ModuleDict, torch.nn.ModuleList #31788
已合并
从已删除 :addtest-models-api-2.8.0合入到Ascend/pytorchv2.8.0
Pull Request已成功合入, 合并人@ascend-robot
(感谢 dinglaiping 的贡献)3月13日 创建了 pull request,commit 9e92d000
Ddinglaiping
3月13日 关联了issue:[Usage]: test目录下面的test_models.py继承自pytorch社区,但是里面并没有专门验证torch.nn.Module,torch.nn.Module.state_dict,torch.nn.ModuleDict,torch.nn.ModuleList的测试用例,需要补充
3月13日 关联了issue:[Usage]: test目录下面的test_models.py继承自pytorch社区,但是里面并没有专门验证torch.nn.Module,torch.nn.Module.state_dict,torch.nn.ModuleDict,torch.nn.ModuleList的测试用例,需要补充
AtlasAccount
3月13日 评论:
3月13日 评论:
ascend-robot
3月13日 评论:
3月13日 评论:
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月13日 添加了label:ascend-cla/yes
此处折叠了56条消息 查看更多
3月17日 添加了label:approved
3月19日 添加了label:lgtm
ascend-robot
3月19日 评论:
3月19日 评论:
3月19日 合入了pull request
PR描述
【合入来源】
【修改方案】
自定义用例设计原则
基于 “最小化、核心化、针对性” 原则,设计独立 NPU 测试用例,核心思路:
自定义用例核心验证点,在 NPU(npu:0)环境下,覆盖四个 API 核心功能及协同场景:
【资料变更】
不涉及
【接口变更】
不涉及
【功能验证】
整体结论
自定义测试用例在 NPU(npu:0)环境下全部执行成功,四个核心 API 的 NPU 适配验证完成核心功能全覆盖,基础能力与协同逻辑均正常可用,满足 NPU 场景下神经网络构建、状态管理、容器管理的实际需求。
核心功能验证结果
用例合理性说明
自定义用例虽简洁,但具备充分有效性与合理性:
运行日志
[root@hostname-fqv42 ~]# docker exec -it test210 bash
root@hostname-fqv42:/home# python /root/torchnpuapi/newtest.py
....
Ran 4 tests in 1.708s
OK
root@hostname-fqv42:/home#
【CheckList】