| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[Fix] Fix static check errors detected by SPACES Co-authored-by: huangjingwei<huangjingwei4@huawei.com> # message auto-generated for no-merge-commit merge: !35981 merge master_lintrunner into master [Fix] Fix static check errors detected by SPACES Created-by: huangjingwei Commit-by: huangjingwei Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > <font color="red">**如有社区issue,请关联issue链接**</font>\ > <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font> - [ ] 需求 - [ ] 问题单 - [x] issue/工单 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 检测和删除代码中的行尾空白字符 # 【资料变更】 不涉及 # 【接口变更】 不涉及 # 【功能验证】 不涉及 # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [x] 代码注释完备,正确记录错误日志 - [x] 代码实现进行了返回值、空指针等校验 - [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [x] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/pytorch!35981 | 3 个月前 | |
[feat] Support pinned_max_round_threshold_mb and pinned_max_cached_size_mb Co-authored-by: liujunzhu<liujunzhu@huawei.com> # message auto-generated for no-merge-commit merge: !39121 merge master into master [feat] Support pinned_max_round_threshold_mb and pinned_max_cached_size_mb Created-by: liujunzhu Commit-by: liujunzhu Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > <font color="red">**如有社区issue,请关联issue链接**</font>\ > <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font> - [x] 需求 - [ ] 问题单 - [ ] issue/工单 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 > 请描述修改内容的具体实现,涉及哪些组件之间进行交互,可以用1、2、3、...进行罗列\ > 如果是需求或者重构类的PR,需要补充详细设计文档(说明上下游组件关系、时序图、类图、DFX能力等内容) PyTorch 社区在 AcceleratorAllocatorConfig 中新增了 pinned_max_round_threshold_mb 和 pinned_max_cached_size_mb 两个 pinned memory 分配器配置选项,用于缓解大块 pinned memory 的内存浪费问题: - pinned_max_round_threshold_mb:分配尺寸向上取整到 2 的幂次的上限阈值(MB)。超过此阈值的分配使用精确请求大小,跳过 power-of-2 取整。默认 size_t::max()(即禁用)。 - pinned_max_cached_size_mb:缓存到 free list 的块大小上限阈值(MB)。超过此阈值的块在释放时立即归还给 OS,不再进入 free list 缓存。默认 size_t::max()。 torch_npu 的 NPUCachingHostAllocatorImpl 继承自 PyTorch 的 CachingHostAllocatorImpl,基类 allocate() 与 maybe_cache_block() 中已实现这两个阈值的核心逻辑(通过虚方法读取配置)。torch_npu 需在配置层与运行时层完成对接,使社区新增选项能在 NPU pinned memory 路径生效。 # 【资料变更】 > 请确认是否涉及资料变更。如涉及,需要在PR中体现,并简要说明修改内容。如不涉及,需填写“不涉及” 在 https://gitcode.com/Ascend/pytorch/pull/41563 单独提交。 # 【接口变更】 > 请确认是否涉及跨代码仓或者客户面可见的接口变更。如涉及,需要详细说明接口以及对应的变更内容,同时需要在资料中体现。如不涉及,需填写“不涉及” 环境变量PYTORCH_NPU_ALLOC_CONF新增 pinned_max_round_threshold_mb 和 pinned_max_cached_size_mb 配置项。 # 【功能验证】 > 说明测试场景,测试方法。如果本次测试方式与常规单元测试不同,请详细说明您的测试步骤\ > 新增/变更内容是否已新增/适配UT测试用例看护,并补充测试自验证截图 本PR已添加了大量用例。 | 测试类 | 测试内容 | 模式 | 进程 | |--------|---------|------|------| | TestPinnedMaxRoundThresholdCachingHost | 超阈值跳过 rounding 用精确大小;低于阈值仍 rounding | Non-expandable | 同进程 | | TestPinnedMaxCachedSizeCachingHost | 超阈值块释放即销毁(allocated_bytes 降为 0);低于阈值仍缓存;env var 可接受 | Non-expandable | 同进程 + 子进程 | | TestPinnedThresholdConsistency | round > cached 时 cached 优先(不 rounding);两阈值同值 | Non-expandable | 同进程 | | TestPinnedThresholdExpandableHost | expandable 模式 + 阈值触发警告且进程正常启动;expandable 单独设置无警告 | Expandable | 子进程 | # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [x] 代码注释完备,正确记录错误日志 - [x] 代码实现进行了返回值、空指针等校验 - [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [x] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/pytorch!39121 | 1 个月前 | |
HOST内存统计API对齐社区 Co-authored-by: luanchaowei<luanchaowei3@huawei.com> # message auto-generated for no-merge-commit merge: !29057 merge master into master HOST内存统计API对齐社区 Created-by: luanchaowei Commit-by: luanchaowei Merged-by: ascend-robot Description: <!-- Thanks for sending a pull request! --> **What type of PR is this?** > Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line: > > /kind bug > /kind task > /kind feature **What does this PR do / why do we need it**: 1.torch_npu.npu. empty_pin_memory_cache()更名为torch_npu.npu.host_empty_cache() 2.torch_npu.npu.pin_memory_stats()更名为torch_npu.npu.host_memory_stats() 3.删除torch_npu.npu.pin_memory_allocated()和torch_npu.npu.pin_memory_reserved() 4.补齐torch_npu.npu.host_memory_stats()其他指标 5.新增 torch_npu.npu.host_memory_stats_as_nested_dict() torch_npu.npu.reset_accumulated_host_memory_stats() torch_npu.npu. reset_peak_host_memory_stats() **Which issue(s) this PR fixes**: <!-- *Automatically closes linked issue when PR is merged. Usage: Fixes #<issue number>, or Fixes (paste link of issue). --> Fixes # **Special notes for your reviewers**: See merge request: Ascend/pytorch!29057 | 7 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 3 个月前 | ||
| 1 个月前 | ||
| 7 个月前 |