Pull Request已成功合入, 合并人@ascend-robot
(感谢 ascend-robot 的贡献)Thanks for your pull-request.
The full list of commands accepted by me can be found at here。
You can get sig-info at here
PR Approval Progress
✅ Congratulations! All modules have met the lgtm and approve requirements.
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| torch_npu/utils | ✅ liujunzhu, ffmh (2/2) | ✅ liujunzhu (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
ascend-ds-bot, thanks for your pull request. All authors of the commits have signed the CLA. 👍


Ascend docs pipeline is running...


Ascend docs pipeline is running...


✅ 跳过 docs ci 检查,没有需要检查的文档文件


✅ 跳过 docs ci 检查,没有需要检查的文档文件


compile


Ascend docs pipeline is running...


✅ 跳过 docs ci 检查,没有需要检查的文档文件


| 阶段 | 任务名 | 状态 | 详情 |
|---|---|---|---|
| 编译构建 | Build_X86 | ✅ | >>> |
| Build_ARM | ✅ | >>> | |
| Build_LibTorch_x86 | ✅ | >>> | |
| Build_LibTorch_ARM | ✅ | >>> | |
| Build_X86_torchair | 🛑 | >>> | |
| Build_ARM_torchair | 🛑 | >>> | |
| patch_test | 🛑 | >>> | |
| 恶意代码检查 | Antipoison | ✅ | >>> |
| 编码安全与规范检查 | CodeCheck | ✅ | >>> |
| check_error | ✅ | >>> | |
| CodeCheck_lintrunner | ✅ | >>> | |
| 开源片段检查 | SCA | ✅ | >>> |
| 开发者测试 | UT_X86_Part_01 | 🛑 | >>> |
| UT_X86_Part_02 | 🛑 | >>> | |
| UT_ARM_A3_Part_01 | 🛑 | >>> | |
| UT_ARM_A3_Part_02 | 🛑 | >>> | |
| UT_ARM_A2_Part_01 | ✅ | >>> | |
| UT_ARM_A2_Part_02 | ✅ | >>> | |
| UT_ARM_A2_Part_03 | ✅ | >>> | |
| UT_inductor_Part_01 | 🛑 | >>> | |
| UT_inductor_Part_02 | 🛑 | >>> | |
| UT_inductor_Part_03 | 🛑 | >>> | |
| UT_inductor_Part_04 | 🛑 | >>> | |
| UT_DIST_ARM_Part_01 | 🛑 | >>> | |
| UT_DIST_ARM_Part_02 | 🛑 | >>> | |
| UT_DIST_ARM_Part_03 | 🛑 | >>> | |
| UT_DIST_ARM_Part_04 | 🛑 | >>> | |
| UT_ARM_A2_Select_Part_01 | ✅ | >>> | |
| UT_ARM_A2_Select_Part_02 | ✅ | >>> | |
| 流水线 | PR-pipeline_pytorch | ✅ | >>> |


/lgtm


/approve


The following users do not have permission to comment /lgtm or /approve on any module in this PR:
wanglijun55


The following users do not have permission to comment /lgtm or /approve on any module in this PR:
wanglijun55


/lgtm


The following users do not have permission to comment /lgtm or /approve on any module in this PR:
wanglijun55


1. Origin pull request:
https://gitcode.com/Ascend/pytorch/merge_requests/38376
2. Original pull request related issue(s):
https://gitcode.com/Ascend/pytorch/issues/2370
3. Original pull request related commit(s):
torch_npu 2.7.1 requires CANN >= 8.2, so the CANN 8.0 blacklist
and cann_version check are no longer reachable. Removing them
eliminates the _get_cann_version() call from import path.
Co-Authored-By: Claude noreply@anthropic.com
- Replace collect_env.get_cann_version() (os.walk over ASCEND_HOME_PATH,
~250ms) with torch_npu._C._get_cann_version() (C++ impl, ~0.014ms)
- Remove obsolete CANN 8.0.x blacklist entries (8.0.RC1/RC2, T1~T52)
- Remove global state (_cann_version, _device_name) in favor of local
variables - no caching needed with <1ms C++ API calls
- Remove collect_env dependency entirely
Co-Authored-By: Claude noreply@anthropic.com