Pull Request已成功合入, 合并人@CANN-robot
(感谢 wxh456 的贡献)变更摘要
本 PR 属于「质量加固」任务(关联 issue #517 的规则1:成员函数 const),为 10 个只读 getter/判断类成员函数补充 const 修饰,涉及声明(.h)与定义(.cc)两处同步修改,不改变任何函数语义。改动覆盖编译引擎、任务构建适配、算子 tiling 注册、缓存描述、部署配置及混合模型等多个模块。
主要改动
EngineManager::GetSocVersion补const:engine_manager.cc与engine_manager.h中将GetSocVersion()声明和定义同步改为const成员函数,仅返回成员soc_version_,语义不变。ArgsFormatConstructor::GetArgsFormatString与TbeTaskBuilderAdapter::GetUnknownShapeFlag补const:分别位于args_format_constructor.cc/h和tbe_task_builder_adapter.cc/h,将只读字符串格式化与未知 shape 判断接口改为const,其中GetUnknownShapeFlag内部仍通过ge::AttrUtils::GetBool读取op_desc_属性。OpTilingFuncInfo::IsFunctionV1/IsFunctionV2/IsFunctionV3/IsFunctionV4补const:op_tiling_registry.cc与inc/graph_metadef/external/register/op_tiling_registry.h中 4 个判断 tiling 函数是否注册的接口统一加上const,仅判空成员指针。CompileCacheDesc::GetTensorInfoSize补const:compile_cache_desc.cc/h中将返回tensor_info_args_vec_.size()的接口改为const成员函数。Configurations::GetDeployResDir与HybridDavinciModel::GetSessionId补const:configurations.cc/h中返回部署资源目录路径的接口、hybrid_davinci_model.cc/h中获取会话 ID(内部经GE_CHECK_NOTNULL(impl_)后调用impl_->GetSessionId())的接口均补充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 |
|---|---|---|
| compiler/engines/ffts_engine | ✅ 张德鹏, zhanj, Mexyy (3/2) | ✅ 张德鹏 (1/1) |
| compiler/engines/nn_engine | ✅ Mexyy, zhanj, 张德鹏 (3/2) | ✅ 张德鹏 (1/1) |
| repo-cann/ge | ✅ 张德鹏, Mexyy, zhanj (3/2) | ✅ 张德鹏 (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
wxh456, thanks for your pull request. All authors of the commits have signed the CLA. 👍


CLA检查已通过,详情可参考这里


流水线任务触发成功
任务链接 [56ad7694e05147f99d99a0edc119a482][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| pre_comment | ✅ SUCCESS | >>>>> | |
| Compile_X86_compiler | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_executor | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_dflow | ✅ SUCCESS | >>>>> | >>>>> |
| UT_Test_dflow | ✅ SUCCESS | ||
| UT_Test_ge_common | ✅ SUCCESS | ||
| UT_Test_parser | ✅ SUCCESS | ||
| UT_Test_python | ✅ SUCCESS | >>>>> | |
| UT_Test_rt | ✅ SUCCESS | ||
| UT_Test_acl | ✅ SUCCESS | ||
| UT_Test_autofuse | ✅ SUCCESS | ||
| UT_Test_executor | ✅ SUCCESS | ||
| UT_Test_autofuse_ascendc_api | ✅ SUCCESS | ||
| ST_Test_dflow | ✅ SUCCESS | ||
| ST_Test_ge_common | ✅ SUCCESS | ||
| ST_Test_parser | ✅ SUCCESS | ||
| ST_Test_python | ✅ SUCCESS | >>>>> | |
| ST_Test_rt | ✅ SUCCESS | ||
| ST_Test_autofuse | ✅ SUCCESS | ||
| ST_Test_executor | ✅ SUCCESS | ||
| ST_Test_hetero | ✅ SUCCESS | ||
| ST_Test_autofuse_ascendc_api | ✅ SUCCESS | ||
| ST_Test_autofuse_e2e | ✅ SUCCESS | ||
| UT_Test_fe | ✅ SUCCESS | ||
| UT_Test_tefusion | ✅ SUCCESS | ||
| ST_Test_fe | ✅ SUCCESS | ||
| ST_Test_tefusion | ✅ SUCCESS | ||
| ST_Test_ge_common_atc | ✅ SUCCESS | ||
| UT_Test_Report_graphengine | ✅ SUCCESS | >>>>> | |
| UT_Test_Report_ge_executor_c | ✅ SUCCESS | >>>>> | |
| UT_Test_Report_ge_autofuse | ✅ SUCCESS | >>>>> | |
| ST_Test_Report_graphengine | ❌ FAILED | >>>>> | |
| ST_Test_Report_ge_executor_c | ✅ SUCCESS | >>>>> | |
| ST_Test_Report_ge_autofuse | ✅ SUCCESS | >>>>> | |
| UT_Test_Report_fe | ✅ SUCCESS | >>>>> | |
| ST_Test_Report_fe | ✅ SUCCESS | >>>>> |


流水线任务触发成功
任务链接 [d92d413a72da4afaabebd4668bd77870][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| pre_comment | ✅ SUCCESS | >>>>> | |
| Compile_X86_compiler_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_executor_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_dflow_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_ARM_compiler_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_ARM_executor_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_ARM_dflow_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_ARM_compiler | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_ARM_executor | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_ARM_dflow | ✅ SUCCESS | >>>>> | >>>>> |
| API_Check | ⚠️ WARNING | >>>>> | |
| PreSmoke_A900_npupool | ✅ SUCCESS | >>>>> |
[2026-08-27 16:42:17] CI执行结束


流水线任务触发成功
任务链接 [6242d656c90f49cd882f84268cf65b5c][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| codecheck_Pr | ✅ SUCCESS | ||
| antipoison | ✅ SUCCESS | >>>>> | |
| SCA | ✅ SUCCESS | >>>>> | |
| codecheck_dt | ✅ SUCCESS | >>>>> | |
| codecheck_precommit | ✅ SUCCESS | >>>>> | |
| StaticCheck_codespell | ✅ SUCCESS | ||
| StaticCheck_link_validity | ✅ SUCCESS | ||
| StaticCheck_resource_existence | ✅ SUCCESS | ||
| StaticCheck_tag_closed | ✅ SUCCESS | ||
| StaticCheck_markdownlint | ✅ SUCCESS |
[2026-08-27 16:34:10] CI执行结束


CLA检查已通过,详情可参考这里


流水线任务触发成功
任务链接 [ddd2d853c3004733b5c53fc09ec751be][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| pre_comment | ✅ SUCCESS | >>>>> | |
| Compile_X86_compiler_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_executor_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_dflow_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_ARM_compiler_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_ARM_executor_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_ARM_dflow_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_ARM_compiler | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_ARM_executor | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_ARM_dflow | ✅ SUCCESS | >>>>> | >>>>> |
| API_Check | ✅ SUCCESS | >>>>> | |
| PreSmoke_A900_npupool | ✅ SUCCESS | >>>>> |
[2026-08-27 17:36:21] CI执行结束


流水线任务触发成功
任务链接 [fb4154f83df4400c8441c599793ef99a][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| pre_comment | ✅ SUCCESS | >>>>> | |
| Compile_X86_compiler | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_executor | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_dflow | ✅ SUCCESS | >>>>> | >>>>> |
| UT_Test_dflow | ✅ SUCCESS | ||
| UT_Test_ge_common | ✅ SUCCESS | ||
| UT_Test_parser | ✅ SUCCESS | ||
| UT_Test_python | ✅ SUCCESS | >>>>> | |
| UT_Test_rt | ✅ SUCCESS | ||
| UT_Test_acl | ✅ SUCCESS | ||
| UT_Test_autofuse | ✅ SUCCESS | ||
| UT_Test_executor | ✅ SUCCESS | ||
| UT_Test_autofuse_ascendc_api | ✅ SUCCESS | ||
| ST_Test_dflow | ✅ SUCCESS | ||
| ST_Test_ge_common | ✅ SUCCESS | ||
| ST_Test_parser | ✅ SUCCESS | ||
| ST_Test_python | ✅ SUCCESS | >>>>> | |
| ST_Test_rt | ✅ SUCCESS | ||
| ST_Test_autofuse | ✅ SUCCESS | ||
| ST_Test_executor | ✅ SUCCESS | ||
| ST_Test_hetero | ✅ SUCCESS | ||
| ST_Test_autofuse_ascendc_api | ✅ SUCCESS | ||
| ST_Test_autofuse_e2e | ✅ SUCCESS | ||
| UT_Test_fe | ✅ SUCCESS | ||
| UT_Test_tefusion | ✅ SUCCESS | ||
| ST_Test_fe | ✅ SUCCESS | ||
| ST_Test_tefusion | ✅ SUCCESS | ||
| ST_Test_ge_common_atc | ✅ SUCCESS | ||
| UT_Test_Report_graphengine | ✅ SUCCESS | >>>>> | |
| UT_Test_Report_ge_executor_c | ✅ SUCCESS | >>>>> | |
| UT_Test_Report_ge_autofuse | ✅ SUCCESS | >>>>> | |
| ST_Test_Report_graphengine | ✅ SUCCESS | >>>>> | |
| ST_Test_Report_ge_executor_c | ✅ SUCCESS | >>>>> | |
| ST_Test_Report_ge_autofuse | ✅ SUCCESS | >>>>> | |
| UT_Test_Report_fe | ✅ SUCCESS | >>>>> | |
| ST_Test_Report_fe | ✅ SUCCESS | >>>>> |
[2026-08-27 17:41:59] CI执行结束


流水线任务触发成功
任务链接 [4b46af73768147488a702dab1cf5f428][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| codecheck_Pr | ✅ SUCCESS | ||
| antipoison | ✅ SUCCESS | >>>>> | |
| SCA | ✅ SUCCESS | >>>>> | |
| codecheck_dt | ✅ SUCCESS | >>>>> | |
| codecheck_precommit | ✅ SUCCESS | >>>>> | |
| StaticCheck_codespell | ✅ SUCCESS | ||
| StaticCheck_link_validity | ✅ SUCCESS | ||
| StaticCheck_resource_existence | ✅ SUCCESS | ||
| StaticCheck_tag_closed | ✅ SUCCESS | ||
| StaticCheck_markdownlint | ✅ SUCCESS |
[2026-08-27 17:29:34] CI执行结束


/lgtm


关联 Issue
https://gitcode.com/cann/ge/issues/517
修改说明
面向「质量加固」任务,仅修复 const 相关问题(规则1:成员函数 const),共 10 处。目标分支:develop。
本 PR 所选文件/接口与既有质量加固 PR(含此前 QWH789456 的 const 修复及其他已开 PR)不重复。
EngineManager::GetSocVersionconstArgsFormatConstructor::GetArgsFormatStringconstTbeTaskBuilderAdapter::GetUnknownShapeFlagconstOpTilingFuncInfo::IsFunctionV4constOpTilingFuncInfo::IsFunctionV3constOpTilingFuncInfo::IsFunctionV2constOpTilingFuncInfo::IsFunctionV1constCompileCacheDesc::GetTensorInfoSizeconstConfigurations::GetDeployResDirconstHybridDavinciModel::GetSessionIdconst验证建议