Merged
fix(apply_keras_momentum): 修正 arch35 GEIR 示例 proto 头文件相对路径 #13810
fix(apply_keras_momentum): 修正 arch35 GEIR 示例 proto 头文件相对路径 #13810
Merged
陈晨Add on 16 days ago
陈晨
陈晨Collaborators
16 days ago

描述

问题现象

执行 bash build.sh --run_example apply_keras_momentum graph --example_name=apply_keras_momentum --soc=ascend950 时,GEIR 示例编译失败:
test_geir_apply_keras_momentum.cpp:34: fatal error: ../op_graph/apply_keras_momentum_proto.h: No such file or directory

根因分析

该示例位于 examples/arch35/ 子目录,比普通示例(直接位于 examples/ 下)多一层目录。原写法 #include "../op_graph/..." 相对源文件解析到不存在的 examples/op_graph/,而 proto
头文件实际位于算子根目录的 op_graph/ 下。

修改内容

将 include 路径由 ../op_graph/ 修正为 ../../op_graph/,与 bn_infer_grad、bn_training_update 等其他 arch35 示例的既有写法保持一致。仅改动 1 行,无功能变更。

关联的Issue

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

测试

bash build.sh --run_example apply_keras_momentum graph --example_name=apply_keras_momentum --soc=ascend950

文档更新

类型标签

AI/Agent生成声明

likedislike
Pull Request has been successfully merged by CANN-robot.
(Thank you for 陈晨's contribution.)
陈晨陈晨Collaborators
16 days ago Created pull request, commit 7c89c298
atomgit-bot
atomgit-bot
16 days ago Comments:

变更摘要

本 PR 针对 optim/apply_keras_momentum 的 arch35 GEIR 示例,修正了 apply_keras_momentum_proto.h 头文件的相对引用路径。示例文件 test_geir_apply_keras_momentum.cpp 中原来的包含路径为 ../op_graph/apply_keras_momentum_proto.h,现改为 ../../op_graph/apply_keras_momentum_proto.h,使路径层级与实际目录结构一致。

主要改动

  • 修正 proto 头文件相对路径:将 #include "../op_graph/apply_keras_momentum_proto.h" 调整为 #include "../../op_graph/apply_keras_momentum_proto.h",使 apply_keras_momentum_proto.h 的查找路径与示例所在目录层级匹配。
  • 影响范围限定于 arch35 GEIR 示例:改动仅涉及 optim/apply_keras_momentum/examples/arch35/test_geir_apply_keras_momentum.cpp 中的一行包含指令,不改变示例中包含的 ge_api.h、array_ops.h、ge_ir_build.h 等其他头文件引用。
  • 保持示例逻辑不变:test_geir_apply_keras_momentum.cpp 的其余内容(包括 FAILED/SUCCESS 宏定义等)未作调整,变更仅限于头文件引用位置。

🧩 本次 Review 已使用自定义 Skill:

likedislike
Incorrect?
atomgit-bot
atomgit-bot
16 days ago Comments:

代码审查

✅ 未发现问题


🧩 本次 Review 已使用自定义 Skill:

likedislike
Incorrect?
CANN-robotCANN-robotCollaborators
16 days ago Added label: cann-cla/yes
CANN-robot
CANN-robotCollaborators
16 days ago Comments:

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 /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

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

likedislike
CANN-robotCANN-robotCollaborators
16 days ago Set zengjuan,u010470851,chenfeng61,chaotang233,crystalhu,yu-xinjie62,yangyang016,fanqirui,su-yueming,yourealize,chenqi317,wang-xing001,liubo75,tangweiwei2,east_yang,pingchuantang,qianzehong as approver
CANN-robotCANN-robotCollaborators
16 days ago Set u010470851,chenfeng61,yu-xinjie62,su-yueming,yourealize,wang-xing001,east_yang,pingchuantang,qianzehong as approver
陈晨
陈晨Collaborators
16 days ago Comments:

/compile

likedislike
陈晨陈晨Collaborators
16 days ago Pre merge succeeded (commit_id: 225079a3f21ceb2737ba5738ba78a1a747b24e60)
CANN-robot
CANN-robotCollaborators
16 days ago Comments:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robotCollaborators
16 days ago Added label: ci-pipeline-running
陈晨陈晨Collaborators
16 days ago Modify description of pull request
陈晨陈晨Collaborators
16 days ago Modify description of pull request
陈晨陈晨Collaborators
16 days ago Modify description of pull request
CANN-robotCANN-robotCollaborators
16 days ago Removed label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
16 days ago Added label: ci-pipeline-passed
sgqt12
sgqt12Collaborators
16 days ago Comments:

/lgtm

likedislike
liuchuangdev
liuchuangdevCollaborators
16 days ago Comments:

/approve

likedislike
wang-xing001
wang-xing001Collaborators
16 days ago Comments:

/lgtm
/approve

likedislike
CANN-robot
CANN-robotCollaborators
16 days ago Comments:

The following users do not have permission to comment /lgtm or /approve on any module in this PR:
/approve: 刘闯

likedislike
CANN-robotCANN-robotCollaborators
16 days ago Added label: lgtmapproved
CANN-robotCANN-robotCollaborators
16 days ago Closed associated issue
CANN-robotCANN-robotCollaborators
16 days ago Merged pull request
yuning_chen
yuning_chenCollaborators
16 days ago Comments:

您好,pr合入已准备就绪,请尽快联系committer进行检视,谢谢!
@u010470851 @pingchuantang @qianzehong @east_yang @su-yueming @yourealize @yu-xinjie62

likedislike