| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
attention/ffn的aicpu算子提供torch_npu._afd的调用方式 Co-authored-by: panweicheng<panweicheng@huawei.com> # message auto-generated for no-merge-commit merge: !28866 merge v2.7.1 into v2.7.1 attention/ffn的aicpu算子提供torch_npu._afd的调用方式 Created-by: pwc10490 Commit-by: panweicheng Merged-by: ascend-robot Description: <!-- Thanks for sending a pull request! --> **What type of PR is this?** > Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line: > > /kind bug > /kind task > /kind feature **What does this PR do / why do we need it**: **Which issue(s) this PR fixes**: <!-- *Automatically closes linked issue when PR is merged. Usage: Fixes #<issue number>, or Fixes (paste link of issue). --> Fixes # **Special notes for your reviewers**: See merge request: Ascend/pytorch!28866 | 7 个月前 | |
【ut覆盖率】cpp_builder 测试用例补充 | 5 个月前 | |
添加HOST内存统计API对齐社区 Co-authored-by: luanchaowei<luanchaowei3@huawei.com> # message auto-generated for no-merge-commit merge: !29054 merge v2.7.1 into v2.7.1 HOST内存统计API对齐社区 Created-by: luanchaowei Commit-by: luanchaowei Merged-by: ascend-robot Description: <!-- Thanks for sending a pull request! --> **What type of PR is this?** > Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line: > > /kind bug > /kind task > /kind feature **What does this PR do / why do we need it**: 1.torch_npu.npu. empty_pin_memory_cache()更名为torch_npu.npu.host_empty_cache() 2.torch_npu.npu.pin_memory_stats()更名为torch_npu.npu.host_memory_stats() 3.删除torch_npu.npu.pin_memory_allocated()和torch_npu.npu.pin_memory_reserved() 4.补齐torch_npu.npu.host_memory_stats()其他指标 5.新增:torch_npu.npu.host_memory_stats_as_nested_dict() torch_npu.npu.reset_accumulated_host_memory_stats() torch_npu.npu. reset_peak_host_memory_stats() **Which issue(s) this PR fixes**: <!-- *Automatically closes linked issue when PR is merged. Usage: Fixes #<issue number>, or Fixes (paste link of issue). --> Fixes # **Special notes for your reviewers**: See merge request: Ascend/pytorch!29054 | 7 个月前 | |
| 1 年前 | ||
| 2 年前 | ||
[feat] add env TORCH_TRANSFER_TO_NPU Co-authored-by: liujunzhu<liujunzhu@huawei.com> # message auto-generated for no-merge-commit merge: !30828 merge v2.7.1 into v2.7.1 [feat] add env TORCH_TRANSFER_TO_NPU Created-by: liujunzhu Commit-by: liujunzhu Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > (如有)请关联需求文档/issue链接 - [x] 需求 - [ ] 问题单 - [ ] issue/工单 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 > 请描述修改内容的具体实现,涉及哪些组件之间进行交互,可以用1、2、3、...进行罗列\ > 如果是需求或者重构类的PR,需要补充详细设计文档(说明上下游组件关系、时序图、类图、DFX能力等内容) 支持通过环境变量 TORCH_TRANSFER_TO_NPU使能transfer_to_npu。 设置环境变量TORCH_TRANSFER_TO_NPU为1时(取值为0或1),在import torch_npu时自动执行from torch_npu.contrib import transfer_to_npu,方便Torch CUDA脚本无缝迁移到NPU。 # 【资料变更】 > 请确认是否涉及资料变更。如涉及,需要在PR中体现,并简要说明修改内容。如不涉及,需填写“不涉及” 涉及资料变更,资料中需描述TORCH_TRANSFER_TO_NPU的功能和用法,本pr不涉及资料修改,后续单独提交资料修改的pr。 # 【接口变更】 > 请确认是否涉及跨代码仓或者客户面可见的接口变更。如涉及,需要详细说明接口以及对应的变更内容,同时需要在资料中体现。如不涉及,需填写“不涉及” 新增环境变量TORCH_TRANSFER_TO_NPU,取值为0或1,默认为0,设置为1时支持cuda接口到npu的转换。 # 【功能验证】 > 说明测试场景,测试方法。如果本次测试方式与常规单元测试不同,请详细说明您的测试步骤\ > 新增/变更内容是否已新增/适配UT测试用例看护,并补充测试自验证截图 PR已附带大量验证用例。 # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [x] 代码注释完备,正确记录错误日志 - [x] 代码实现进行了返回值、空指针等校验 - [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [x] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/pytorch!30828 | 6 个月前 | |
[Feature]rename head file and add cmake for libtorch_npu | 2 年前 | |
| 1 年前 | ||
| 1 年前 | ||
[feat] custom hccl api with dispatch Co-authored-by: pengqi<pengqi33@huawei.com> # message auto-generated for no-merge-commit merge: !31008 merge v2.7.1 into v2.7.1 [feat] custom hccl api with dispatch Created-by: pengqihw Commit-by: pengqi Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> 为自定义HCCL分布式API添加AsyncCollectiveTensor支持,实现自动wait触发机制。 # 【合入来源】 > <font color="red">**如有社区issue,请关联issue链接**</font>\ > <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font> - [x] 需求 - [ ] 问题单 - [ ] issue/工单 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 1. 新增文件 - test/distributed/test_async_collective_tensor.py - 新增测试用例,验证三个API对AsyncCollectiveTensor的支持 - torch_npu/csrc/distributed/HcclOps.cpp - 新增HCCL操作实现 2. 核心修改 - ProcessGroupHCCL.cpp/hpp - 为以下API添加dispatch机制,支持AsyncCollectiveTensor自动触发wait: - batch_isend_irecv - reduce_scatter_tensor_uneven - all_gather_into_tensor_uneven 3. 其他修改 - test/distributed/test_reduce_scatter_tensor.py - 测试用例调整 - torch_npu_schema.json - schema更新 - Init.cpp - 初始化相关调整 # 【资料变更】 不涉及 # 【接口变更】 不涉及 # 【功能验证】 新增测试用例覆盖: - AsyncCollectiveTensor类型验证 - completed状态验证(初始False,调用后True) - 结果一致性验证(与普通Tensor结果对比)  # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [ ] 代码注释完备,正确记录错误日志 - [ ] 代码实现进行了返回值、空指针等校验 - [ ] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [ ] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/pytorch!31008 | 5 个月前 | |
feat: Support independent packaging and deployment of npugraph_ex Co-authored-by: xuzhenhua2025<xuzhenhua4@huawei.com> # message auto-generated for no-merge-commit merge: !31410 merge v2.7.1 into v2.7.1 feat: Support independent packaging and deployment of npugraph_ex Created-by: xuzhenhua2025 Commit-by: xuzhenhua2025 Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 - [x] 需求 - [ ] 问题单 - [ ] issue/工单 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 torch_npu/dynamo 新增npugraph_ex独立包目录,实现npugraph_ex backend功能,不依赖torchair包 npugraph_ex后端注册方法使用 import npugraph_ex, 并支持lazy import # 【资料变更】 不涉及 # 【接口变更】 不涉及 # 【功能验证】 无新增内容,无需新增用例/UT测试用例已适配变更内容看护. # 【CheckList】 - [x] 代码注释完备,正确记录错误日志 - [x] 代码实现进行了返回值、空指针等校验 - [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [x] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/pytorch!31410 | 5 个月前 | |
| 2 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
[fix]rollback del 32 allocator Co-authored-by: zhukkk<zhuke11@huawei.com> # message auto-generated for no-merge-commit merge: !31400 merge v2.7.1 into v2.7.1 [fix]rollback del 32 allocator Created-by: zhukkk Commit-by: zhukkk Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > <font color="red">**如有社区issue,请关联issue链接**</font>\ > <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font> - [ ] 需求 - [ ] 问题单 - [ ] issue/工单 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 > 请描述修改内容的具体实现,涉及哪些组件之间进行交互,可以用1、2、3、...进行罗列\ > 如果是需求或者重构类的PR,需要补充详细设计文档(说明上下游组件关系、时序图、类图、DFX能力等内容) # 【资料变更】 > 请确认是否涉及资料变更。如涉及,需要在PR中体现,并简要说明修改内容。如不涉及,需填写“不涉及” # 【接口变更】 > 请确认是否涉及跨代码仓或者客户面可见的接口变更。如涉及,需要详细说明接口以及对应的变更内容,同时需要在资料中体现。如不涉及,需填写“不涉及” # 【功能验证】 > 说明测试场景,测试方法。如果本次测试方式与常规单元测试不同,请详细说明您的测试步骤\ > 新增/变更内容是否已新增/适配UT测试用例看护,并补充测试自验证截图 # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [ ] 代码注释完备,正确记录错误日志 - [ ] 代码实现进行了返回值、空指针等校验 - [ ] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [ ] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/pytorch!31400 | 5 个月前 | |
| 1 年前 | ||
AI assist developer for python DT second batch for 2.7.1 Co-authored-by: deepSeekya<chenzhihan6@huawei.com> # message auto-generated for no-merge-commit merge: !26370 merge v2.7.1 into v2.7.1 AI assist developer for python DT second batch for 2.7.1 Created-by: deepSeekya Commit-by: deepSeekya Merged-by: ascend-robot Description: 【合入说明】 AI辅助研发python dt测试用例生成。 【合入来源】 AI辅助研发需求 dt测试文件覆盖率提升。 See merge request: Ascend/pytorch!26370 | 9 个月前 | |
[profiler-2.7]profiler添加解析完成标志文件&level1场景支持aicore_none开关 Co-authored-by: yu-liang-bin<y1416490440@163.com> # message auto-generated for no-merge-commit merge: !30121 merge feature-profiler-2.7 into v2.7.1 [profiler-2.7]profiler添加解析完成标志文件&level1场景支持aicore_none开关 Created-by: yu_liangbin Commit-by: yu-liang-bin Merged-by: ascend-robot Description: <!-- Thanks for sending a pull request! --> **What type of PR is this?** > Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line: > > /kind bug > /kind task > /kind feature **What does this PR do / why do we need it**: 1. profiler解析完成后只有日志打屏,华为云用户需要一个解析完成的文件来确定是否解析完成; 2. profiler level1/level2场景下aicore_metrics默认值为pipeutilization, level1/level2场景下也应该支持不采集aicore_metrics数据; **Which issue(s) this PR fixes**: 1. 添加profiler解析完成标志文件; 2. profiler level1/level2场景下aicore_metrics能支持不采集aicore_metrics数据; 3. 补充生成解析完成标志文件的UT 验证结果: 测试用例全部通过:  <!-- *Automatically closes linked issue when PR is merged. Usage: Fixes #<issue number>, or Fixes (paste link of issue). --> Fixes # **Special notes for your reviewers**: See merge request: Ascend/pytorch!30121 | 7 个月前 | |
AI assist developer for python dt v2.7.1 Co-authored-by: aksksks<mengzichao@h-partners.com> # message auto-generated for no-merge-commit merge: !26535 merge v2.7.1 into v2.7.1 AI assist developer for python dt v2.7.1 Created-by: aksksks Commit-by: aksksks Merged-by: ascend-robot Description: <!-- Thanks for sending a pull request! --> **What type of PR is this?** > Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line: > > /kind bug > /kind task > /kind feature **What does this PR do / why do we need it**: **Which issue(s) this PR fixes**: <!-- *Automatically closes linked issue when PR is merged. Usage: Fixes #<issue number>, or Fixes (paste link of issue). --> Fixes # **Special notes for your reviewers**: See merge request: Ascend/pytorch!26535 | 9 个月前 | |
Fixed failed tests Co-authored-by: yuhaiyan<yuhaiyan8@huawei.com> # message auto-generated for no-merge-commit merge: !26320 merge cherry-pick-mr-26319-1762427436422-auto into v2.7.1 Fixed failed tests Created-by: yuhaiyan Commit-by: yuhaiyan Merged-by: ascend-robot Description: <!-- Thanks for sending a pull request! --> **What type of PR is this?** > Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line: > > /kind bug > /kind task > /kind feature **What does this PR do / why do we need it**: **Which issue(s) this PR fixes**: <!-- *Automatically closes linked issue when PR is merged. Usage: Fixes #<issue number>, or Fixes (paste link of issue). --> Fixes # **Special notes for your reviewers**: See merge request: Ascend/pytorch!26320 | 9 个月前 | |
Fix Tensor.empty deterministic bug. Co-authored-by: liwei386<liwei386@huawei.com> # message auto-generated for no-merge-commit merge: !31474 merge revert-mr-31063-1772787446426-auto into v2.7.1 Fix Tensor.empty deterministic bug. Created-by: liwei386 Commit-by: liwei386 Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > <font color="red">**如有社区issue,请关联issue链接**</font>\ > <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font> - [ ] 需求 - [ ] 问题单 - [ ] issue/工单 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 > 请描述修改内容的具体实现,涉及哪些组件之间进行交互,可以用1、2、3、...进行罗列\ > 如果是需求或者重构类的PR,需要补充详细设计文档(说明上下游组件关系、时序图、类图、DFX能力等内容) # 【资料变更】 > 请确认是否涉及资料变更。如涉及,需要在PR中体现,并简要说明修改内容。如不涉及,需填写“不涉及” # 【接口变更】 > 请确认是否涉及跨代码仓或者客户面可见的接口变更。如涉及,需要详细说明接口以及对应的变更内容,同时需要在资料中体现。如不涉及,需填写“不涉及” # 【功能验证】 > 说明测试场景,测试方法。如果本次测试方式与常规单元测试不同,请详细说明您的测试步骤\ > 新增/变更内容是否已新增/适配UT测试用例看护,并补充测试自验证截图 # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [ ] 代码注释完备,正确记录错误日志 - [ ] 代码实现进行了返回值、空指针等校验 - [ ] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [ ] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/pytorch!31474 | 5 个月前 | |
add TORCH_NPU_LOGS_FILTER Co-authored-by: nomiz<1606135114@qq.com> # message auto-generated for no-merge-commit merge: !30462 merge v2.7.1 into v2.7.1 add TORCH_NPU_LOGS_FILTER Created-by: nomiz Commit-by: nomiz Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > (如有)请关联需求文档/issue链接 - [x] 需求 - [ ] 问题单 - [ ] issue/工单 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 > 请描述修改内容的具体实现,涉及哪些组件之间进行交互,可以用1、2、3、...进行罗列\ > 如果是需求或者重构类的PR,需要补充详细设计文档(说明上下游组件关系、时序图、类图、DFX能力等内容) 新增环境变量TORCH_NPU_LOGS_FILTER,对日志进行过滤 实现黑白名单功能 “+”: 只打印白名单内容;“-”:不打印黑名单内容,其他保留; 无该环境变量:全部打印 LogContext.cpp 新增环境变量解析和过滤逻辑 Logger.cpp 日志打印前实现过滤 # 【资料变更】 > 请确认是否涉及资料变更。如涉及,需要在PR中体现,并简要说明修改内容。如不涉及,需填写“不涉及” # 【接口变更】 > 请确认是否涉及跨代码仓或者客户面可见的接口变更。如涉及,需要详细说明接口以及对应的变更内容,同时需要在资料中体现。如不涉及,需填写“不涉及” # 【功能验证】 > 说明测试场景,测试方法。如果本次测试方式与常规单元测试不同,请详细说明您的测试步骤\ > 新增/变更内容是否已新增/适配UT测试用例看护,并补充测试自验证截图 新增环境变量已新增UT测试用例  # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [ ] 代码注释完备,正确记录错误日志 - [ ] 代码实现进行了返回值、空指针等校验 - [ ] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [ ] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/pytorch!30462 | 6 个月前 | |
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
[Feature][aclgraph] replace hard-coded dispatch with Registry + Template Method for NPU Graph op handlers Co-authored-by: suhaibo<suhaibo1@huawei.com> # message auto-generated for no-merge-commit merge: !30977 merge v2.7.1 into v2.7.1 [Feature][aclgraph] replace hard-coded dispatch with Registry + Template Method for NPU Graph op handlers Created-by: suhaibo Commit-by: suhaibo Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > <font color="red">**如有社区issue,请关联issue链接**</font>\ > <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font> - [x] 需求 - [ ] 问题单 - [ ] issue/工单 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 > 请描述修改内容的具体实现,涉及哪些组件之间进行交互,可以用1、2、3、...进行罗列\ > 如果是需求或者重构类的PR,需要补充详细设计文档(说明上下游组件关系、时序图、类图、DFX能力等内容) 1. 拓展aclgraph update功能,支持自定义算子注册update能力,避免侵入式修改pta源码 # 【资料变更】 > 请确认是否涉及资料变更。如涉及,需要在PR中体现,并简要说明修改内容。如不涉及,需填写“不涉及” 不涉及 # 【接口变更】 > 请确认是否涉及跨代码仓或者客户面可见的接口变更。如涉及,需要详细说明接口以及对应的变更内容,同时需要在资料中体现。如不涉及,需填写“不涉及” <span style="color:#0066cc;">新增register_npu_graph_handler和NpuGraphOpHandler对外接口</span> # 【功能验证】 > 说明测试场景,测试方法。如果本次测试方式与常规单元测试不同,请详细说明您的测试步骤\ > 新增/变更内容是否已新增/适配UT测试用例看护,并补充测试自验证截图 # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [x] 代码注释完备,正确记录错误日志 - [x] 代码实现进行了返回值、空指针等校验 - [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [x] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/pytorch!30977 | 5 个月前 | |
| 1 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
add test case for event elapsed_time Co-authored-by: chenkun<chenkun82@huawei.com> # message auto-generated for no-merge-commit merge: !26734 merge v2.7.1_event_ut into v2.7.1 add test case for event elapsed_time Created-by: kuhn7 Commit-by: chenkun Merged-by: ascend-robot Description: <!-- Thanks for sending a pull request! --> **What type of PR is this?** > Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line: > > /kind bug > /kind task > /kind feature **What does this PR do / why do we need it**: **Which issue(s) this PR fixes**: <!-- *Automatically closes linked issue when PR is merged. Usage: Fixes #<issue number>, or Fixes (paste link of issue). --> Fixes # **Special notes for your reviewers**: See merge request: Ascend/pytorch!26734 | 9 个月前 | |
feat(autocast): 支持float32作为自动混合精度计算的数据类型 Co-authored-by: leland17<lileliao@foxmail.com> # message auto-generated for no-merge-commit merge: !30561 merge v2.7.1 into v2.7.1 feat(autocast): 支持float32作为自动混合精度计算的数据类型 Created-by: leland17 Commit-by: leland17 Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > (如有)请关联需求文档/issue链接 issue:[支持float32作为自动混合精度计算的数据类型](https://gitcode.com/Ascend/pytorch/issues/1537) - [x] 需求 - [ ] 问题单 - [ ] issue/工单 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 当前现状with autocast(device="npu", dtype=torch.float32)暂时不支持按照float32的精度获取结果。同liwei有过详细的讨论方案,并且确定了如下的支持思路 在autocast_utils.py中支持float32的数据类型支持。 # 【资料变更】 > 不涉及 # 【接口变更】 > 不涉及 # 【功能验证】 bash cd ${pytorch}/test && python -m unittest test_autocast.TestAutocastNPUfp32 新增4个用例场景,验证暂无问题  整体test_autocast.py的用例执行结果  # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [x] 代码注释完备,正确记录错误日志 - [x] 代码实现进行了返回值、空指针等校验 - [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [x] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/pytorch!30561 | 6 个月前 | |
| 1 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 11 个月前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
[feat] add nestedtensor backend Co-authored-by: culechan<chenshuai81@huawei.com> # message auto-generated for no-merge-commit merge: !30508 merge 2.7_nested into v2.7.1 [feat] add nestedtensor backend Created-by: culechan Commit-by: culechan Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > (如有)请关联需求文档/issue链接 - [ ] 需求 - [x] 问题单 - [ ] issue/工单 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 > 创建Nestedtensor相关的后端,参考quantized后端的实现,因为二者较为类似,因此在文件代码自动生成逻辑部分做了合并重构。 # 【资料变更】 > 不涉及 # 【接口变更】 > 不涉及 # 【功能验证】 > 说明测试场景,测试方法。如果本次测试方式与常规单元测试不同,请详细说明您的测试步骤\ > 新增已适配UT测试用例看护,并补充测试自验证截图  # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [x] 代码注释完备,正确记录错误日志 - [x] 代码实现进行了返回值、空指针等校验 - [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [x] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/pytorch!30508 | 5 个月前 | |
| 2 年前 | ||
| 2 年前 | ||
| 11 个月前 | ||
add torch.npu.memory._set_allocator_settings(only support expandable_segments) and testcases Co-authored-by: zhaoyu<nanzhaogang@qq.com> # message auto-generated for no-merge-commit merge: !25983 merge v2.7.1 into v2.7.1 add torch.npu.memory._set_allocator_settings(only support expandable_segments) and testcases Created-by: zhaoyu65 Commit-by: zhaoyu Merged-by: ascend-robot Description: <!-- Thanks for sending a pull request! --> **What type of PR is this?** > Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line: > /kind feature **What does this PR do / why do we need it**: 1、增加torch_npu.npu.memory.\_set\_allocator\_settings接口,仅支持expandable_segments:True或expandable_segments:False场景。 2、增加对应的测试用例。 **Which issue(s) this PR fixes**: <!-- *Automatically closes linked issue when PR is merged. Usage: Fixes #<issue number>, or Fixes (paste link of issue). --> Fixes # **Special notes for your reviewers**: See merge request: Ascend/pytorch!25983 | 10 个月前 | |
Rollback for bugfix Co-authored-by: guoguanghao<guoguanghao@huawei.com> # message auto-generated for no-merge-commit merge: !25596 merge v2.7.1 into v2.7.1 Rollback for bugfix Created-by: guoguanghao Commit-by: guoguanghao Merged-by: ascend-robot Description: <!-- Thanks for sending a pull request! --> **What type of PR is this?** > Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line: > > /kind bug > /kind task > /kind feature **What does this PR do / why do we need it**: **Which issue(s) this PR fixes**: <!-- *Automatically closes linked issue when PR is merged. Usage: Fixes #<issue number>, or Fixes (paste link of issue). --> Fixes # **Special notes for your reviewers**: See merge request: Ascend/pytorch!25596 | 10 个月前 | |
[bugfix] Add proper handling for view and factory function for csan, and supplement the corresponding test cases. Co-authored-by: chenkun<chenkun82@huawei.com> # message auto-generated for no-merge-commit merge: !26403 merge cherry-pick-mr-26401-1762829310592-auto into v2.7.1 [bugfix] Add proper handling for view and factory function for csan, and supplement the corresponding test cases. Created-by: kuhn7 Commit-by: chenkun Merged-by: ascend-robot Description: **What type of PR is this?** bug **What does this PR do / why do we need it**: 增加 ArgumentHander.parse_input() 缺失的 is_factory 参数, 并补充了相应的看护用例。 **Which issue(s) this PR fixes**: <!-- *Automatically closes linked issue when PR is merged. Usage: Fixes #<issue number>, or Fixes (paste link of issue). --> Fixes # **Special notes for your reviewers**: 开源社区对应改动如下: https://github.com/pytorch/pytorch/commit/c4ed03cea17d2ec9b09427786627bba479f4cb6b See merge request: Ascend/pytorch!26403 | 9 个月前 | |
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
Update test_torch.py Co-authored-by: yuhaiyan<yuhaiyan8@huawei.com> # message auto-generated for no-merge-commit merge: !27343 merge v2.7.1-dev2 into v2.7.1 Update test_torch.py Created-by: yuhaiyan Commit-by: yuhaiyan Merged-by: ascend-robot Description: <!-- Thanks for sending a pull request! --> **What type of PR is this?** > Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line: > > /kind bug > /kind task > /kind feature **What does this PR do / why do we need it**: **Which issue(s) this PR fixes**: <!-- *Automatically closes linked issue when PR is merged. Usage: Fixes #<issue number>, or Fixes (paste link of issue). --> Fixes # **Special notes for your reviewers**: See merge request: Ascend/pytorch!27343 | 8 个月前 | |
| 1 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
feat: Support independent packaging and deployment of npugraph_ex Co-authored-by: xuzhenhua2025<xuzhenhua4@huawei.com> # message auto-generated for no-merge-commit merge: !31410 merge v2.7.1 into v2.7.1 feat: Support independent packaging and deployment of npugraph_ex Created-by: xuzhenhua2025 Commit-by: xuzhenhua2025 Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 - [x] 需求 - [ ] 问题单 - [ ] issue/工单 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 torch_npu/dynamo 新增npugraph_ex独立包目录,实现npugraph_ex backend功能,不依赖torchair包 npugraph_ex后端注册方法使用 import npugraph_ex, 并支持lazy import # 【资料变更】 不涉及 # 【接口变更】 不涉及 # 【功能验证】 无新增内容,无需新增用例/UT测试用例已适配变更内容看护. # 【CheckList】 - [x] 代码注释完备,正确记录错误日志 - [x] 代码实现进行了返回值、空指针等校验 - [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [x] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/pytorch!31410 | 5 个月前 | |
| 2 年前 | ||
| 2 年前 |
简介
test目录为PTA相关的测试用例。
安装依赖
pip3 install -r requirements.txt
补全脚本
该操作需要联网
cd test
bash get_synchronized_files.sh
通过以上操作,会自动补齐testfiles_synchronized.txt和testfolder_synchronized.txt中的文件或文件夹。
跳过失败用例
export DISABLED_TESTS_FILE=./unsupported_test_cases/.pytorch-disabled-tests.json
如果不是在test目录下运行测试用例,需要传入.pytorch-disabled-tests.json的绝对路径。
执行方式
执行单个测试脚本
运行以test开头的文件。以test_autocast.py为例:
方式一:
python test_autocast.py
方式二:
python run_test.py -i test_autocast
说明:部分以test开头的脚本不是直接运行的脚本,比如jit中的测试脚本是通过test_jit.py执行的。
执行具体的用例
通过-k参数传入具体的用例名。以test_autocast.py为例:
方式一:
python test_autocast.py -v -k test_autocast_nn_fp32
方式二:
python run_test.py -v -i test_autocast -- -k test_autocast_nn_fp32
执行全量UT的方式
# 进入到test目录的上一级
cd ../
运行非分布式全量用例:
python ci/access_control_test.py --all
运行分布式全量用例:
python ci/access_control_test.py --distributed
FAQ
-
报错:"dictionary changed size during interation".
如果python 环境是3.8.1版本,报错在unitest/case.py中,可考虑是sys.modules被修改导致的。第三方包可能会有对sys.modules的修改,比如beartype。 此问题为python 3.8.1版本/3.9.0版本的已知bug,可按照 https://github.com/python/cpython/issues/73806 中修改方式修改,将
for v in sys.modules.values()改为for v in list(sys.modules.values())可用于复现问题的用例:
python test_jit.py -v -k test_annotated_empty_dict -
test_public_bindings.py 用例的功能
该用例是为了校验接口的公开规范性,如果该用例报错,请确认报错的接口是否要公开,并按照报错的提示进行修改。