Repository navigation
[Bugfix] Allocate dynamic ports for paired HCCL listeners - #13
Merged
Merged
Conversation
Signed-off-by: ShuweiShen772 <shenshuwei.3@jd.com>
ShuweiShen772
marked this pull request as ready for review
November 13, 2026 12:33
Collaborator
Author
Qoder 检查失败诊断已核对本次 qoder-review 运行 的检查注释、步骤状态、workflow 和 Qoder action 的输入定义。 失败发生在 Qoder 认证配置步骤,原始错误: 仓库 workflow 的 处理方法:在 本仓库 Actions Secrets 设置 添加:
配置完成后重跑该失败 job,即可执行代码评审。此次认证失败应按 CI 凭据配置问题处理;端口修复保持独立评审。 |
9 of 11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
修复旧 Ascend/HCCL 后端固定监听设备端口
16666,导致共享测试机上并行 PR 相互冲突的问题。Listen()+ 端口0,由实际监听操作分配可用端口,成功后读取GetLocalPort()。RankInfo.devicePort。现有 segment 元数据继续发布实际端口,对端直接使用该值,协议字段保持兼容。DeInit()回滚本轮监听,再重新申请。仅监听阶段的HCCL_E_UNAVAIL进入端口重试,上限 32 次。v0.3.12_xllm_patch为基线,便于同步后直接接入。实现依据:开发机 CANN 8.2.RC1 的
HcclSocket提供GetLocalPort()/DeInit();其 RA listen 适配层将“端口已绑定”映射为HCCL_E_UNAVAIL,并在请求端口为 0 时回填实际端口。Close()关闭连接,DeInit()负责停止监听。Suggested Merge Priority
Module
mooncake-transfer-engine)Type of Change
How Has This Been Tested?
新增 3 个聚焦用例,直接调用生产端口选择 helper。Socket 边界使用两组 loopback 地址和真实 POSIX
bind/listen,保留实际 HCCL 状态枚举:验证结果:
detect_leaks=1,全部通过。测试覆盖范围为真实主机 socket 的监听、错误和生命周期;真实 NIC/VNIC 设备监听及匹配 CANN 的完整 legacy 后端构建由 NPU CI 验收。
Checklist
AI Assistance Disclosure