Pull Request已成功合入, 合并人@CANN-robot
(感谢 yelongjian 的贡献)变更摘要
本 PR 属于代码规范优化型重构,主要围绕三方面:将多处冗余或废弃的头文件引用替换为精确的 external/ge_common/ge_common_api_types.h;为 VariableOpPass 的成员函数补充 const 修饰;并将 reshape_remove_pass.cc 中的全局对象改为 construct on first use 惯用法,以规避跨编译单元的静态初始化顺序问题。
主要改动
-
精确头文件引用替换:
mem_assigner.h将冗余的framework/common/ge_inner_error_codes.h替换为external/ge_common/ge_common_api_types.h;parser_model_saver.h与task_producer.h则用该精确头文件替换废弃的ge/ge_api_types.h(parser_model_saver.h同时移除ge/ge_api_error_codes.h),收窄依赖范围。 -
reshape_remove_pass.cc全局对象初始化顺序修复:将全局std::map<std::string, OpHashValue> kToBeDeleteOp和std::set<std::string> kInputShapeContinue改为函数内静态局部变量,通过新增的GetToBeDeleteOp()、GetInputShapeContinue()访问,采用 construct on first use 惯用法避免跨编译单元初始化顺序问题。 -
VariableOpPass添加const修饰:在头文件与实现中同步为DealFusion(const SameVarPtr &)和CheckVariableRefLegally(const SameVarPtr &, bool &)添加const限定,明确成员函数不修改对象状态。


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 |
|---|---|---|
| repo-cann/ge | ✅ yangyongqiang0606, kobemini, zhanj (3/2) | ✅ yangyongqiang0606 (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
yelongjian, thanks for your pull request. All authors of the commits have signed the CLA. 👍


compile


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


compile


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


compile


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


/lgtm


/lgtm


/approve


Pull Request
描述
代码规范优化,修复头文件引用、const修饰和全局对象初始化顺序问题。
变更类型
关联的Issue
如何测试
核对清单
其他信息
变更详情: