| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
add torchnpugen package Co-authored-by: liangsongwei<liangsongwei@huawei.com> # message auto-generated for no-merge-commit merge: !4109 merge master_compile into master add torchnpugen package Created-by: liangsongwei Commit-by: liangsongwei 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**: 修改codegen目录包为torchnpugen,确保编译执行OK **Special notes for your reviewers**:  See merge request: Ascend/op-plugin!4109 | 6 个月前 | |
support structured meta Co-authored-by: maoyuanpeng<maoyuanpeng@huawei.com> # message auto-generated for no-merge-commit merge: !5048 merge br_structured_ops into master support structured meta Created-by: maoyuanpeng1 Commit-by: maoyuanpeng Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 https://gitcode.com/Ascend/pytorch/issues/2110 - [x] 需求 - [ ] 问题单 - [ ] issue/工单 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 op-plugin仓适配 支持meta信息复用。 1.添加对structured算子的校验。 structured 与gen_opapi里面的infer逻辑和structured_inherit不兼容,会检验报错。 structured_delegate 与 gen_opapi 标签不兼容,会检验报错。 2.修改对structured算子的代码生成 当算子为structured_delegate时,不需要生成OpInterface、OpApiInterface、AclOpsInterface接口。 3.将_linalg_svd算子和_log_softmax_backward_data改造成structured算子,并编写用例测试之前社区用例未通过的情形。 # 【资料变更】 无 # 【接口变更】 无 # 【功能验证】 test_linalg_svd_out:测试torch.svd out版本的接口。当输入的out(U, S, Vh)为非预期的shape,测试是否会被resize成正确size且与cpu结果相同。 test_softmax_backward_data_half_to_float_result_dtype:测试torch.\_softmax_backward_data接口。当 torch.\_softmax_backward_data 接口中的input_dtype 被设置为 float16,测试其输出类型是否为float16。 # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [x] 代码注释完备,正确记录错误日志 - [x] 代码实现进行了返回值、空指针等校验 - [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [ ] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/op-plugin!5048 | 2 个月前 | |
Generate ATB public C++ interface wrappers from dispatcher schema registrations. Co-authored-by: wang_ziqi<wangziqi4@huawei.com> # message auto-generated for no-merge-commit merge: !4825 merge atb-cpp-api-interface into master Generate ATB public C++ interface wrappers from dispatcher schema registrations. Created-by: wang-ziqi-code Commit-by: wang_ziqi Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:2026-04-25 --> # 【合入来源】> <font color="red">**如有社区 issue,请关联 issue 链接**</font>\ > <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部 issue 等)**</font> - [ ] 需求 - [ ] 问题单 - [x] issue/工单 https://gitcode.com/Ascend/op-plugin/issues/69 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 本次补充 ATB C++ 公共接口暴露机制,并同步收敛配置和生成器口径。 当前 ATB 算子原本主要通过 TORCH_LIBRARY_FRAGMENT(atb, m) / m.impl(...) 注册到 dispatcher,再由 Python 侧通过 torch.ops.atb 使用;本次在此基础上新增 at_npu::native::atb 命名空间下的 C++ public interface,用于 torch_npu 同构环境中的 C++ 调用方直接访问。 整体链路如下: text ::atb::implementation -> TORCH_LIBRARY_FRAGMENT(atb, m).def(...) / m.impl(...) -> torch.ops.atb (Python dispatcher entry) #python层接口 -> atb_ops.yaml + gen_atb_ops.py -> at_npu::native::atb::* (public C++ interface) #cpp层接口 具体修改如下: 1. **新增并收敛 ATB C++ 接口生成器 torchnpugen/gen_atb_ops.py** - 以 ::atb::* 实现函数签名作为 public C++ interface 的真值来源; - 以 m.def(...) / m.impl(...) 作为注册约束校验; - 读取 op_plugin/config/atb_ops.yaml 中的 cpp_name -> impl_name 映射,生成: - op_plugin/include/AtbOpsInterface.h - op_plugin/ops/atb/AtbOpsInterface.cpp - 生成器会校验: - 对应 ::atb::* 实现签名可从 op_plugin/ops/atb/*.cpp 中唯一解析。 2. **新增配置文件 op_plugin/config/atb_ops.yaml** - 维护 public C++ interface 与 ::atb::* 实现之间的映射; - 当前共覆盖 34 个 ATB 接口; - 配置写法为: yaml - cpp_name: "at_npu::native::atb::_npu_reshape_and_cache" impl_name: "atb::_npu_reshape_and_cache" - 生成器内部会解析并校验 cpp_name: - 必须以 at_npu::native::atb:: 开头; - 必须能提取出合法的末尾函数名; 3. **新增模板文件 torchnpugen/templates/AtbOpsInterface.h 和 AtbOpsInterface.cpp** - 通过 string.Template 渲染 public declaration、forward declaration 和 wrapper definition; - 生成的 wrapper 统一位于 namespace at_npu::native::atb 下; - wrapper 最终按参数原样转发到对应 ::atb::* 实现。 4. **新增统一 include 入口 op_plugin/include/atb_ops.h** - 作为 C++ 使用方的统一头文件入口; - 当前仅包含 AtbOpsInterface.h。 5. **集成到代码生成流程** - 在现有代码生成链路中加入 gen_atb_ops.py; - 保证构建过程中自动生成最新接口文件。 ### 生成产物示例 以 _npu_group_topk 为例,生成结果如下: **AtbOpsInterface.h** cpp namespace at_npu { namespace native { namespace atb { TORCH_NPU_API void _npu_group_topk(const at::Tensor &self, int64_t k, int64_t group_num, int64_t n); } // namespace atb } // namespace native } // namespace at_npu **AtbOpsInterface.cpp** cpp namespace atb { void _npu_group_topk(const at::Tensor &self, int64_t k, int64_t group_num, int64_t n); } // namespace atb namespace at_npu { namespace native { namespace atb { void _npu_group_topk(const at::Tensor &self, int64_t k, int64_t group_num, int64_t n) { ::atb::_npu_group_topk(self, k, group_num, n); } } // namespace atb } // namespace native } // namespace at_npu # 【资料变更】 不涉及 # 【接口变更】 涉及 C++ public interface 新增。 新增 AtbOpsInterface.h,在 at_npu::native::atb 命名空间下暴露 34 个 ATB public C++ API;接口签名与对应 ::atb::* 实现保持一致。C++ 调用方通过: cpp #include "atb_ops.h" 即可访问对应接口,链接目标为 libop_plugin_atb.so。 - 在 torch_npu 同构运行环境中,at_npu::native::atb::* 作为额外 C++ ABI 可用; - 接口签名与 ::atb::* 实现保持一致; - public 符号边界位于 libop_plugin_atb.so。 # 【功能验证】 1. **生成回归** - 执行 python -m torchnpugen.gen_atb_ops --config op_plugin/config/atb_ops.yaml --header op_plugin/include/AtbOpsInterface.h --source op_plugin/ops/atb/AtbOpsInterface.cpp --atb-src-dir op_plugin/ops/atb - 连续执行两次,确认生成结果稳定、无无关 diff。 2. **源码契约检查** - 执行 python test/check_atb_cpp_api_contract.py --check-source - 校验: - cpp_name -> impl_name -> m.impl -> m.def 映射成立; - wrapper 声明与 ::atb::* 实现签名一致; - wrapper 参数透传顺序一致。 3. **配置校验** - atb_ops.yaml 中 cpp_name 采用全限定写法; - 非法 cpp_name(缺前缀、缺函数名)会在生成器配置解析阶段直接报错。 4. **编译链接验证** - op-plugin 全量编译通过; - at_npu::native::atb::* public 符号由 libop_plugin_atb.so 承载。 # 【CheckList】 > PR 提交人对以下 CheckList 自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [x] 代码注释完备,正确记录错误日志 - [x] 代码实现进行了返回值、空指针等校验 - [x] PR 标题正确使用类型标签,如:feat、fix、refactor、docs、test 等 - [x] PR 持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/op-plugin!4825 | 2 个月前 | |
add torchnpugen package Co-authored-by: liangsongwei<liangsongwei@huawei.com> # message auto-generated for no-merge-commit merge: !4109 merge master_compile into master add torchnpugen package Created-by: liangsongwei Commit-by: liangsongwei 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**: 修改codegen目录包为torchnpugen,确保编译执行OK **Special notes for your reviewers**:  See merge request: Ascend/op-plugin!4109 | 6 个月前 | |
add torchnpugen package Co-authored-by: liangsongwei<liangsongwei@huawei.com> # message auto-generated for no-merge-commit merge: !4109 merge master_compile into master add torchnpugen package Created-by: liangsongwei Commit-by: liangsongwei 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**: 修改codegen目录包为torchnpugen,确保编译执行OK **Special notes for your reviewers**:  See merge request: Ascend/op-plugin!4109 | 6 个月前 | |
add torchnpugen package Co-authored-by: liangsongwei<liangsongwei@huawei.com> # message auto-generated for no-merge-commit merge: !4109 merge master_compile into master add torchnpugen package Created-by: liangsongwei Commit-by: liangsongwei 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**: 修改codegen目录包为torchnpugen,确保编译执行OK **Special notes for your reviewers**:  See merge request: Ascend/op-plugin!4109 | 6 个月前 | |
Fix memory exceptions in BEVFusion Co-authored-by: zzhongmin<zhongmin23@huawei.com> # message auto-generated for no-merge-commit merge: !5379 merge 26.1.0_fixcat into 26.1.0 Fix memory exceptions in BEVFusion Created-by: zzhongmin Commit-by: zzhongmin Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > <font color="red">**如有社区issue,请关联issue链接**</font>\ > <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font> - [ ] 需求 - [x] 问题单https://gitcode.com/Ascend/pytorch/issues/2597 - [ ] issue/工单 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 回退https://gitcode.com/Ascend/op-plugin/pull/5048对cat的改动 1. 恢复 cat 非出参版本的内核实现 - op_plugin/ops/aclops/CatKernelNpu.cpp:恢复 acl_op::cat(const at::ITensorListRef&, int64_t); - op_plugin/ops/opapi/CatKernelNpuOpApi.cpp:恢复 op_api::cat(const at::ITensorListRef&, int64_t)。 2. 恢复 cat 的接口声明生成 修改 torchnpugen/gen.py 的 should_generate_op_interface,对 base name 为 cat 的算子放行(返回 True),使其照常生成 OpInterface/OpApiInterface/AclOpsInterface 声明,与 gen_backend_stubs.py (torch_npu)中对 cat 的特判保持一致: # 【资料变更】 不涉及 # 【接口变更】 不涉及 # 【功能验证】 BEVFusion网络显存正常 # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [x] 代码注释完备,正确记录错误日志 - [x] 代码实现进行了返回值、空指针等校验 - [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [x] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/op-plugin!5379 | 1 个月前 | |
Generate ATB public C++ interface wrappers from dispatcher schema registrations. Co-authored-by: wang_ziqi<wangziqi4@huawei.com> # message auto-generated for no-merge-commit merge: !4825 merge atb-cpp-api-interface into master Generate ATB public C++ interface wrappers from dispatcher schema registrations. Created-by: wang-ziqi-code Commit-by: wang_ziqi Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:2026-04-25 --> # 【合入来源】> <font color="red">**如有社区 issue,请关联 issue 链接**</font>\ > <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部 issue 等)**</font> - [ ] 需求 - [ ] 问题单 - [x] issue/工单 https://gitcode.com/Ascend/op-plugin/issues/69 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 本次补充 ATB C++ 公共接口暴露机制,并同步收敛配置和生成器口径。 当前 ATB 算子原本主要通过 TORCH_LIBRARY_FRAGMENT(atb, m) / m.impl(...) 注册到 dispatcher,再由 Python 侧通过 torch.ops.atb 使用;本次在此基础上新增 at_npu::native::atb 命名空间下的 C++ public interface,用于 torch_npu 同构环境中的 C++ 调用方直接访问。 整体链路如下: text ::atb::implementation -> TORCH_LIBRARY_FRAGMENT(atb, m).def(...) / m.impl(...) -> torch.ops.atb (Python dispatcher entry) #python层接口 -> atb_ops.yaml + gen_atb_ops.py -> at_npu::native::atb::* (public C++ interface) #cpp层接口 具体修改如下: 1. **新增并收敛 ATB C++ 接口生成器 torchnpugen/gen_atb_ops.py** - 以 ::atb::* 实现函数签名作为 public C++ interface 的真值来源; - 以 m.def(...) / m.impl(...) 作为注册约束校验; - 读取 op_plugin/config/atb_ops.yaml 中的 cpp_name -> impl_name 映射,生成: - op_plugin/include/AtbOpsInterface.h - op_plugin/ops/atb/AtbOpsInterface.cpp - 生成器会校验: - 对应 ::atb::* 实现签名可从 op_plugin/ops/atb/*.cpp 中唯一解析。 2. **新增配置文件 op_plugin/config/atb_ops.yaml** - 维护 public C++ interface 与 ::atb::* 实现之间的映射; - 当前共覆盖 34 个 ATB 接口; - 配置写法为: yaml - cpp_name: "at_npu::native::atb::_npu_reshape_and_cache" impl_name: "atb::_npu_reshape_and_cache" - 生成器内部会解析并校验 cpp_name: - 必须以 at_npu::native::atb:: 开头; - 必须能提取出合法的末尾函数名; 3. **新增模板文件 torchnpugen/templates/AtbOpsInterface.h 和 AtbOpsInterface.cpp** - 通过 string.Template 渲染 public declaration、forward declaration 和 wrapper definition; - 生成的 wrapper 统一位于 namespace at_npu::native::atb 下; - wrapper 最终按参数原样转发到对应 ::atb::* 实现。 4. **新增统一 include 入口 op_plugin/include/atb_ops.h** - 作为 C++ 使用方的统一头文件入口; - 当前仅包含 AtbOpsInterface.h。 5. **集成到代码生成流程** - 在现有代码生成链路中加入 gen_atb_ops.py; - 保证构建过程中自动生成最新接口文件。 ### 生成产物示例 以 _npu_group_topk 为例,生成结果如下: **AtbOpsInterface.h** cpp namespace at_npu { namespace native { namespace atb { TORCH_NPU_API void _npu_group_topk(const at::Tensor &self, int64_t k, int64_t group_num, int64_t n); } // namespace atb } // namespace native } // namespace at_npu **AtbOpsInterface.cpp** cpp namespace atb { void _npu_group_topk(const at::Tensor &self, int64_t k, int64_t group_num, int64_t n); } // namespace atb namespace at_npu { namespace native { namespace atb { void _npu_group_topk(const at::Tensor &self, int64_t k, int64_t group_num, int64_t n) { ::atb::_npu_group_topk(self, k, group_num, n); } } // namespace atb } // namespace native } // namespace at_npu # 【资料变更】 不涉及 # 【接口变更】 涉及 C++ public interface 新增。 新增 AtbOpsInterface.h,在 at_npu::native::atb 命名空间下暴露 34 个 ATB public C++ API;接口签名与对应 ::atb::* 实现保持一致。C++ 调用方通过: cpp #include "atb_ops.h" 即可访问对应接口,链接目标为 libop_plugin_atb.so。 - 在 torch_npu 同构运行环境中,at_npu::native::atb::* 作为额外 C++ ABI 可用; - 接口签名与 ::atb::* 实现保持一致; - public 符号边界位于 libop_plugin_atb.so。 # 【功能验证】 1. **生成回归** - 执行 python -m torchnpugen.gen_atb_ops --config op_plugin/config/atb_ops.yaml --header op_plugin/include/AtbOpsInterface.h --source op_plugin/ops/atb/AtbOpsInterface.cpp --atb-src-dir op_plugin/ops/atb - 连续执行两次,确认生成结果稳定、无无关 diff。 2. **源码契约检查** - 执行 python test/check_atb_cpp_api_contract.py --check-source - 校验: - cpp_name -> impl_name -> m.impl -> m.def 映射成立; - wrapper 声明与 ::atb::* 实现签名一致; - wrapper 参数透传顺序一致。 3. **配置校验** - atb_ops.yaml 中 cpp_name 采用全限定写法; - 非法 cpp_name(缺前缀、缺函数名)会在生成器配置解析阶段直接报错。 4. **编译链接验证** - op-plugin 全量编译通过; - at_npu::native::atb::* public 符号由 libop_plugin_atb.so 承载。 # 【CheckList】 > PR 提交人对以下 CheckList 自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [x] 代码注释完备,正确记录错误日志 - [x] 代码实现进行了返回值、空指针等校验 - [x] PR 标题正确使用类型标签,如:feat、fix、refactor、docs、test 等 - [x] PR 持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/op-plugin!4825 | 2 个月前 | |
security check Co-authored-by: DaiFu<daifu2@huawei.com> # message auto-generated for no-merge-commit merge: !4644 merge 2604security into master security check Created-by: daifu1234567 Commit-by: DaiFu 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. gencode.sh中新增PYTORCH_VERSION校验,只能包含数字字母-. 2. torchnpugen/gen.py、torchnpugen/gen_derivatives.py、torchnpugen/gen_op_plugin_functions.py中在打开文件之前先校验islink 3. torchnpugen/gen_op_plugin_functions.py中del前先检查是否存在kry # 【资料变更】 > 请确认是否涉及资料变更。如涉及,需要在PR中体现,并简要说明修改内容。如不涉及,需填写“不涉及” 不涉及 # 【接口变更】 > 请确认是否涉及跨代码仓或者客户面可见的接口变更。如涉及,需要详细说明接口以及对应的变更内容,同时需要在资料中体现。如不涉及,需填写“不涉及” 不涉及 # 【功能验证】 > 说明测试场景,测试方法。如果本次测试方式与常规单元测试不同,请详细说明您的测试步骤\ > 新增/变更内容是否已新增/适配UT测试用例看护,并补充测试自验证截图 安全问题,不涉及 # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [x] 代码注释完备,正确记录错误日志 - [x] 代码实现进行了返回值、空指针等校验 - [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [x] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/op-plugin!4644 | 4 个月前 | |
【feature】add eager DVM lazy fusion support for PTA Eager mode Co-authored-by: hb_hubin<hubin79@huawei.com> # message auto-generated for no-merge-commit merge: !4956 merge pta-dvm-master into master 【feature】add eager DVM lazy fusion support for PTA Eager mode Created-by: hbhu_bin Commit-by: hb_hubin Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > <font color="red">**如有社区issue,请关联issue链接**</font>\ > <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font> - [x] 需求 - [ ] 问题单 - [ ] issue/工单 - [ ] 重构优化 - [ ] 资料更新 https://gitcode.com/Ascend/pytorch/issues/1732 # 【修改方案】 PTA使能eager模式dvm无图融合算子,**开启 TORCH_NPU_LAZY_FUSION=True进行使能**;**不开启时,对原有eager流程无影响** 架构设计 ┌────────────────────────────────────────────────────────────┐ │ PyTorch Eager │ │ torch.add(x, y) / x.silu_() / ... │ └──────────────────────────┬─────────────────────────────────┘ │ aten 调用 ┌──────────────────────────▼─────────────────────────────────┐ │ torch_npu 派发层(codegen 生成) │ │ if (lazy_fusion::IsEnabled("op")) → lazy_fusion::op() │ │ else → op_api::op() / acl_op::op() │ └──────────────────────────┬─────────────────────────────────┘ │ ┌──────────────────┼──────────────────┐ │ │ │ ┌───────▼──────┐ ┌────────▼─────────┐ ┌──────▼─────────┐ │ acl_op:: │ │ op_api:: │ │ lazy_fusion:: │ │ (acl 算子) │ │ (aclnn 算子) │ │ (DVM 融合) │ └──────────────┘ └──────────────────┘ └──────┬─────────┘ │ ┌─────────────▼──────────────┐ │ LazyFusionKernel │ │ - 累积算子到 DVM 图 │ │ - 跨边界自动 Flush │ │ - 调用 dvm::Kernel CodeGen│ └─────────────┬──────────────┘ │ ┌─────────────▼──────────────┐ │ libdvm.a (三方库) │ │ - IR 优化 / 算子融合 │ │ - AiCore kernel 代码生成 │ │ - workspace 管理 │ └────────────────────────────┘ # 【资料变更】 > 请确认是否涉及资料变更。如涉及,需要在PR中体现,并简要说明修改内容。如不涉及,需填写“不涉及” op-plugin PR不涉及 # 【接口变更】 > 请确认是否涉及跨代码仓或者客户面可见的接口变更。如涉及,需要详细说明接口以及对应的变更内容,同时需要在资料中体现。如不涉及,需填写“不涉及” 不涉及 # 【功能验证】 > 说明测试场景,测试方法。如果本次测试方式与常规单元测试不同,请详细说明您的测试步骤\ > 新增/变更内容是否已新增/适配UT测试用例看护,并补充测试自验证截图 torch_npu的修改泛化验证97个UT(PR会进行精简),每个UT开启DVM+关闭DVM跑俩遍,比较二者的精度。用例包括:所有涉及单算子用例(多shape+多dtype)、与其他特性协同(aclgraph)、组合算子测试、view场景等 新增UT已全量pass  精简用例之后(24个),全部通过  # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [x] 代码注释完备,正确记录错误日志 - [x] 代码实现进行了返回值、空指针等校验 - [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [x] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/op-plugin!4956 | 2 个月前 | |
【feature】add eager DVM lazy fusion support for PTA Eager mode Co-authored-by: hb_hubin<hubin79@huawei.com> # message auto-generated for no-merge-commit merge: !4956 merge pta-dvm-master into master 【feature】add eager DVM lazy fusion support for PTA Eager mode Created-by: hbhu_bin Commit-by: hb_hubin Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > <font color="red">**如有社区issue,请关联issue链接**</font>\ > <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font> - [x] 需求 - [ ] 问题单 - [ ] issue/工单 - [ ] 重构优化 - [ ] 资料更新 https://gitcode.com/Ascend/pytorch/issues/1732 # 【修改方案】 PTA使能eager模式dvm无图融合算子,**开启 TORCH_NPU_LAZY_FUSION=True进行使能**;**不开启时,对原有eager流程无影响** 架构设计 ┌────────────────────────────────────────────────────────────┐ │ PyTorch Eager │ │ torch.add(x, y) / x.silu_() / ... │ └──────────────────────────┬─────────────────────────────────┘ │ aten 调用 ┌──────────────────────────▼─────────────────────────────────┐ │ torch_npu 派发层(codegen 生成) │ │ if (lazy_fusion::IsEnabled("op")) → lazy_fusion::op() │ │ else → op_api::op() / acl_op::op() │ └──────────────────────────┬─────────────────────────────────┘ │ ┌──────────────────┼──────────────────┐ │ │ │ ┌───────▼──────┐ ┌────────▼─────────┐ ┌──────▼─────────┐ │ acl_op:: │ │ op_api:: │ │ lazy_fusion:: │ │ (acl 算子) │ │ (aclnn 算子) │ │ (DVM 融合) │ └──────────────┘ └──────────────────┘ └──────┬─────────┘ │ ┌─────────────▼──────────────┐ │ LazyFusionKernel │ │ - 累积算子到 DVM 图 │ │ - 跨边界自动 Flush │ │ - 调用 dvm::Kernel CodeGen│ └─────────────┬──────────────┘ │ ┌─────────────▼──────────────┐ │ libdvm.a (三方库) │ │ - IR 优化 / 算子融合 │ │ - AiCore kernel 代码生成 │ │ - workspace 管理 │ └────────────────────────────┘ # 【资料变更】 > 请确认是否涉及资料变更。如涉及,需要在PR中体现,并简要说明修改内容。如不涉及,需填写“不涉及” op-plugin PR不涉及 # 【接口变更】 > 请确认是否涉及跨代码仓或者客户面可见的接口变更。如涉及,需要详细说明接口以及对应的变更内容,同时需要在资料中体现。如不涉及,需填写“不涉及” 不涉及 # 【功能验证】 > 说明测试场景,测试方法。如果本次测试方式与常规单元测试不同,请详细说明您的测试步骤\ > 新增/变更内容是否已新增/适配UT测试用例看护,并补充测试自验证截图 torch_npu的修改泛化验证97个UT(PR会进行精简),每个UT开启DVM+关闭DVM跑俩遍,比较二者的精度。用例包括:所有涉及单算子用例(多shape+多dtype)、与其他特性协同(aclgraph)、组合算子测试、view场景等 新增UT已全量pass  精简用例之后(24个),全部通过  # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [x] 代码注释完备,正确记录错误日志 - [x] 代码实现进行了返回值、空指针等校验 - [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [x] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/op-plugin!4956 | 2 个月前 | |
add torchnpugen package Co-authored-by: liangsongwei<liangsongwei@huawei.com> # message auto-generated for no-merge-commit merge: !4109 merge master_compile into master add torchnpugen package Created-by: liangsongwei Commit-by: liangsongwei 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**: 修改codegen目录包为torchnpugen,确保编译执行OK **Special notes for your reviewers**:  See merge request: Ascend/op-plugin!4109 | 6 个月前 | |
add torchnpugen package Co-authored-by: liangsongwei<liangsongwei@huawei.com> # message auto-generated for no-merge-commit merge: !4109 merge master_compile into master add torchnpugen package Created-by: liangsongwei Commit-by: liangsongwei 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**: 修改codegen目录包为torchnpugen,确保编译执行OK **Special notes for your reviewers**:  See merge request: Ascend/op-plugin!4109 | 6 个月前 | |
[fix] add wanings package Co-authored-by: liangsongwei<liangsongwei@huawei.com> # message auto-generated for no-merge-commit merge: !4633 merge master into master [fix] add wanings package Created-by: liangsongwei Commit-by: liangsongwei Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > <font color="red">**如有社区issue,请关联issue链接**</font>\ > <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font> - [ ] 需求 - [ ] 问题单 - [x] issue/工单 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 代码生成工具模块增加对warnings标准库的导入支持。此修改旨在为后续代码中引入警告功能(例如在路径权限检查等场景下向用户发出提示)做好前置准备,从而提升代码的可维护性和用户体验。 # 【资料变更】 不涉及 # 【接口变更】 不涉及 # 【功能验证】 CI门禁pass  # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [ ] 代码注释完备,正确记录错误日志 - [ ] 代码实现进行了返回值、空指针等校验 - [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [x] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/op-plugin!4633 | 4 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 6 个月前 | ||
| 2 个月前 | ||
| 2 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 1 个月前 | ||
| 2 个月前 | ||
| 4 个月前 | ||
| 2 个月前 | ||
| 2 个月前 | ||
| 6 个月前 | ||
| 6 个月前 | ||
| 4 个月前 |