Merged
fix(build): 替换已下线头文件graph/ge_error_codes.h为graph/error_codes.h #818
songkai111Add on Sep 3
fix(build): 替换已下线头文件graph/ge_error_codes.h为graph/error_codes.h #818
Merged
songkai111Add on Sep 3
songkai111
songkai111Collaborators
Sep 3

描述

改动原因

外部依赖(metadef/graph 模块)中的头文件 graph/ge_error_codes.h 已下线,新版 SDK 中不再提供,opbase 引用该头文件的代码编译失败。官方替代头文件为 graph/error_codes.h。

改动方法

将全仓 4 处 #include "graph/ge_error_codes.h" 统一替换为 #include "graph/error_codes.h":

  1. include/op_common/log/log.h
  2. src/nnopbase/composite_op/lib_loader/opp_resource_loader.cpp
  3. src/nnopbase/individual_op/executor/indv_executor.cpp
  4. tests/nnopbase/common/depends/metadef/space_registry_stub.cpp

ge::GRAPH_FAILED、ge::DataType、ge::Format 等符号由新头文件继续提供,功能行为不变。已确认全仓 ge_error_codes 引用共 4 处,全部替换,无遗漏。

关联的Issue

#351

测试

编译验证通过(新版依赖下无 ge_error_codes.h 缺失报错),既有功能行为不变。

文档更新

无

类型标签

likedislike
Pull Request has been successfully merged by CANN-robot.
(Thank you for songkai111's contribution.)
songkai111songkai111Collaborators
Sep 3 Created pull request, commit 46eca73d
atomgit-bot
atomgit-bot
Sep 3 Comments:

变更摘要

本 PR 为 Bug 修复:外部依赖(metadef/graph 模块)新版 SDK 已下线头文件 graph/ge_error_codes.h,导致 opbase 引用该头文件的代码编译失败。改动将全仓 4 处 #include "graph/ge_error_codes.h" 统一替换为官方替代头文件 #include "graph/error_codes.h",其中 ge::GRAPH_FAILED、ge::DataType、ge::Format 等符号由新头文件继续提供,功能行为不变。

主要改动

  • 替换 include/op_common/log/log.h 头文件引用: 将 #include "graph/ge_error_codes.h" 改为 #include "graph/error_codes.h",消除日志模块对已下线头文件的依赖。
  • 替换 src/nnopbase/composite_op/lib_loader/opp_resource_loader.cpp 头文件引用: 同步更新该复合算子资源加载模块的头文件包含,改用 graph/error_codes.h。
  • 替换 src/nnopbase/individual_op/executor/indv_executor.cpp 头文件引用: 同步更新单算子执行器模块的头文件包含,改用 graph/error_codes.h。
  • 替换 tests/nnopbase/common/depends/metadef/space_registry_stub.cpp 头文件引用: 同步更新测试桩代码的头文件包含,改用 graph/error_codes.h,保证测试工程在新版依赖下可编译。
likedislike
Incorrect?
atomgit-bot
atomgit-bot
Sep 3 Comments:

代码审查

✅ 未发现问题

likedislike
Incorrect?
CANN-robotCANN-robotCollaborators
Sep 3 Added label: cann-cla/yes
songkai111
songkai111Collaborators
Sep 3 Comments:

compile

likedislike
songkai111songkai111Collaborators
Sep 3 Pre merge succeeded (commit_id: 690d5419ff6c19b6d5700f6f38326fc7ca634f5d)
CANN-robot
CANN-robotCollaborators
Sep 3 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
include ✅ 王永光, 汤平川, 周奇龙 (3/2) ✅ 王永光 (1/1)
repo-cann/opbase ✅ 汤平川, 周奇龙 (2/2) ✅ 周奇龙, 汤平川 (2/1)

💡 Tip:

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

CLA Signature Pass

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

likedislike
CANN-robotCANN-robotCollaborators
Sep 3 Set pengjiahao96,zhou-qilong,wangrui_,rxtfeng,loov1,tang-lei01,jia0liang,zl_hw,pingchuantang,llimwang,gubaocheng,wangyongguang as approver
CANN-robotCANN-robotCollaborators
Sep 3 Set pengjiahao96,zhou-qilong,wangrui_,rxtfeng,loov1,tang-lei01,jia0liang,zl_hw,pingchuantang,llimwang,gubaocheng,wangyongguang as approver
CANN-robot
CANN-robotCollaborators
Sep 3 Comments:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robotCollaborators
Sep 3 Added label: ci-pipeline-running
songkai111songkai111Collaborators
Sep 3 Change title to "fix(build): 替换已下线头文件graph/ge_error_codes.h为graph/error_codes.h", originally titled "[bugfix] 替换已下线头文件ge_error_codes.h为error_codes.h".
songkai111songkai111Collaborators
Sep 3 Modify description of pull request
CANN-robotCANN-robotCollaborators
Sep 3 Removed label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
Sep 3 Added label: ci-pipeline-passed
wangyongguang
wangyongguangCollaborators
Sep 4 Comments:

/approve

likedislike
TangPC
TangPCCollaborators
Sep 4 Comments:

/lgtm
/approve

likedislike
CANN-robotCANN-robotCollaborators
Sep 4 Added label: approved
sunday
sundayCollaborators
Sep 4 Comments:

/lgtm
/approve

likedislike
CANN-robotCANN-robotCollaborators
Sep 4 Added label: lgtm
CANN-robotCANN-robotCollaborators
Sep 4 Closed associated issue
CANN-robotCANN-robotCollaborators
Sep 4 Merged pull request