Skip to content

Make count-based OOM injection persistent after trigger count (based on b458678) - #10

Draft
yjyang62 wants to merge 4 commits into
cursor/pta-oom-2.9.1-fbcafrom
cursor/count-oom-persistent-c29d
Draft

Make count-based OOM injection persistent after trigger count (based on b458678)#10
yjyang62 wants to merge 4 commits into
cursor/pta-oom-2.9.1-fbcafrom
cursor/count-oom-persistent-c29d

Conversation

@yjyang62

Copy link
Copy Markdown
Owner

Summary

基于 commit b458678,修改 op / allocator / HCCL 三处 OOM 注入逻辑:达到配置次数后,后续每次操作都持续抛出 OOM 故障

Changes

shouldThrowOpOomshouldThrowAllocatorOomshouldThrowHcclOom 中,当 count_triggered 为 true 时直接返回 true,跳过一次性的 *_TRIGGER_MODE 限制:

  • 次数触发:达到 HCCL_OOM_COUNT / NPU_ALLOCATOR_OOM_TRIGGER_COUNT / HCCL_OOM_TRIGGER_COUNT 后,持续注入 OOM
  • 文件触发:仍受 *_TRIGGER_MODE 控制,默认仍为一次性

Behavior

触发方式 修改前 修改后
次数达到阈值 默认仅触发 1 次 持续触发 OOM
触发文件存在 默认仅触发 1 次 不变(可用 always/repeat 重复)

Files

  • torch_npu/csrc/framework/OpCommand.cpp
  • torch_npu/csrc/core/npu/NPUCachingAllocator.cpp
  • torch_npu/csrc/distributed/ProcessGroupHCCL.cpp
  • docs/oom_fault_injection.md
Open in Web Open in Cursor 

cursoragent and others added 4 commits June 25, 2026 00:23
Co-authored-by: yjyang62 <yjyang62@users.noreply.github.com>
Co-authored-by: yjyang62 <yjyang62@users.noreply.github.com>
Co-authored-by: yjyang62 <yjyang62@users.noreply.github.com>
Based on commit b458678. Once the configured trigger count is reached, op,
allocator, and HCCL hooks keep throwing synthetic OOM on every subsequent
operation. File-based triggers still honor the one-shot *_TRIGGER_MODE settings.

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