Skip to content

fix: cover HCCL OOM trigger at op api dispatch - #8

Draft
yjyang62 wants to merge 2 commits into
cursor/pta-oom-2.9.1-fbcafrom
cursor/fix-qwen235b-oom-hccl-e033
Draft

fix: cover HCCL OOM trigger at op api dispatch#8
yjyang62 wants to merge 2 commits into
cursor/pta-oom-2.9.1-fbcafrom
cursor/fix-qwen235b-oom-hccl-e033

Conversation

@yjyang62

@yjyang62 yjyang62 commented Jun 25, 2026

Copy link
Copy Markdown
Owner

【合入来源】

  • 需求
  • 问题单
  • issue/工单
  • 重构优化
  • 资料更新

【修改方案】

  1. HCCL_OOM_TRIGGER_COUNT 注入计数从 ProcessGroupHCCL 的 collective/p2p 模板层迁移到 OpCommand::RunOpApiV3 统一入口。
  2. 通过 op name 前缀识别 Hccl* 通信 API,覆盖 allgather、reduce_scatter、send/recv、alltoall、batch send/recv 等真实 HCCL op api 调用路径。
  3. 使用一次性触发标志,并在达到阈值 current_count >= trigger_count 时抛出 OutOfMemoryError,避免原先只在单个计数窗口触发导致错过。
  4. 保留 capture 状态保护,NPU graph capture 期间不注入 OOM。
  5. 将 allgather fallback 中直接调用的 hcclBroadcast 改为 RunOpApiV3("HcclBroadcast", ...),避免该路径绕过统一计数。

【资料变更】

不涉及

【接口变更】

不涉及

【功能验证】

  • git diff --check HEAD~2 HEAD
  • 使用 rg 确认 HCCL_OOM_TRIGGER_COUNT 注入逻辑仅保留在 OpCommand::RunOpApiV3 统一入口,并确认 fallback HcclBroadcast 也走 RunOpApiV3

【CheckList】

  • 代码注释完备,正确记录错误日志
  • 代码实现进行了返回值、空指针等校验
  • PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等
  • PR持续集成流水线(CI)执行通过,代码检查无异常
Open in Web Open in Cursor 

cursoragent and others added 2 commits June 25, 2026 00:44
Co-authored-by: yjyang62 <yjyang62@users.noreply.github.com>
Co-authored-by: yjyang62 <yjyang62@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants