已合并
【质量加固】修复若干符合修复规则一和规则二的若干问题的代码问题 #4594
wys222111创建于 6 天前
【质量加固】修复若干符合修复规则一和规则二的若干问题的代码问题 #4594
已合并
wys222111创建于 6 天前
wys222111
6 天前

修复规则一和规则二的若干问题

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 wys222111 的贡献)
Wwys222111
6 天前 添加了label:enhancement
Wwys222111
6 天前 创建了 pull request,commit 098f8a3c
atomgit-bot
atomgit-bot
6 天前 评论:

变更摘要

该 PR 属于质量加固类改动,针对编译图构建与图管理流程中的若干代码规范问题("规则一")进行修复。核心改动是为 GraphBuilderGraphManager 中不修改成员状态的成员函数统一补充 const 限定符,同步更新对应的声明与定义,以增强接口的语义约束、提升代码可读性,不改动任何业务逻辑与行为。

主要改动

  • GraphBuilder::IsDataDirectConnNetoutput 增加 const: 在 compiler/graph/build/graph_builder.cc 定义及 graph_builder.h 声明中,将该静态成员函数补充 const 限定符,声明其不修改对象状态。
  • GraphManager::IsCheckpointGraphIsAssignOpData 增加 const: 在 compiler/graph/manager/graph_manager.cc 定义及 graph_manager.h 声明中,为检查 checkpoint 图与 Assign 算子数据的两个成员函数补充 const 限定符。
  • GraphManager::IsGraphNeedRebuild 增加 const: 在 graph_manager.cc 定义及 graph_manager.h 声明中,为判断图是否需要重建的成员函数补充 const 限定符。
  • GraphManager::RefreshOptionByGraph 增加 const: 在 graph_manager.cc 定义及 graph_manager.h 声明中,为按图刷新引擎选项的成员函数补充 const 限定符。
likedislike
CANN-robot
CANN-robot成员
6 天前 评论:

Hi @wys222111, welcome to submitting your first PR to ge!

PR Merge Steps

1. CLA Signing

If the current PR label includes cann-cla/yes, it means you have signed the CLA and can proceed to the next step. If the label includes cann-cla/no, please sign the CLA first. If you have any questions, please refer to the FAQ.

2. CI Check

Please comment /compile to trigger the CI pipeline check. If the CI run is successful, the PR will be tagged with ci-pipeline-passed and you can proceed to the next step. If the CI run fails, the PR will be tagged with ci-pipeline-failed, please check the CI logs to fix the issues in the PR. If you have any questions, please refer to the FAQ.

3. Code Review

After CI passes, please refer to the PR Approval Progress and proactively @ the committers in the table to review the code. After approval, committers will comment /lgtm and /approve. Once the lgtm and approved labels are successfully added, the PR will be merged automatically.

likedislike
atomgit-bot
atomgit-bot
6 天前 评论:

代码审查

✅ 未发现问题

likedislike
此处折叠了53条消息 查看更多
zhanj
zhanj成员
5 天前 评论:

/lgtm

likedislike
CANN-robotCANN-robot成员
5 天前 添加了label:lgtm
张德鹏成员
4 天前 评论:

/approve

likedislike
CANN-robotCANN-robot成员
4 天前 添加了label:approved
CANN-robotCANN-robot成员
4 天前 合入了pull request