Pull Request has been successfully merged by CANN-robot.
(Thank you for 陈晨's contribution.)变更摘要
本 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:




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
chen_chenn, thanks for your pull request. All authors of the commits have signed the CLA. 👍


/compile


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


/lgtm


/approve


/lgtm
/approve


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


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


描述
问题现象
执行 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生成声明