Pull Request已成功合入, 合并人@CANN-robot
(感谢 zlp1703 的贡献)变更摘要
本 PR 旨在进行代码规范加固,修正若干不符合规则要求的代码规范问题,核心内容是围绕 const 正确性(const-correctness)的调整,涉及 compiler/graph 下多个模块:为函数参数补充 const 限定、修正成员函数的 const 修饰符与声明保持一致,以及将局部静态容器声明为 const。这些改动均为纯规范修正,不改变既有逻辑与业务行为。
主要改动
node_matcher.cc参数 const 化: 为融合节点张量比较函数IsTensorDataEqualWith和IsTensorEqualWith的参数a_tensor补充const限定,使ConstGeTensorPtr形参符合只读语义。GraphManager接口 const 修正: 将GetGraphOptions声明为const成员函数、为SetExternalGraphRebuildStateCtrl的std::shared_ptr<GraphRebuildStateCtrl>参数补充const,并将IsCheckpointGraph移除多余的const修饰,graph_manager.cc实现与graph_manager.h声明同步修改。- 静态容器 const 化: 将
notask_pass_base.cc中IsPreNodeTypeValid内的not_support_type集合和graph_prepare.cc中CheckRefInputNode内的block_list集合由static std::set改为static const std::set,避免静态数据被意外修改。


Hi @zlp1703, 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.


/approve


修改若干符合规则要求的代码规范问题