已合并
pta supports to create nested tensor #30196
culechan创建于 1月29日
pta supports to create nested tensor #30196
已合并
Pull Request已成功合入, 合并人@ascend-robot
(感谢 culechan 的贡献)ascend-robot
1月29日 评论:
1月29日 评论:
AtlasAccount
1月29日 评论:
1月29日 评论:
ascend-robot
1月29日 评论:
1月29日 评论:
以下是根据您提交的修改文件推荐的Reviewer和Committer序列,需各模块评审通过后方可合入
| Module List | Reviewers | Committers |
|---|---|---|
| repo-Ascend/pytorch | shaoyf, huangyunlong2022, anyrenwei, SCh_zx, li_jing_hw | liwei386, dilililiwhy, shaoyf, medivh-x, guoqi1024 |


1月29日 添加了label:ascend-cla/yes
ascend-robot
1月29日 评论:
1月29日 评论:
AtlasAccount
1月29日 评论:
1月29日 评论:
问题/功能描述
本次PR移除了PyTorch框架中嵌套张量(Nested Tensor)在NPU设备上的使用限制,解决了因拦截机制导致torch.nested.nested_tensor和torch.nested.as_nested_tensor等关键API无法在NPU上正常工作的问题。此举扩展了框架对不规则序列数据的支持能力,使NPU能够处理更广泛的数据类型和结构。
修改方案描述
修改方案主要包含两部分:一是移除原有的拦截逻辑,二是新增独立的测试用例。具体移除了test_unsupport_api.py中针对嵌套张量的异常测试,并删除了npu_intercept.py和unsupport_api.py中相关的拦截代码。同时,新增了test_nestedtensor.py文件,其中包含了对torch.nested.nested_tensor、unbind、size等方法的全面功能测试,覆盖了2D/3D张量、不同数据类型及边界情况,确保了嵌套张量功能在NPU上的正确性和稳定性。


culechan
1月29日 评论:
1月29日 评论:
compile


1月29日 添加了label:ci-pipeline-running
1月29日 删除了label:ci-pipeline-running
1月29日 添加了label:ci-pipeline-passed
ascend-robot
1月29日 评论:
1月29日 评论:
流水线 PR-pipeline_pytorch#5171 已完成
| 阶段 | 任务名 | 状态 | 详情 |
|---|---|---|---|
| 编译构建 | Build_X86 | ✅ | >>> |
| Build_LibTorch | ✅ | >>> | |
| Build_ARM | ✅ | >>> | |
| Build_ARM_inductor | 🛑 | >>> | |
| Build_X86_py311 | 🛑 | >>> | |
| Build_ARM_py311 | 🛑 | >>> | |
| dist_test_or_not | ✅ | >>> | |
| 恶意代码检查 | Antipoison | ✅ | >>> |
| 编码安全与规范检查 | CodeCheck | ✅ | >>> |
| check_error | ✅ | >>> | |
| 开源片段检查 | SCA | ✅ | >>> |
| 开发者测试 | UT_DIST_X86 | 🛑 | >>> |
| UT_X86_Part_01 | ✅ | >>> | |
| UT_X86_Part_02 | ✅ | >>> | |
| UT_ARM_A2_Part_01 | 🛑 | >>> | |
| UT_ARM_A2_Part_02 | 🛑 | >>> | |
| UT_inductor_arm | 🛑 | >>> | |
| 流水线 | PR-pipeline_pytorch | ✅ | >>> |


1月29日 添加了label:lgtm
1月29日 添加了label:approved
ascend-robot
1月29日 评论:
1月29日 评论:
Review Guide
This Pull-Request Passes Review.
Committers who wrote a comment of /approve are: wangchao430, shaoyf.
Reviewers who wrote a comment of /lgtm are: shaoyf, wangchao430.


1月29日 合入了pull request
What type of PR is this?
What does this PR do / why do we need it:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewers: