已合并
refactor: EXEC_OPAPI_CMD 迁移为 CANN_OPS_OPB_SYN_EXEC_ACLNN 并升级 opbase #8648
yuyuanfeng创建于 8月13日
refactor: EXEC_OPAPI_CMD 迁移为 CANN_OPS_OPB_SYN_EXEC_ACLNN 并升级 opbase #8648
已合并
yuyuanfeng创建于 8月13日
yuyuanfeng
yuyuanfeng
8月13日

描述

将 6 个 fallback 算子从旧宏 EXEC_OPAPI_CMD 迁移到 opbase 新宏 CANN_OPS_OPB_SYN_EXEC_ACLNN(显式传入 ctx 首参),并升级 opbase 依赖以引入新宏。

改动原因:

  • opbase 已将 EXEC_OPAPI_CMD 参数化并重命名为 CANN_OPS_OPB_SYN_EXEC_ACLNN(旧宏仅保留一行转发兼容),跟随 opbase 接口演进,显式传入 ctx。

改动方法:

  • 6 个算子的 op_graph fallback 实现统一改为 CANN_OPS_OPB_SYN_EXEC_ACLNN(ctx, ...):foreach_add_list、scatter_list、group_norm_silu、trans_quant_param_v2、quant_batch_matmul_inplace_add、quant_batch_matmul_v3
  • cmake/third_party/opbase.cmake 中 OPBASE_TAG_ID 由 bd20a12e 升级至 40cc7bed

关联的Issue

https://gitcode.com/cann/ops-nn/issues/4782

测试

本地编译 6 个算子验证(ascend910b)

文档更新

无

类型标签

AI/Agent生成声明

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 yuyuanfeng 的贡献)
yuyuanfengyuyuanfeng
8月13日 创建了 pull request,commit 7e0a1e89
atomgit-bot
atomgit-bot
8月13日 评论:

变更摘要

本 PR 主要将 6 个 fallback 算子的 op_graph 实现从旧宏 EXEC_OPAPI_CMD 迁移到 opbase 新宏 CANN_OPS_OPB_SYN_EXEC_ACLNN,新宏要求显式传入 ctx 作为首参;同时升级 opbase 依赖版本以引入该新宏。

主要改动

  • 宏接口迁移: foreach_add_list、scatter_list、group_norm_silu、trans_quant_param_v2、quant_batch_matmul_inplace_add、quant_batch_matmul_v3 六个算子的 fallback 调用统一由 EXEC_OPAPI_CMD(...) 改为 CANN_OPS_OPB_SYN_EXEC_ACLNN(ctx, ...),显式传入 hostApiCtx/host_api_ctx 作为首参。
  • 移除冗余临时变量: 在 foreach_add_list、scatter_list、group_norm_silu 中删除了仅用于转发的 auto host_api_ctx = hostApiCtx; 局部变量,直接使用原上下文变量。
  • 依赖版本升级: cmake/third_party/opbase.cmake 中 OPBASE_TAG_ID 由 bd20a12ebbd210daccd9f936a9ff4fdd62fa9462 升级为 40cc7bedb324a9358aa247a75f5ff898dd46f18c,以引入参数化后的新宏。
  • 多分支调用同步迁移: quant_batch_matmul_v3 中 aclnnQuantMatmulV5 与 aclnnQuantMatmulV4 两个分支的调用均完成迁移,并相应调整了换行格式。
likedislike
不准确?
atomgit-bot
atomgit-bot
8月13日 评论:

代码审查

✅ 未发现问题

likedislike
不准确?
CANN-robotCANN-robot成员
8月13日 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
8月13日 评论:

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


PR Approval Progress

✅ Congratulations! All modules have met the lgtm and approve requirements.

Module Approval Details

module lgtm status approve status
cmake ✅ 杨阳, 汤平川 (2/2) ✅ 杨阳 (1/1)
foreach ✅ 汤平川, 杨阳 (2/2) ✅ 汤平川 (1/1)
index ✅ 汤平川, 杨阳 (2/2) ✅ 汤平川 (1/1)
matmul ✅ 杨阳, 汤平川 (2/2) ✅ 杨阳 (1/1)
norm ✅ 汤平川, 杨阳 (2/2) ✅ 汤平川 (1/1)
quant ✅ 汤平川, 杨阳 (2/2) ✅ 汤平川 (1/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

yuyuanfeng, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
CANN-robotCANN-robot成员
8月13日 将zengjuan,sxb154714,chenfeng61,chaotang233,kevin_huang1234,FelixTang7,crystalhu,yangyang016,fanqirui,renruhai,su-yueming,zhajianqing123,chenqi317,LinPX,wang-xing001,liubo75,tangweiwei2,wangzitao_leo,xubinglin,liujie12345678,pingchuantang,Chen_HaoWen,liuyang_806设为评审人
CANN-robotCANN-robot成员
8月13日 将sxb154714,chenfeng61,chaotang233,kevin_huang1234,FelixTang7,crystalhu,yangyang016,fanqirui,renruhai,su-yueming,zhajianqing123,chenqi317,LinPX,wang-xing001,liubo75,tangweiwei2,wangzitao_leo,xubinglin,liujie12345678,pingchuantang,Chen_HaoWen,liuyang_806设为审查人
yuyuanfeng
yuyuanfeng
8月13日 评论:

compile

likedislike
yuyuanfengyuyuanfeng
8月13日 预合并成功(commit_id: fef4acde914db6aa7b6ac44cdc6d564f75f741ec)
CANN-robotCANN-robot成员
8月13日 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
8月13日 评论:

流水线任务触发成功
任务链接 [fe292e007f6f43939e79cf2677b92511][流水线指导]

任务名称状态日志下载链接
Compile_Ascend_X86_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_experimental ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_950 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_950 ✅ SUCCESS >>>>> >>>>>
Compile_Pre ✅ SUCCESS >>>>>
pre_comment ✅ SUCCESS >>>>>
Compile_Ascend_X86 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_950_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_experimental_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_950_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_910b ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_910c ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_950 ✅ SUCCESS >>>>> >>>>>
Compile_classify ✅ SUCCESS >>>>>
Compile_Ascend_X86_mobile_station_9030_ubuntu24 ✅ SUCCESS >>>>> >>>>>

[2026-08-13 17:09:55]    CI执行结束

likedislike
CANN-robot
CANN-robot成员
8月13日 评论:

流水线任务触发成功
任务链接 [05a7c3581053423a81a05266bf47cd1f][流水线指导]

任务名称状态日志下载链接
antipoison ✅ SUCCESS >>>>>
codecheck_checkpr ✅ SUCCESS
StaticCheck_codespell ✅ SUCCESS
StaticCheck_link_validity ✅ SUCCESS
StaticCheck_resource_existence ✅ SUCCESS
StaticCheck_tag_closed ✅ SUCCESS
StaticCheck_markdownlint ✅ SUCCESS
codecheck_precommit ❌ FAILED >>>>> >>>>>
SCA ✅ SUCCESS >>>>>
likedislike
yuyuanfengyuyuanfeng
8月13日 预合并成功(commit_id: 8f4b7aa3abfa0d26b053796af604ec8940736fbc)
yuyuanfengyuyuanfeng
8月13日 强制推送  1 个提交:a0188e24-refactor: EXEC_OPAPI_CMD 迁移为 CANN_OPS_OPB_SYN_EXEC_ACLNN 并升级 opbase
yuyuanfengyuyuanfeng
8月13日 预合并成功(commit_id: 9feff0eaa9fad28e96393e92da838e354c7bba46)
CANN-robotCANN-robot成员
8月13日 删除了label:cann-cla/yes
CANN-robotCANN-robot成员
8月13日 添加了label:cann-cla/yes
yuyuanfeng
yuyuanfeng
8月13日 评论:

compile

likedislike
yuyuanfengyuyuanfeng
8月13日 预合并成功(commit_id: 9b2070c772c2f56e996acef512d71e78381a6657)
CANN-robotCANN-robot成员
8月13日 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
8月13日 添加了label:ci-pipeline-failed
CANN-robotCANN-robot成员
8月13日 删除了label:ci-pipeline-failed
CANN-robotCANN-robot成员
8月13日 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
8月13日 评论:

流水线任务触发成功
任务链接 [398f09406f4a4ea1912d634297c18b3b][流水线指导]

任务名称状态日志下载链接
Compile_Ascend_X86_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_single ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_experimental ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_950 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_950 ✅ SUCCESS >>>>> >>>>>
Compile_Pre ✅ SUCCESS >>>>>
pre_comment ✅ SUCCESS >>>>>
Compile_Ascend_X86 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_950_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_single_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_experimental_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_950_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_910b ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_910c ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_950 ✅ SUCCESS >>>>> >>>>>
Compile_classify ✅ SUCCESS >>>>>
Compile_Ascend_X86_mobile_station_9030_ubuntu24 ✅ SUCCESS >>>>> >>>>>
UT_Test_ophost ✅ SUCCESS
UT_Test_opapi ✅ SUCCESS
UT_Test_kernel ✅ SUCCESS
UT_Test_opgraph ✅ SUCCESS
PreSmoke_A900 ✅ SUCCESS >>>>>
API_Check ✅ SUCCESS >>>>>
PreSmoke_ATK_Test_A2 ✅ SUCCESS >>>>>
UT_Test_report_lcov ⚠️ WARNING >>>>>

[2026-08-13 17:33:37]    CI执行结束

likedislike
CANN-robot
CANN-robot成员
8月13日 评论:

流水线任务触发成功
任务链接 [4b13ce4fb11a4ebb8e0818b3f7e82c37][流水线指导]

任务名称状态日志下载链接
antipoison ✅ SUCCESS >>>>>
codecheck_checkpr ✅ SUCCESS
StaticCheck_codespell ✅ SUCCESS
StaticCheck_link_validity ✅ SUCCESS
StaticCheck_resource_existence ✅ SUCCESS
StaticCheck_tag_closed ✅ SUCCESS
StaticCheck_markdownlint ✅ SUCCESS
codecheck_precommit ✅ SUCCESS >>>>>
SCA ✅ SUCCESS >>>>>

[2026-08-13 17:12:09]    CI执行结束

likedislike
CANN-robotCANN-robot成员
8月13日 添加了label:api-check-pass
CANN-robotCANN-robot成员
8月13日 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
8月13日 添加了label:ci-pipeline-passed
yuyuanfengyuyuanfeng
8月14日 修改了pull request 的描述
yangyang016成员
8月14日 评论:

/lgtm
/approve

likedislike
TangPC
TangPC成员
8月14日 评论:

/lgtm
/approve

likedislike
CANN-robotCANN-robot成员
8月14日 添加了label:lgtmapproved
CANN-robotCANN-robot成员
8月14日 关闭了关联的issue
CANN-robotCANN-robot成员
8月14日 合入了pull request