Commit Graph
13 Commits
Author SHA1 Message Date
Dring 10e2cc06ff [master][bugfix]cann and pta header mixing bulid bugfix
Co-authored-by: Dring<17737727613@163.com>



# message auto-generated for no-merge-commit merge:
!44990 merge master into master

[master][bugfix]cann and pta header mixing bulid bugfix

Created-by: Dring
Commit-by: Dring
Merged-by: ascend-robot
Description: <!--
PR描述模板更新日期:20260203
-->

# 【合入来源】
> <font color="red">**如有社区issue,请关联issue链接**</font>\
> <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font>

https://gitcode.com/Ascend/pytorch/issues/3991

- [✕ ] 需求
- [ ✓] 问题单
- [ ✓] issue/工单
- [ ✓] 重构优化
- [✕ ] 资料更新

# 【修改方案】
> 请描述修改内容的具体实现,涉及哪些组件之间进行交互,可以用1、2、3、...进行罗列\
> 如果是需求或者重构类的PR,需要补充详细设计文档(说明上下游组件关系、时序图、类图、DFX能力等内容)

问题现象:
PTA 26.1.0 仓库中的 third_party/acl 头文件来自 CANN 9.1.0,而编译环境安装的是 CANN 9.0.0。当同一个编译单元同时包含两套版本的 ACL 头文件时,会出现类似以下错误:aclmdlRITask 未声明、未定义或类型不匹配
aclmdlRITask 是 CANN 9.1.0 头文件所依赖的定义,但 CANN 9.0.0 对应头文件中不存在该定义或定义不兼容。

根因分析:
1 当前头文件查找路径不统一:PTA 源码中大量使用以下写法
#include "third_party/acl/inc/acl/acl_mdl.h"
因为编译命令中包含 PTA 项目根目录,这种写法会直接命中 PTA 26.1.0 仓库内由 CANN 9.1.0 导入的头文件:torch_npu/third_party/acl/inc/acl/acl_mdl.h
但该头文件内部使用的是标准 SDK 相对路径:#include "acl/acl_base.h"
编译器无法相对 acl_mdl.h 所在目录找到 acl/acl_base.h,因此转而按照全部 -I 目录依次搜索。如果 CANN 9.0.0 的 include 路径排在 PTA 内置 ACL 路径前面,就会命中:CANN-9.0.0/include/acl/acl_base.h
同一个翻译单元最终形成:
acl_mdl.h  -> PTA third_party 中的 CANN 9.1.0 版本
acl_base.h -> 环境 CANN 9.0.0 版本
这是一种“首层头文件由源码路径固定版本、传递头文件由 -I 顺序选择版本”的混合查找模式。

2 问题不局限于 acl_mdl.h
同样风险存在于所有能够继续 include 其他 CANN 头文件的入口,包括:
acl/...
aml/...
profiling/...
graph/...
ge/...
op_proto/...
因此不能只修复出现错误的某一个头文件,也不能只替换 acl_mdl.h。必须统一整个 CANN 头文件族的查找规则。

修改目标:
修改后需要满足
源码不再包含 third_party/acl/inc/... 这种仓库物理路径。
ACL、AML、profiling 等头文件全部通过统一 include root 查找。
一个编译 target 对 CANN 头文件只选择一套版本。
CANN 9.0.0 环境构建时,首层和传递头文件必须全部命中 CANN 9.0.0。
使用 PTA 内置头文件构建时,首层和传递头文件必须全部命中 PTA 内置的同一套版本。
wheel、libtorch_npu、C++ Extension 和 Inductor/AOT 使用同一目录契约

修改方案:
1、代码中使用 PTA 内置 ACL 头文件的地方,删除 third_party/acl/inc/ 物理路径前缀,统一改成从 include root 查找
2、打包或安装时,把 third_party/acl/inc 下需要公开的目录按原相对结构复制到安装产物的公共 include 根目录

# 【资料变更】
> 请确认是否涉及资料变更。如涉及,需要在PR中体现,并简要说明修改内容。如不涉及,需填写“不涉及”

不涉及

# 【接口变更】
> 请确认是否涉及跨代码仓或者客户面可见的接口变更。如涉及,需要详细说明接口以及对应的变更内容,同时需要在资料中体现。如不涉及,需填写“不涉及”

不涉及

# 【功能验证】
> 说明测试场景,测试方法。如果本次测试方式与常规单元测试不同,请详细说明您的测试步骤\
> 新增/变更内容是否已新增/适配UT测试用例看护,并补充测试自验证截图

cann 9.0.0 + pta 26.1.0的vllm-ascend安装验证成功
![image.png](https://raw.gitcode.com/user-images/assets/7404318/f2ac659c-3594-45bb-b6cb-f2d3a1af8f7f/image.png 'image.png')

# 【CheckList】
> PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x]

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


See merge request: Ascend/pytorch!44990
2026-08-28 10:55:42 +08:00
liujunzhu e4546dcb0c [fix] fix memory config testcase
Co-authored-by: liujunzhu<liujunzhu@huawei.com>



# message auto-generated for no-merge-commit merge:
!41705 merge master into master

[fix] fix memory config testcase

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能力等内容)

修复 `throw_on_npumalloc_oom` 、 `pinned_max_round_threshold_mb` 和 `pinned_max_cached_size_mb`的用例问题。

# 【资料变更】
> 请确认是否涉及资料变更。如涉及,需要在PR中体现,并简要说明修改内容。如不涉及,需填写“不涉及”

不涉及

# 【接口变更】
> 请确认是否涉及跨代码仓或者客户面可见的接口变更。如涉及,需要详细说明接口以及对应的变更内容,同时需要在资料中体现。如不涉及,需填写“不涉及”

不涉及

# 【功能验证】
> 说明测试场景,测试方法。如果本次测试方式与常规单元测试不同,请详细说明您的测试步骤\
> 新增/变更内容是否已新增/适配UT测试用例看护,并补充测试自验证截图

通过CI验证。

# 【CheckList】
> PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x]

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


See merge request: Ascend/pytorch!41705
2026-07-15 16:05:02 +08:00
liujunzhu 8a89e8d490 [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
2026-07-14 10:59:41 +08:00
liujunzhu b0e0841088 [feat] Support memory config throw_on_npumalloc_oom
Co-authored-by: liujunzhu<liujunzhu@huawei.com>



# message auto-generated for no-merge-commit merge:
!39422 merge master2 into master

[feat] Support memory config throw_on_npumalloc_oom

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能力等内容)

`throw_on_npumalloc_oom` 是 CUDA 侧已合入社区的功能(PR #179473),在 NPU 侧需要适配实现。该功能配合 `per_process_memory_fraction` 配置,在内存分配时** preemptively reject** 超过配置限制的分配请求,直接抛出 `OutOfMemoryError`,避免进入驱动层分配可能导致的致命进程崩溃。


# 【资料变更】
> 请确认是否涉及资料变更。如涉及,需要在PR中体现,并简要说明修改内容。如不涉及,需填写“不涉及”

后续的PR修改,本次不涉及。

# 【接口变更】
> 请确认是否涉及跨代码仓或者客户面可见的接口变更。如涉及,需要详细说明接口以及对应的变更内容,同时需要在资料中体现。如不涉及,需填写“不涉及”

环境变量PYTORCH_ALLOC_CONF/PYTORCH_NPU_ALLOC_CONF和python接口memory._set_allocator_settings新增throw_on_npumalloc_oom配置项。

# 【功能验证】
> 说明测试场景,测试方法。如果本次测试方式与常规单元测试不同,请详细说明您的测试步骤\
> 新增/变更内容是否已新增/适配UT测试用例看护,并补充测试自验证截图

PR已附带用例。

# 【CheckList】
> PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x]

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


See merge request: Ascend/pytorch!39422
2026-06-29 09:19:21 +08:00
Dring 56f6bc07ca [master][bugfix]CI error:acl header missing fix
Co-authored-by: Dring<17737727613@163.com>



# message auto-generated for no-merge-commit merge:
!36649 merge master into master

[master][bugfix]CI error:acl header missing fix

Created-by: Dring
Commit-by: Dring
Merged-by: ascend-robot
Description: <!--
PR描述模板更新日期:20260203
-->

# 【合入来源】
> <font color="red">**如有社区issue,请关联issue链接**</font>\
> <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font>
https://gitcode.com/Ascend/pytorch/issues/2137

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

# 【修改方案】
> 请描述修改内容的具体实现,涉及哪些组件之间进行交互,可以用1、2、3、...进行罗列\
> 如果是需求或者重构类的PR,需要补充详细设计文档(说明上下游组件关系、时序图、类图、DFX能力等内容)
门禁ut不是基于门禁编包代码执行,而是拉取新代码,头文件在编包执行过程中才会从acl_src复制到原本头文件路径acl下。导致门禁ut调用build_stub.sh报错头文件找不到。
修复方案:
1、在门禁执行入口文件ci/access_control_test.py增加头文件复制策略,从当前安装torch_npu路径下复制头文件到工作区代码三方库下acl下
2、修改三个ut中的编译依赖相对路径确保能找到对应头文件

# 【资料变更】
> 请确认是否涉及资料变更。如涉及,需要在PR中体现,并简要说明修改内容。如不涉及,需填写“不涉及”
不涉及

# 【接口变更】
> 请确认是否涉及跨代码仓或者客户面可见的接口变更。如涉及,需要详细说明接口以及对应的变更内容,同时需要在资料中体现。如不涉及,需填写“不涉及”
不涉及

# 【功能验证】
> 说明测试场景,测试方法。如果本次测试方式与常规单元测试不同,请详细说明您的测试步骤\
> 新增/变更内容是否已新增/适配UT测试用例看护,并补充测试自验证截图
门禁通过,ut通过
![image.png](https://raw.gitcode.com/user-images/assets/7404318/97941307-5dcc-4588-9bc3-dd968506ae68/image.png 'image.png')
本地验证ut通过

# 【CheckList】
> PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x]

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


See merge request: Ascend/pytorch!36649
2026-05-28 09:58:41 +08:00
probiotics_53 3a189cdf3e skip ci failed testcase
Co-authored-by: XianglongZeng<zengxianglong1@huawei.com>



# message auto-generated for no-merge-commit merge:
!36488 merge master into master

skip ci failed testcase

Created-by: probiotics_53
Commit-by: XianglongZeng
Merged-by: ascend-robot
Description: <!--
PR描述模板更新日期:20260203
-->

# 【合入来源】
> <font color="red">**如有社区issue,请关联issue链接**</font>\
> <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font>

- [ ] 需求
- [x] 问题单
- [ ] issue/工单
- [ ] 重构优化
- [ ] 资料更新

# 【修改方案】
### 1. `allocator/test_pluggable_allocator_extensions.py` — `TestPluggableAllocator.setUpClass`

**报错日志:**

```
acl.cpp:1:10: fatal error: acl/acl.h: No such file or directory
   1 | #include "acl/acl.h"
     |          ^~~~~~~~~~~
compilation terminated.

acl_op_compiler.cpp:1:10: fatal error: acl/acl_op_compiler.h: No such file or directory
   1 | #include "acl/acl_op_compiler.h"
     |          ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

acl_tdt.cpp:1:10: fatal error: acl/acl.h: No such file or directory
   1 | #include "acl/acl.h"
     |          ^~~~~~~~~~~
compilation terminated.

In file included from pluggable_allocator_extensions.cpp:5:
torch_npu/include/third_party/acl/inc/acl/acl_base.h:14:10:
  fatal error: acl/acl_base_rt.h: No such file or directory
   14 | #include "acl/acl_base_rt.h"
      |          ^~~~~~~~~~~~~~~~~~~

subprocess.CalledProcessError: Command '['ninja', '-v', '-j', '16']' returned non-zero exit status 1.
RuntimeError: Error building extension 'pluggable_allocator_extensions'
```

**报错原因:** CI 环境缺少 ACL 开发头文件(`acl/acl_base_rt.h`、`acl/acl.h`、`acl/acl_op_compiler.h`),导致 `setUpClass` 中 JIT 编译 C++ 扩展 `pluggable_allocator_extensions` 失败。与 0D tensor 修改**无关**。

**跳过方式:** 在 `TestPluggableAllocator` 类上添加 `@unittest.skip` 装饰器。

---

### 2. `test_npu_expandable_segments.py` — `TestPluggableAllocator.setUpClass`

**报错日志:**

```
acl.cpp:1:10: fatal error: acl/acl.h: No such file or directory
   1 | #include "acl/acl.h"
     |          ^~~~~~~~~~~
compilation terminated.

acl_op_compiler.cpp:1:10: fatal error: acl/acl_op_compiler.h: No such file or directory
   1 | #include "acl/acl_op_compiler.h"
     |          ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

acl_tdt.cpp:1:10: fatal error: acl/acl.h: No such file or directory
   1 | #include "acl/acl.h"
     |          ^~~~~~~~~~~
compilation terminated.

In file included from pluggable_allocator_extensions.cpp:5:
torch_npu/include/third_party/acl/inc/acl/acl_base.h:14:10:
  fatal error: acl/acl_base_rt.h: No such file or directory
   14 | #include "acl/acl_base_rt.h"
      |          ^~~~~~~~~~~~~~~~~~~

subprocess.CalledProcessError: Command '['ninja', '-v', '-j', '16']' returned non-zero exit status 1.
RuntimeError: Error building extension 'pluggable_allocator_extensions'
```

**报错原因:** 与用例 1 完全相同,CI 环境缺少 ACL 头文件,JIT 编译失败。与 0D tensor 修改**无关**。

**跳过方式:** 在 `TestPluggableAllocator` 类上添加 `@unittest.skip` 装饰器。

---

### 3. `test_sanitizer_pluggable_allocator.py` — `TestSanitizerPluggableAllocator.setUpClass`

**报错日志:**

```
acl.cpp:1:10: fatal error: acl/acl.h: No such file or directory
   1 | #include "acl/acl.h"
     |          ^~~~~~~~~~~
compilation terminated.

acl_op_compiler.cpp:1:10: fatal error: acl/acl_op_compiler.h: No such file or directory
   1 | #include "acl/acl_op_compiler.h"
     |          ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

acl_tdt.cpp:1:10: fatal error: acl/acl.h: No such file or directory
   1 | #include "acl/acl.h"
     |          ^~~~~~~~~~~
compilation terminated.

In file included from pluggable_allocator_extensions.cpp:5:
torch_npu/include/third_party/acl/inc/acl/acl_base.h:14:10:
  fatal error: acl/acl_base_rt.h: No such file or directory
   14 | #include "acl/acl_base_rt.h"
      |          ^~~~~~~~~~~~~~~~~~~

subprocess.CalledProcessError: Command '['ninja', '-v', '-j', '16']' returned non-zero exit status 1.
RuntimeError: Error building extension 'sanitizer_pluggable_allocator_extensions'
```

**报错原因:** 与用例 1、2 完全相同,CI 环境缺少 ACL 头文件,JIT 编译失败。与 0D tensor 修改**无关**。

**跳过方式:** 在 `TestSanitizerPluggableAllocator` 类上添加 `@unittest.skip` 装饰器。

### 4. `distributed/pipelining/test_schedule_multiproc.py` — `CustomSchedulesTest` + `ScheduleTest`

**报错日志(CustomSchedulesTest):**

```
RuntimeError: Exception in worker process:
  ...
  File "test_schedule_multiproc.py", line 939, in test_non_symmetric_stage_ids
    out = schedule.step(x, target=target, losses=losses)
  File "schedules.py", line 1554, in step
    self._step_microbatches(...)
  File "schedules.py", line 1579, in _step_microbatches
    self._initialize_stages(arg_mbs[0], kwarg_mbs[0])
  File "schedules.py", line 1461, in _initialize_stages
    _wait_batch_p2p(_batch_p2p(all_ops))
  File "schedules.py", line 490, in _batch_p2p
    return dist.batch_isend_irecv(p2p_ops)
  File "torch_npu/distributed/distributed_c10d.py", line 119, in _batch_isend_irecv
    p2p_op.op(
  File "distributed_c10d.py", line 2419, in isend
    return group.send([tensor], group_dst, tag)
RuntimeError: create_config:../torch_npu/csrc/distributed/HCCLUtils.cpp:140
  HCCL function error: hcclCommInitRootInfoConfig(...), error code is 1
[ERROR] ERR02200 DIST call hccl api failed.
[PID: 38352] Communication_Error_Ranktable_Detect(EI0015):
  Failed to collect cluster information of the communicator based on rootInfo detection.
  Reason: No rank in the communicator can connect to the root node within the timeout period.
  List of unconnected ranks: "[1,]".
```

**报错日志(ScheduleTest):**

```
RuntimeError: Exception in worker process:
  ...
  File "test_schedule_multiproc.py", line 388, in test_eval_inference_mode
    schedule.eval(x)
  File "schedules.py", line 400, in eval
    return self.step(*args, target=target, losses=losses, **kwargs)
  ...
RuntimeError: create_config:../torch_npu/csrc/distributed/HCCLUtils.cpp:140
  HCCL function error: hcclCommInitRootInfoConfig(...), error code is 1
[ERROR] ERR02200 DIST call hccl api failed.
[PID: 38939] Communication_Error_Ranktable_Detect(EI0015):
  Failed to collect cluster information of the communicator based on rootInfo detection.
  Reason: No rank in the communicator can connect to the root node within the timeout period.
  List of unconnected ranks: "[1,2,3,]".
```

**报错原因:** HCCL 分布式通信初始化失败(`hcclCommInitRootInfoConfig` 返回 error code 1),rank 节点无法在超时时间内连接到 root 节点。这是 CI 环境的网络/HCCL 配置问题,与 0D tensor 修改**无关**。

**跳过方式:** 在 `ScheduleTest` 类上添加 `@unittest.skip` 装饰器。

# 【资料变更】
不涉及

# 【接口变更】
不涉及

# 【功能验证】
不涉及

# 【CheckList】
> PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x]

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


See merge request: Ascend/pytorch!36488
2026-05-22 20:39:04 +08:00
huangjingwei 859abd9be7 [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
2026-05-21 16:41:18 +08:00
luanchaowei 91245eb28e 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
2026-01-08 20:51:32 +08:00
pwc10490 e2abe27a61 pin_memory内存支持虚拟化管理
Co-authored-by: panweicheng<panweicheng@huawei.com>
Co-authored-by: luanchaowei<luanchaowei3@huawei.com>



# message auto-generated for no-merge-commit merge:
!27491 merge master into master

pin_memory内存支持虚拟化管理

Created-by: pwc10490
Commit-by: panweicheng;pwc10490;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**:


**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!27491
2025-12-16 09:35:03 +08:00
ascend-robot 91ba13ac4f CachingHostAllocator master
Co-authored-by: zihao-intuition<chenzihao65@huawei.com>



# message auto-generated for no-merge-commit merge:
!26498 merge master into master

CachingHostAllocator master

Created-by: gcw_5tF58QLT
Commit-by: zihao-intuition
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 task



**What does this PR do / why do we need it**:
需求

**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!26498
2025-11-18 22:04:55 +08:00
cx 03bdd3cdcc !22738 change log level warn
Merge pull request !22738 from cx/master
2025-07-07 13:31:16 +00:00
liupeng303 9b54c804d7 !22643 !9425 Provide interface such as getDeviceStatus, resetPeakStats for NP…
Merge pull request !22643 from liupeng303/master
2025-07-07 02:58:20 +00:00
杜金航 6c0149451e !9492 [feat] Add Pluggable NPU allocator backend.
Merge pull request !9492 from 杜金航/master
2024-02-08 02:07:01 +00:00