Pull Request has been successfully merged by CANN-robot.
(Thank you for 陈展熹's contribution.)变更摘要
本次变更聚焦于 optim/apply_adam_v2 算子的 ACLNN 接口生成配置:将 CMakeLists.txt 中的算子类型由 aclnn_exclude 调整为 aclnn,使 ApplyAdamV2 参与自动生成的 ACLNN 接口构建,供 TorchNPU 在 Ascend950 上通过 op_api 调用。
主要改动
- 启用 ACLNN 接口生成:
optim/apply_adam_v2/CMakeLists.txt中的ACLNNTYPE配置由aclnn_exclude改为aclnn,使ApplyAdamV2从“排除生成”变为“参与生成”。 - 对外导出接口:该配置下生成并导出
aclnnApplyAdamV2GetWorkspaceSize与aclnnApplyAdamV2两个 ACLNN 接口,供上层 op_api 调用。 - 接口形态与算子 IR 对齐:生成接口保持与算子 IR 一致的 ABI,即 12 个 Tensor 输入(前 3 个为原地更新的
var/m/v)、adamMode属性以及 workspace/executor 参数。
🧩 本次 Review 已使用自定义 Skill:




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.
You can self-configure the PR merge rules for this repository. For more details, please refer to Here.
For more, you also can visit HICANN.
PR Approval Progress
✅ Congratulations! All modules have met the lgtm and approve requirements.
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| optim | ✅ 汤平川, 上官秦南 (2/2) | ✅ 汤平川 (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
yourealize, thanks for your pull request. All authors of the commits have signed the CLA. 👍


compile


| 🚀 CI 流水线已启动 |
|---|
| 📋 执行详情: 点击查看流水线 |


您好,pr合入已准备就绪,请尽快联系committer进行检视,谢谢!
@yangyang016 @yu-xinjie62 @wang-xing001 @u010470851 @east_yang @qianzehong @chenfeng61


您好,pr合入已准备就绪,请尽快联系committer进行检视,谢谢!
@yangyang016 @yu-xinjie62 @wang-xing001 @u010470851 @east_yang @qianzehong @chenfeng61


/lgtm


请关联issue


/lgtm
/approve


描述
为 ApplyAdamV2 启用自动生成的 ACLNN 接口,供 TorchNPU 在 Ascend950 上通过 op_api 调用。
将
optim/apply_adam_v2/CMakeLists.txt中的ACLNNTYPE aclnn_exclude改为ACLNNTYPE aclnn。生成接口为:aclnnApplyAdamV2GetWorkspaceSizeaclnnApplyAdamV2配套 op-plugin PR:https://gitcode.com/Ascend/op-plugin/pull/6194 。建议先提供本 PR 生成的 ACLNN 接口,再启用配套 TorchNPU 的 950 通路。
关联的Issue
#7494。
测试
opapi_nn构建成功,确认导出上述两个符号。Ran 5 tests / OK,0 失败、0 错误、0 跳过。npu_bert_apply_adam_out→aclnnApplyAdamV2 EXEC_NPU_CMD,覆盖 FP16/FP32、默认参数、Adam/mBART 以及原地更新。git diff --check通过。文档更新
不涉及。
类型标签
AI/Agent生成声明