已合并
[sync] PR-39043: [fix] 连续性判断 #39102
ascend-robot创建于 6月23日
[sync] PR-39043: [fix] 连续性判断 #39102
已合并
Pull Request已成功合入, 合并人@ascend-robot
(感谢 ascend-robot 的贡献)6月23日 创建了 pull request,commit 6ad156f8
6月23日 关联了issue:[Usage]: 接口输入非内存连续实际无校验,但文档描述必须为内存连续,需要加一个校验:输入非连输入校验。
ascend-robot
6月23日 评论:
6月23日 评论:
6月23日 添加了label:ascend-cla/yes
6月23日 添加了label:stat/needs-squash
ascend-robot
6月23日 评论:
6月23日 评论:
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 | ✅ liangsongwei, htchu (2/2) | ✅ liangsongwei, htchu (2/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-robot
6月23日 评论:
6月23日 评论:
Ascend docs pipeline is running...


6月23日 添加了label:docs-ci-pipeline-running
ascend-robot
6月23日 评论:
6月23日 评论:
✅ 跳过 docs ci 检查,没有需要检查的文档文件


6月23日 删除了label:docs-ci-pipeline-running
6月23日 添加了label:docs-ci-pipeline-success
L1919_snow
6月23日 评论:
6月23日 评论:
compile


6月23日 update merge request[project id: 7404318, iid: 39102, commit_id: 2cc3ea49d9e505bdd80871ceaaaacb73f6b7f53e] virtual merging success
6月23日 update merge request[project id: 7404318, iid: 39102, commit_id: 2cc3ea49d9e505bdd80871ceaaaacb73f6b7f53e] virtual merging success
6月23日 update merge request[project id: 7404318, iid: 39102, commit_id: eb68ddca07dcf27e6f08d4610843c2acc5942237] virtual merging success
6月23日 update merge request[project id: 7404318, iid: 39102, commit_id: eb68ddca07dcf27e6f08d4610843c2acc5942237] virtual merging success
6月23日 添加了label:ci-pipeline-running
ascend-robot
6月23日 评论:
6月23日 评论:
Ascend docs pipeline is running...


6月23日 删除了label:docs-ci-pipeline-success
6月23日 添加了label:docs-ci-pipeline-running
ascend-robot
6月23日 评论:
6月23日 评论:
Ascend docs pipeline is running...


ascend-robot
6月23日 评论:
6月23日 评论:
✅ 跳过 docs ci 检查,没有需要检查的文档文件


6月23日 删除了label:docs-ci-pipeline-running
6月23日 添加了label:docs-ci-pipeline-success
ascend-robot
6月23日 评论:
6月23日 评论:
✅ 跳过 docs ci 检查,没有需要检查的文档文件


6月23日 删除了label:ci-pipeline-running
6月23日 添加了label:ci-pipeline-passed
ascend-robot
6月23日 评论:
6月23日 评论:
流水线 PR-pipeline_pytorch#38598 已完成
| 阶段 | 任务名 | 状态 | 详情 |
|---|---|---|---|
| 编译构建 | 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 | ✅ | >>> |


atomgit-bot
6月24日 评论:
6月24日 评论:
变更摘要
此 PR 从原始 PR-39043 同步,修复了 torch_npu/utils/combine_tensors.py 中张量连续性判断缺失的问题。主要改动是在 npu_combine_tensors 和 is_combined_tensor_valid 两个函数中新增对张量连续性(is_contiguous())的校验,确保在合并张量操作及合并后张量有效性校验时,非连续张量能够被正确识别并拒绝,避免后续数据操作出现异常。
主要改动
npu_combine_tensors新增连续性检查:在遍历待合并张量列表时,新增if not tensor.is_contiguous()判断,若非连续张量则直接抛出RuntimeError,防止非连续张量参与合并导致数据指针操作异常is_combined_tensor_valid新增连续性校验:在验证合并张量有效性的条件链中追加not tensor.is_contiguous()判断,确保非连续张量被判定为无效,使有效性校验逻辑更为完备- 格式调整:伴随行尾续行符
or \的新增,对is_combined_tensor_valid中条件表达式的格式进行了相应调整


atomgit-bot
6月24日 评论:
6月24日 评论:
梁松伟
6月24日 评论:
6月24日 评论:
/approve


6月24日 添加了label:approved
6月25日 添加了label:lgtm
6月25日 合入了pull request
ascend-robot
6月25日 评论:
6月25日 评论:
流水线 pytorch_gitcode_PR_multiVersion#11257 [ commitID:7caebd30 ] 已完成


1. Origin pull request:
https://gitcode.com/Ascend/pytorch/merge_requests/39043
2. Original pull request related issue(s):
https://gitcode.com/Ascend/pytorch/issues/2456
3. Original pull request related commit(s):
Signed-off-by: l1919_snow lixinyu68@huawei.com
Signed-off-by: l1919_snow lixinyu68@huawei.com
格式
Signed-off-by: l1919_snow lixinyu68@huawei.com
格式修改
Signed-off-by: l1919_snow lixinyu68@huawei.com