feat: make PTA OOM injection controllable - #3
Draft
yjyang62 wants to merge 4 commits into
Draft
Conversation
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>
Co-authored-by: yjyang62 <yjyang62@users.noreply.github.com>
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.
【合入来源】
【修改方案】
OutOfMemoryError” 的构造方式,默认阈值仍为30004,即第30005次候选分配触发。DeviceCachingAllocator::malloc入口移到外层普通 tensorNpuCachingAllocator::allocate路径:只统计普通 NPU tensor allocation,不再覆盖 raw/aligned/内部 allocator malloc 等更底层路径。PTA_OOM_TRIGGER_COUNT调整触发阈值;设置为小于等于 0 可关闭注入。【资料变更】
不涉及
【接口变更】
不涉及正式接口变更;新增仅用于故障注入分支的环境变量
PTA_OOM_TRIGGER_COUNT。【功能验证】
git diff --check pta_oom_2.9.2...HEAD,无空白格式问题。pta_oom_2.9.2只修改torch_npu/csrc/core/npu/NPUCachingAllocator.cpp。【CheckList】