已合并
feat: 构建系统新增 *_fallback.cpp 编译支持,并更新 opbase 版本依赖 #3394
tianqiguang创建于 6月17日
feat: 构建系统新增 *_fallback.cpp 编译支持,并更新 opbase 版本依赖 #3394
已合并
tianqiguang创建于 6月17日
tianqiguang成员
6月17日

描述

构建系统新增算子 Fallback 实现文件(*_fallback.cpp)的自动编译支持,并更新 opbase 依赖版本以引入 op_fallback.h 接口。

改动原因

算子 Fallback 实现文件(如 foreach_add_list_fallback.cpp)需要被编译系统自动收录,此前 file(GLOB ...) 仅匹配 *_graph_*.cpp 模式,无法自动编译 fallback 文件。同时 opbase 需更新至包含 fallback 接口的版本。

改动方法

  • cmake/func.cmake:在 add_all_modules_sources()add_graph_plugin_sources() 两个宏的 file(GLOB OP_GRAPH_SRCS ...) 中新增 *_fallback.cpp 匹配模式
  • cmake/third_party/opbase.cmake:更新 OPBASE_TAG_ID 至包含 include/op_common/op_graph/op_fallback.hop_fallback_internal.h 的 opbase 版本

关联的Issue

  • #1998

测试

本地编译通过,确认 *_fallback.cpp 文件可被正确编译链接。

文档更新

类型标签

Related Roadmap: https://gitcode.com/cann/ops-math/issues/1253

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 tianqiguang 的贡献)
Ttianqiguang成员
6月17日 创建了 pull request,commit 752c7c04
CANN-robotCANN-robot成员
6月17日 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
6月17日 评论:

CLA Signature Pass

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

likedislike
CANN-robot
CANN-robot成员
6月17日 评论:

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
repo-cann/ops-math 宋凯, 张磊 (2/2) 宋凯, 张磊 (2/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)
likedislike
tianqiguang成员
6月17日 评论:

compile

likedislike
Ttianqiguang成员
6月17日 update merge request[project id: 7649531, iid: 3394, commit_id: 08cb5551c9891d99f852d6a5ae43db026ab97fb9] virtual merging success
CANN-robotCANN-robot成员
6月17日 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
6月17日 评论:

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

任务名称状态日志下载链接
Compile_Ascend_X86 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_experimental ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_experimental ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_single ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_A5 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_A5 ✅ SUCCESS >>>>> >>>>>
pre_comment ✅ SUCCESS >>>>>
Compile_Ascend_X86_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_experimental_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_A5_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_harmony-infer ✅ SUCCESS >>>>>
Compile_Ascend_ARM_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_experimental_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_single_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_A5_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_910b ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_910c ✅ SUCCESS >>>>> >>>>>
Compile_X86_monitor_950 ✅ SUCCESS >>>>> >>>>>
UT_Test ✅ SUCCESS
UT_Test_experimental ✅ SUCCESS
UT_Test_kernel ✅ SUCCESS
PreSmoke_A900 ✅ SUCCESS >>>>>
API_Check ✅ SUCCESS >>>>>
PreSmoke_ATK_Test_A2 ✅ SUCCESS >>>>>

[2026-06-17 15:57:01]    CI执行结束

likedislike
CANN-robot
CANN-robot成员
6月17日 评论:

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

任务名称状态日志下载链接
codecheck ✅ SUCCESS >>>>>
SCA ✅ SUCCESS >>>>>
antipoison ✅ SUCCESS >>>>>
codecheck_Pr ✅ SUCCESS
StaticCheck_codespell_check ✅ SUCCESS
StaticCheck_link_validity_check ✅ SUCCESS
StaticCheck_resource_existence_check ✅ SUCCESS
StaticCheck_tag_closed_check ✅ SUCCESS
StaticCheck_markdownlint ✅ SUCCESS
codecheck_codestyle ✅ SUCCESS >>>>>
codecheck_precommit ✅ SUCCESS >>>>>

[2026-06-17 15:43:39]    CI执行结束

likedislike
CANN-robotCANN-robot成员
6月17日 添加了label:api-check-pass
CANN-robotCANN-robot成员
6月17日 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
6月17日 添加了label:ci-pipeline-passed
Ttianqiguang成员
6月18日 修改标题为 “feat: 构建系统新增 *_fallback.cpp 编译支持,并更新 opbase 版本依赖”,原标题为“新增支持fallback内容编译”
Ttianqiguang成员
6月18日 修改了pull request 的描述
songkai111成员
6月18日 评论:

/lgtm
/approve

likedislike
CANN-robotCANN-robot成员
6月18日 添加了label:approved
zl_hw成员
6月18日 评论:

/lgtm
/approve

likedislike
CANN-robotCANN-robot成员
6月18日 添加了label:lgtm
CANN-robotCANN-robot成员
6月18日 关闭了关联的issue
CANN-robotCANN-robot成员
6月18日 合入了pull request
Ssunday成员
7月2日 修改了pull request 的描述