Pull Request已成功合入, 合并人@CANN-robot
(感谢 cnsd_turtle 的贡献)变更摘要
本 PR 为质量加固类改动,主要针对编译图构建与内存管理相关模块补充成员函数的 const 修饰以及参数的 const 修饰,提升接口语义的准确性与代码健壮性。改动覆盖 CompiledGraphSummary::SummaryData、LabelAllocator、DependencyAnalyzer、StreamAllocator、GraphRebuildStateCtrl 等类的若干访问器与工具方法,均为纯签名层面的修饰补充,不改变原有业务逻辑。
主要改动
CompiledGraphSummary::SummaryData访问器补充const:为GetStreamAllocationSummary()、GetOutputShapes()、GetOutputDtypes()三个成员函数添加const修饰,明确只读语义。LabelAllocator::CollectFunctionalNode参数补充const:在label_allocator.h与label_allocator.cc中将形参由ComputeGraphPtr &graph改为const ComputeGraphPtr &graph,声明对传入图对象只读。DependencyAnalyzer::WhyACannotReuseB补充const:在dependency_analyzer.h与dependency_analyzer.cc中将该成员函数标记为const。StreamAllocator::GetSplitStreamToLogicStream补充const:在graph_stream_allocator.h中将该成员函数标记为const。GraphRebuildStateCtrl::IsVarPermitToChangeFormats补充const:在graph_rebuild_state_ctrl.h与graph_rebuild_state_ctrl.cc中将该成员函数标记为const。


Hi @cnsd_turtle, 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


补充 const 修饰、参数 const 修饰