Closed
【2026 HCCL通信库创新大赛-东北赛区】【对对对】CCU默认通知等待超时文档与实现偏移量不一致 #941
m0_72851588Add on  Sep 18Closed at  Sep 20
m0_72851588
m0_72851588
Sep 18 Create

问题类型

文档类问题(无需实机,静态检查即可复现)。

问题描述

实现中的 src/base_comm/primitives/launch_context.cc 定义 NOTIFY_WAIT_TIMEOUT_OFFSET = 27;当未显式调用 HcommSetNotifyWaitTimeOut 时,LaunchContext::GetNotifyWaitTimeOut 在 Host 编译路径将默认值 1836 秒增加 27 秒。

但以下文档多处写成 Host 侧默认值为 1836+50 秒,或非 AICPU 模式增加 50 秒偏移:

  • docs/zh/api_ref/comm_opdev/data_plane_api/cpu-cpu_ts-aicpu_ts/local_operations/HcommThreadNotifyWaitOnThreadWithDefaultTimeout.md;
  • docs/zh/api_ref/comm_opdev/data_plane_api/cpu-cpu_ts-aicpu_ts/communication_operations/HcommSetNotifyWaitTimeOut.md。

影响

用户依据文档估算等待超时和排查超时行为时,会得到与当前实现不一致的数值。

建议修复

按当前实现将文档中的 Host/非 AICPU 默认偏移说明统一为 27 秒,并明确显式设置超时时不再追加默认偏移;同时保留 Device/AICPU 路径的 1836 秒说明。

关联说明

该问题通过源码与文档静态对照即可确认,不需要硬件验证;修复 PR 将关联本 Issue。

likedislike
m0_72851588m0_72851588
Sep 18 Associated pull request
LLeewisCollaborators
Sep 18 associated Kanban: HCOMM
LeewisCollaborators
Sep 18 Comments:

问题确认:✅ 属实

代码定位

文件 行号 说明
src/base_comm/primitives/launch_context.cc 15 constexpr u32 NOTIFY_WAIT_TIMEOUT_OFFSET = 27; — 实际偏移量 27
同上 91 timeout = timeout + NOTIFY_WAIT_TIMEOUT_OFFSET; — 未显式设置时追加 27 秒
docs/zh/api_ref/comm_opdev/data_plane_api/cpu-cpu_ts-aicpu_ts/local_operations/HcommThreadNotifyWaitOnThreadWithDefaultTimeout.md 46, 54, 62 三处写 1836+50 秒 / 增加 50 秒偏移
docs/zh/api_ref/comm_opdev/data_plane_api/cpu-cpu_ts-aicpu_ts/communication_operations/HcommSetNotifyWaitTimeOut.md 52 写增加 50 秒偏移

根因分析

代码实际偏移量 NOTIFY_WAIT_TIMEOUT_OFFSET = 27(launch_context.cc:15),GetNotifyWaitTimeOut 在未显式调用 HcommSetNotifyWaitTimeOut 时将默认值 1836 秒增加 27 秒。

但两篇文档多处写为 1836+50 秒或"增加 50 秒偏移",与代码的 27 秒不一致。

修复建议

将文档中的 Host/非 AICPU 默认偏移说明统一为 27 秒,并明确显式设置超时时不再追加默认偏移。


本回复为 AI 结合源码深度分析生成,将同步对应责任田团队进行二次确认。

likedislike
LeewisCollaborators
Sep 18 Comments:

感谢对于社区的关注与反馈,当前NOTIFY_WAIT_TIMEOUT_OFFSET 确实已修改为27,对应文档暂未更新;相关积分将正常计算;

likedislike
LLeewisCollaborators
Sep 18 Assign m0_72851588 as responsible person
LLeewisCollaborators
Sep 18 Assign ouyangcaike as responsible person
LLeewisCollaborators
Sep 18 Added label: Accepted
Oouyangcaike
Sep 18 Associated pull request
Oouyangcaike
Sep 18 Associated pull request
LeewisCollaborators
Sep 20 Comments:

同学你好,当前针对超时时间偏移量 文档和代码不一致的情况,目前已由开发组同事修改完成,相关积分将正常计算,thx;

likedislike
LLeewisCollaborators
Sep 20 changed custom state from 进行中 to 已完成
LLeewisCollaborators
Sep 20 Close issue
LLeewisCollaborators
Sep 21 removed Kanban: HCOMM