Pull Request已成功合入, 合并人@ascend-robot
(感谢 xiaoqi-zhou 的贡献)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 |
|---|---|---|
| test | ✅ wjlflyer, renyujin (2/2) | ✅ renyujin (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
xiaoqi-zhou, thanks for your pull request. All authors of the commits have signed the CLA. 👍


Linking Issue Notice
@xiaoqi-zhou , the pull request must be linked to at least one issue.
If an issue has already been linked, but the needs-issue label remains, you can remove the label by commenting /check-issue .


当前仓库存在以下 保护分支 :
| Protected Branch | Version | Release |
|---|---|---|
| master | ||
| v2.10.0 | ||
| v2.9.0 | ||
| v2.7.1-26.1.0 | ||
| v2.7.1 | ||
| v2.9.0-26.1.0 | ||
| v2.10.0-26.1.0 | ||
| v2.12.0-26.1.0 | ||
| v2.11.0-26.1.0 | ||
| v2.11.0 | ||
| v2.12.0 | ||
| ci-test | ||
| sync-pr28113--to-v2.9.0 |
评论 /sync <branch1> <branch2> ... 可将当前 PR 修改同步到其它分支(创建同步 PR):
a) 如果当前 PR 是 Open 状态,同步操作将延迟到 PR 被合并时执行
b) 如果当前 PR 已经 Merged,将立即执行同步操作
注意:
- /sync 命令可以指定同步到多个分支,仅最后一个 /sync 命令生效
- 如果创建的同步 PR 不正确,可通过向同步 PR 的源分支提交轻量级 PR 完善,或使用 /close 命令关闭


Ascend docs pipeline is running...


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


经过对 test/distributed/test_allgather_into_tensor.py 文件的仔细审查,本次变更内容干净、无实质性问题:
- 移除了
unittest、os、random.randint、torch.multiprocessing四个未使用的导入,文件其余部分确实不依赖这些模块,清理安全。 - 新增了
SupportedDevices导入,并在test_all_gather_into_tensor_dist和test_all_gather_into_tensor_uneven_dist两个测试方法上添加了@SupportedDevices(['Ascend910A', 'Ascend910B', 'Ascend910_93'])装饰器,实现了在 A5(不在列表内)上跳过这两个用例的预期目标。 - 代码逻辑、异常处理、资源管理等方面均无引入风险。
文件 test/distributed/test_allgather_into_tensor.py:无问题。


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 | ❌ | >>> |


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 | ✅ | >>> |




【合入来源】
issue:https://gitcode.com/Ascend/pytorch/issues/2437
【修改方案】
test_all_gather_into_tensor_dist和test_all_gather_into_tensor_uneven_dist调用了torch_npu.npu_format_cast接口,里面调用了aclnnNpuFormatCastCalculateSizeAndFormat算子,在文档上已说明A5不支持ND->NC1HWC0的转换,这两个用例需要在A5上面跳过执行。
aclnnNpuFormatCastCalculateSizeAndFormat接口文档:
srcTensor srcTensor数据格式 dstFormat additionalDtype actualFormat
INT8 ACL_FORMAT_ND(2) ACL_FORMAT_FRACTAL_NZ(29) ACL_INT8(2) ACL_FORMAT_FRACTAL_NZ(29)
INT32 ACL_FORMAT_ND(2) ACL_FORMAT_FRACTAL_NZ(29) ACL_FLOAT16(1)、ACL_BF16(27) ACL_FORMAT_FRACTAL_NZ_C0_16(50)
FLOAT ACL_FORMAT_ND(2) ACL_FORMAT_FRACTAL_NZ(29) ACL_FLOAT16(1)、ACL_BF16(27) ACL_FORMAT_FRACTAL_NZ_C0_16(50)
FLOAT ACL_FORMAT_ND(2) ACL_FORMAT_FRACTAL_NZ(29) ACL_FLOAT8_E4M3FN(36) ACL_FORMAT_FRACTAL_NZ_C0_32(51)
FLOAT16 ACL_FORMAT_ND(2) ACL_FORMAT_FRACTAL_NZ(29) ACL_FLOAT16(1) ACL_FORMAT_FRACTAL_NZ(29)
BFLOAT16 ACL_FORMAT_ND(2) ACL_FORMAT_FRACTAL_NZ(29) ACL_BF16(27) ACL_FORMAT_FRACTAL_NZ(29)
FLOAT8_E4M3FN ACL_FORMAT_ND(2) ACL_FORMAT_FRACTAL_NZ(29) ACL_FLOAT8_E4M3FN(36) ACL_FORMAT_FRACTAL_NZ(29)
FLOAT4_E2M1 ACL_FORMAT_ND(2) ACL_FORMAT_FRACTAL_NZ(29) ACL_FLOAT8_E4M3FN(36) ACL_FORMAT_FRACTAL_NZ(29)
FLOAT4_E2M1 ACL_FORMAT_ND(2) ACL_FORMAT_FRACTAL_NZ(29) ACL_FLOAT4_E2M1(40) ACL_FORMAT_FRACTAL_NZ(29)
FLOAT4_E1M2 ACL_FORMAT_ND(2) ACL_FORMAT_FRACTAL_NZ(29) ACL_FLOAT4_E1M2(41) ACL_FORMAT_FRACTAL_NZ(29)
HIFLOAT8 ACL_FORMAT_ND(2) ACL_FORMAT_FRACTAL_NZ(29) HIFLOAT8(34) ACL_FORMAT_FRACTAL_NZ(29)
【资料变更】
不涉及
【接口变更】
不涉及
【功能验证】
本地测试用例跑通:


【CheckList】