已合并
test(distributed): add test for FileStore,Store,TCPStore #31911
Nice try创建于 3月17日
test(distributed): add test for FileStore,Store,TCPStore #31911
已合并
Nice try创建于 3月17日
Nice try
Nice try
3月17日

【合入来源】

Usage: test目录下torch.distributed.FileStore,torch.distributed.Store, torch.distributed.TCPStore API的测试用例缺失
请勿携带内部流程信息(需求链接、问题单、内部issue等)

【修改方案】

请描述修改内容的具体实现,涉及哪些组件之间进行交互,可以用1、2、3、...进行罗列
如果是需求或者重构类的PR,需要补充详细设计文档(说明上下游组件关系、时序图、类图、DFX能力等内容)

基于 “最小化、核心化、针对性” 原则,设计独立 NPU 测试用例,核心思路:
1.剥离无关耦合:仅使用 PyTorch 原生基础层(Linear、BatchNorm、Conv2d)构建测试对象,避免算子适配干扰;
2.聚焦核心功能:仅验证 API 基础能力,不涉及边缘场景与复杂计算,确保结果反映 API 本身适配状态;
3.贴合 NPU 特性:重点校验设备一致性、跨设备状态迁移等 NPU 核心关注点;
4.轻量化设计:单个方法验证一个核心功能点,逻辑清晰、执行高效。

在 NPU(npu:0)环境下,覆盖原生测试用例中没有直接测试用例的API,包括:

torch.distributed.FileStore.path
torch.distributed.Store.__init__
torch.distributed.Store.add
torch.distributed.Store.timeout
torch.distributed.TCPStore.host
torch.distributed.TCPStore.port

根据设计原则将对应的自定义测试用例进行补充。

【资料变更】

修改了以下文件,补充了相关接口
docs/zh/native_apis/pytorch_2-6-0/torch-distributed.md
docs/zh/native_apis/pytorch_2-7-1/torch-distributed.md
docs/zh/native_apis/pytorch_2-8-0/torch-distributed.md
docs/zh/native_apis/pytorch_2-9-0/torch-distributed.md

【接口变更】

请确认是否涉及跨代码仓或者客户面可见的接口变更。如涉及,需要详细说明接口以及对应的变更内容,同时需要在资料中体现。如不涉及,需填写“不涉及”
不涉及

【功能验证】

说明测试场景,测试方法。如果本次测试方式与常规单元测试不同,请详细说明您的测试步骤
新增/变更内容是否已新增/适配UT测试用例看护,并补充测试自验证截图

root@56991725ea5f:/workspace/test_store_api# python test_store_api_v2-7-1.py 
.....
----------------------------------------------------------------------
Ran 5 tests in 0.716s

OK

image.png

【CheckList】

PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x]

likedislike
Pull Request已成功合入, 合并人@ascend-robot
(感谢 Nice try 的贡献)
Nice tryNice try
3月17日 创建了 pull request,commit 49efb400
Nice tryNice try
3月17日 关联了issue:[Usage]: test目录下torch.distributed.FileStore,torch.distributed.HashStore,torch.distributed.PrefixStore,torch.distributed.Store, torch.distributed.TCPStore API的测试用例缺失
ascend-robot
ascend-robot成员
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
docs liwei386, molly123321 (2/2) liwei386 (1/1)
test liwei386, yuhaiyan (2/2) liwei386 (1/1)

💡 Tip:

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

CLA Signature Pass

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

likedislike
ascend-robotascend-robot成员
3月17日 添加了label:ascend-cla/no
此处折叠了141条消息 查看更多
ascend-robot
ascend-robot成员
3月30日 评论:

The following label is not ready.

lgtm: Please wait for reviewers to review the code.

likedislike
molly123321成员
3月30日 评论:

/lgtm

likedislike
ascend-robotascend-robot成员
3月30日 添加了label:lgtm
ascend-robot
ascend-robot成员
3月30日 评论:

Review Guide

This pull-request passes review.
Committers who wrote a comment of /approve are: liwei386.
Reviewers who wrote a comment of /lgtm are: liwei386, molly123321, yuhaiyan.

likedislike
ascend-robotascend-robot成员
3月30日 合入了pull request