已关闭
【API一致性任务】torch._C._distributed_rpc._is_current_rpc_agent_set API 一致性补齐 #2828
olpk创建于 7月13日关闭于 22 天前
7月13日 修改了issue 的描述
此处折叠了10条事件消息 查看更多
7月28日 添加了label:bot-triaged
TorchNPU-Bot
7月28日 评论:
7月28日 评论:
检测到当前 issue 已关联 PR !41511,自动添加标签:bot-triaged


7月28日 修改了issue 的描述
此处折叠了7条事件消息 查看更多
22 天前 添加了label:resolved
关联issue:https://gitcode.com/Ascend/pytorch/issues/2748
上游社区(PyTorch 官方)测试覆盖情况分析
torch._C._distributed_rpc._is_current_rpc_agent_set
API 功能
torch._C._distributed_rpc._is_current_rpc_agent_set():检查当前 RPC agent 是否已初始化,返回 bool。模块归属torch._C._distributed_rpc,为私有接口。用例完备性说明
PyTorch 社区无针对此 API 的直接测试。仅在
torch/testing/_internal/distributed/rpc/rpc_test.py中有 1 处非直接的辅助引用(self.assertFalse(rpc.api._is_current_rpc_agent_set())),位于_test_device_maps中,并非对该 API 的独立验证。本次自写用例
test/distributed/rpc/test_rpc_agent_set.py,包含 3 个测试方法:适配方案
该 API 为框架层 RPC 状态查询接口,与底层设备无关,直接可用,无需 NPU 适配。
运行结果
NPU Ascend910B4 环境测试通过:

相关 PR
私有接口,不需要文档PR