已合并
[fix] Add FaultyTensorpipeAgent For TestCase #36105
pengqihw创建于 5月19日
[fix] Add FaultyTensorpipeAgent For TestCase #36105
已合并
Pull Request已成功合入, 合并人@ascend-robot
(感谢 pengqihw 的贡献)ascend-robot
5月19日 评论:
5月19日 评论:
ascend-robot
5月19日 评论:
5月19日 评论:
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 |
|---|---|---|
| torch_npu/csrc/distributed | ✅ wjlflyer, zhenyu10 (2/2) | ✅ wjlflyer (1/1) |
| torch_npu/distributed | ✅ zhenyu10, wjlflyer (2/2) | ✅ wjlflyer (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
pengqihw, thanks for your pull request. All authors of the commits have signed the CLA. 👍


5月19日 添加了label:ascend-cla/yes
ascend-robot
5月19日 评论:
5月19日 评论:
当前仓库存在以下 保护分支 :
| Protected Branch | Version | Release |
|---|---|---|
| master | ||
| v2.7.1 | ||
| v2.9.0 | ||
| v2.10.0 | ||
| v2.11.0 | ||
| v2.12.0 |
评论 /sync <branch1> <branch2> ... 可将当前 PR 修改同步到其它分支(创建同步 PR):
a) 如果当前 PR 是 Open 状态,同步操作将延迟到 PR 被合并时执行
b) 如果当前 PR 已经 Merged,将立即执行同步操作
注意:
- /sync 命令可以指定同步到多个分支,仅最后一个 /sync 命令生效
- 如果创建的同步 PR 不正确,可通过向同步 PR 的源分支提交轻量级 PR 完善,或使用 /close 命令关闭


此处折叠了49条消息 查看更多
5月26日 添加了label:approvedlgtm
ascend-robot
5月26日 评论:
5月26日 评论:
5月26日 合入了pull request
【合入来源】
用例中原生社区使用了FaultyTensorPipeAgent类进行延时注入,NPU 缺少 FaultyTensorPipeAgent,导致无法使用 FAULTY_TENSORPIPE 后端,messages_to_delay / messages_to_fail 配置无效。本次改动为 NPU 实现完整的 FaultyTensorPipeAgent 基础设施。
【修改方案】
参考原生社区实现为 NPU 添加 FaultyTensorPipeAgent 实现,使 FAULTY_TENSORPIPE 后端能在 NPU 上用于 RPC 故障注入测试。
修改范围(7 个文件)
新增(2 个)
faulty_tensorpipe_agent.h — FaultyTensorPipeAgent 类定义
faulty_tensorpipe_agent.cpp — 实现
修改(5 个)
init.cpp — Python 绑定
backend_registry.py — 后端注册
tensorpipe_agent.cpp — Bug 修复
tensorpipe_agent.h — 依赖补充
CMakeLists.txt — 编译配置
关于 PYTHON_CALL vs SCRIPT_CALL
torch_npu.contrib.transfer_to_npu 全局替换 torch.jit.script 为 pass-through 包装器。MultiProcessTestCase 以 multiprocessing.spawn 启动子进程运行测试,父进程中调用 enable_jit_script() 设置的状态不会传递给子进程。子进程中所有 @torch.jit.script 装饰的函数均不编译,RPC 框架因此使用 PYTHON_CALL 消息类型。测试用例需将 messages_to_delay / messages_to_fail 配置为 PYTHON_CALL 来匹配实际的消息类型。
【资料变更】
【接口变更】
【功能验证】
【CheckList】