Pull Request已成功合入, 合并人@CANN-robot
(感谢 wys222111 的贡献)变更摘要
该 PR 属于质量加固类改动,针对编译图构建与图管理流程中的若干代码规范问题("规则一")进行修复。核心改动是为 GraphBuilder 和 GraphManager 中不修改成员状态的成员函数统一补充 const 限定符,同步更新对应的声明与定义,以增强接口的语义约束、提升代码可读性,不改动任何业务逻辑与行为。
主要改动
GraphBuilder::IsDataDirectConnNetoutput增加const: 在compiler/graph/build/graph_builder.cc定义及graph_builder.h声明中,将该静态成员函数补充const限定符,声明其不修改对象状态。GraphManager::IsCheckpointGraph与IsAssignOpData增加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限定符。


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.


/lgtm


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