Merged
docs: mark torch.ShortStorage as supported on Ascend 950DT #46018
zhangjiahao-2026Add on Sep 8
docs: mark torch.ShortStorage as supported on Ascend 950DT #46018
Merged
Pull Request has been successfully merged by ascend-robot.
(Thank you for zhangjiahao-2026's contribution.)Sep 8 Created pull request, commit e38c359f
Sep 8 Associated issue: 【API一致性任务】torch.ShortStorage 社区已有完整用例,现有 NPU 适配已覆盖,【API一致性任务】torch.ShortStorage.dtype 社区已有用例且无需额外 NPU 适配
Sep 8 Associated issue: 【API一致性任务】torch.ShortStorage 社区已有完整用例,现有 NPU 适配已覆盖,【API一致性任务】torch.ShortStorage.dtype 社区已有用例且无需额外 NPU 适配
atomgit-bot
Sep 8 Comments:
Sep 8 Comments:
变更摘要
该 PR 为纯资料(docs)更新,将公开非计算类 API torch.ShortStorage 在 Ascend 950DT 上的支持状态由「不支持」改为「支持」。由于该 API 已在 A5(Ascend950PR)实机验证通过,本次将 torch-Storage.md 文档中 torch.ShortStorage 的 Ascend 950DT 标记同步更新,涉及 PyTorch 2.7.1、2.11.0、2.12.0、2.13.0 四个版本目录,每处仅修改该 API 的 950DT 支持标记一行,不涉及接口或功能代码变更。
主要改动
- 更新
torch.ShortStorage的 950DT 支持标记: 在docs/zh/api/native_api/pytorch_2-7-1/torch-Storage.md、pytorch_2-11-0/torch-Storage.md、pytorch_2-12-0/torch-Storage.md、pytorch_2-13-0/torch-Storage.md四个文件中,将torch.ShortStorage的Ascend 950DT由「不支持」改为「支持」,每个文件各一行改动 - 保持其他产品维度标记不变: Atlas A2、Atlas A3 训练系列产品对
torch.ShortStorage的支持状态维持「支持」不变,不新增 A5 / 950PR 产品字段 - 不填写数据类型限制: 该 API 为非计算类接口,与张量数据类型无关,故不添加数据类型限制说明
- 不涉及接口变更: 本 PR 不修改
torch.ShortStorage.dtype的 950DT 标记(对应 issue #3869),仅针对torch.ShortStorage本体条目


Incorrect?
atomgit-bot
Sep 8 Comments:
Sep 8 Comments:
🤖 本次改动均为数据 / 生成 / 二进制文件(如测试用例、锁文件、媒体资源),没有可审查的代码逻辑,已跳过 AI 代码审查。


Incorrect?
Sep 8 Added label: ascend-cla/yes
99 messages are collapsed here。 See more
Oct 10 Removed label: ci-pipeline-running
Oct 10 Added label: ci-pipeline-passed
AtlasAccount
Oct 10 Comments:
Oct 10 Comments:
流水线 PR-pipeline_pytorch#71960 [ commitID:5ef80477 ] 已完成
>>>代码风格自动修复执行成功(无修复内容)
| 阶段 | 任务名 | 状态 | 详情 |
|---|---|---|---|
| 编译构建 | Build_X86 | ⚪ IGNORED | >>> |
| Build_ARM | ⚪ IGNORED | >>> | |
| Build_X86_torchair | ⚪ IGNORED | >>> | |
| Build_ARM_torchair | ⚪ IGNORED | >>> | |
| patch_test | ⚪ IGNORED | >>> | |
| Build_X86_213 | ⚪ IGNORED | >>> | |
| Build_ARM_213 | ⚪ IGNORED | >>> | |
| 恶意代码检查 | Antipoison | ✅ COMPLETED | >>> |
| 编码安全与规范检查 | check_error | ✅ COMPLETED | >>> |
| lintrunner | ✅ COMPLETED | >>> | |
| 开源片段检查 | SCA | ✅ COMPLETED | >>> |
| 开发者测试 | UT_ARM_A2_Part_01 | ⚪ IGNORED | >>> |
| UT_ARM_A2_Part_02 | ⚪ IGNORED | >>> | |
| UT_ARM_A2_Part_03 | ⚪ IGNORED | >>> | |
| UT_inductor_Part_01 | ⚪ IGNORED | >>> | |
| UT_inductor_Part_02 | ⚪ IGNORED | >>> | |
| UT_inductor_Part_03 | ⚪ IGNORED | >>> | |
| UT_inductor_Part_04 | ⚪ IGNORED | >>> | |
| UT_DIST_ARM_Part_01 | ⚪ IGNORED | >>> | |
| UT_DIST_ARM_Part_02 | ⚪ IGNORED | >>> | |
| UT_DIST_ARM_Part_03 | ⚪ IGNORED | >>> | |
| UT_DIST_ARM_Part_04 | ⚪ IGNORED | >>> | |
| UT_ARM_A2_Select_Part_01 | ⚪ IGNORED | >>> | |
| UT_ARM_A2_Select_Part_02 | ⚪ IGNORED | >>> | |
| UT_inductor_Part1_213 | ⚪ IGNORED | >>> | |
| 流水线 | PR-pipeline_pytorch | ✅ COMPLETED | >>> |
- compile、compile_inductor、compile_torchair : 运行流水线
- retry : 重试流水线所有失败子任务
- retry <任务名> : 仅重试指定失败子任务
- stop : 停止流水线


Oct 10 Merged pull request
AtlasAccount
Oct 10 Comments:
Oct 10 Comments:
流水线 pytorch_gitcode_PR_multiVersion-onetrack#306 [ commitID:5ef80477 ] 已完成


【合入来源】
关联任务issue: https://gitcode.com/Ascend/pytorch/issues/3861
【修改方案】
在 master 资料中更新公开非计算类 API
torch.ShortStorage的 Ascend 950DT 支持情况。修改文件:
具体修改内容:
本 PR 仅修改目标 API 的 950DT 支持标记,不批量修改同一文件中其他历史 API 的资料内容。
【资料变更】
资料检查结果:master 下的原生 API 资料已收录
torch.ShortStorage,Atlas A2、Atlas A3 标记为支持,Ascend 950DT 原标记为不支持。本次已补充 A5(Ascend950PR)实机验证并通过,因此将以下版本目录
torch-Storage.md中torch.ShortStorage的 Ascend 950DT 更新为支持:该 API 为公开非计算类接口,与张量数据类型无关,不填写数据类型限制。
【接口变更】
不涉及
【功能验证】
torch.ShortStorage是 PyTorch Legacy TypedStorage 类型之一,用于保存 16 位有符号整数数据,元素类型对应torch.int16。PyTorch 官方社区在以下用例中已有相关验证:
torch.ShortStorage对应的 NPU Storage 类型为torch_npu.npu.ShortStorage。现有test/test_torch.py已完成 NPU Storage 类型映射适配,不需要修改 Torch-NPU 功能实现,也不需要新增测试文件或test_upstreampatch。API 功能、社区用例情况、NPU 适配分析和各版本验证结果见说明 Issue:
https://gitcode.com/Ascend/pytorch/issues/3861
A5 硬件验证信息如下。
验证设备:
验证环境:
验证命令:
验证场景:
element_sizefrom_buffertorch_npu.npu.ShortStoragetorch.ShortStorage(wrap_storage=npu_storage)抛出must be cputorch_npu.npu.ShortStorage(wrap_storage=cpu_storage)抛出must be npu运行截图:
验证结论:
torch.ShortStorage在上述 A5(Ascend950PR)环境中上述场景均验证通过。TypedStorage deprecation warning 属于 PyTorch 上游预期告警,不影响结论。【CheckList】