已合并
refactor: protobuf生成切换工程函数 #4532
refactor: protobuf生成切换工程函数 #4532
已合并
zhengfeiteng创建于 11 天前
zhengfeiteng
zhengfeiteng
11 天前

Pull Request

描述

请清晰准确地描述本次 Pull Request 的意图和变更内容。

变更类型

请选择本次引入的变更类型:

关联的Issue

如何测试

描述测试此变更的步骤和前提条件:
1.对比修改前后runtime包,一致。

核对清单

其他信息

在此添加任何其他关于本次 PR 的说明。

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 zhengfeiteng 的贡献)
zhengfeitengzhengfeiteng
11 天前 添加了label:enhancement
zhengfeitengzhengfeiteng
11 天前 创建了 pull request,commit 2b461011
atomgit-bot
atomgit-bot
11 天前 评论:

变更摘要

这是一个重构性质的 PR,核心目的是将 protobuf 生成逻辑从仓库内自带的 CMake 函数切换为工程(cann-cmake)提供的通用函数:删除本地 cmake/func.cmake 中自定义的 protobuf_generate 函数定义,并把各 CMake 调用点改为调用 generate_cann_protobuf;同时升级 cann-cmake 依赖版本以保证新函数可用。PR 的测试方式为对比修改前后的 runtime 包一致性。

主要改动

  • 升级 cann-cmake 依赖cmake/fetch_cann_cmake.cmake 中将 CANN_CMAKE_TAGmaster-049 升级为 master-053,并同步更新了对应的 URL_HASH SHA256 校验值。
  • 移除本地 protobuf_generate 函数cmake/func.cmake 中删除了自定义的 protobuf_generate 函数定义(含 proto 文件遍历、选择 host_protoc/PROTOC_PROGRAM、通过 add_custom_command 生成 .pb.cc/.pb.h 等逻辑),不再在仓库内维护该实现。
  • 切换调用点为工程函数src/dfx/adump/adump/adump_ascend031/ascend_dump.cmake 中原先调用 protobuf_generate 的语句改为调用 generate_cann_protobuf,参数(组件名、源文件变量、头文件变量、proto 文件列表及 TARGET)保持不变,行为与原先保持一致。
likedislike
不准确?
atomgit-bot
atomgit-bot
11 天前 评论:

代码审查

✅ 未发现问题

likedislike
不准确?
CANN-robotCANN-robot成员
11 天前 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
11 天前 评论:

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/runtime 王涛, 侯延保 (2/2) 王涛 (1/1)
src/aicpu_sched ZhaiPeiChao, 侯延保 (2/2) ZhaiPeiChao (1/1)
src/dfx newstarzj, 侯延保 (2/2) newstarzj (1/1)
src/platform jason_yuan_ye, 侯延保 (2/2) jason_yuan_ye (1/1)
src/queue_schedule ZhaiPeiChao, 侯延保 (2/2) ZhaiPeiChao (1/1)
src/tsd ZhaiPeiChao, 侯延保 (2/2) ZhaiPeiChao (1/1)
tests/ut/adump newstarzj, 侯延保 (2/2) newstarzj (1/1)
tests/ut/aicpu_sched ZhaiPeiChao, 侯延保 (2/2) ZhaiPeiChao (1/1)
tests/ut/msprof newstarzj, 侯延保 (2/2) newstarzj (1/1)
tests/ut/platform jason_yuan_ye, 侯延保 (2/2) jason_yuan_ye (1/1)
tests/ut/queue_schedule ZhaiPeiChao, 侯延保 (2/2) ZhaiPeiChao (1/1)
tests/ut/tsd ZhaiPeiChao, 侯延保 (2/2) ZhaiPeiChao (1/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

zhengfeiteng, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
CANN-robotCANN-robot成员
11 天前 将newstarzj,chenhao_1209,zhuliangying,wangtao43,zhangpengpeng8,yanmingxiang,LiWei79,ZhaiPeiChao,Reyn52166,gcw_9B2nSsjo,shikai-1,ykl999,arthur_morgan_hw,houyanbao,jason_yuan_ye,tingwood,liubin1986设为评审人
CANN-robotCANN-robot成员
11 天前 将newstarzj,chenhao_1209,zhuliangying,wangtao43,zhangpengpeng8,yanmingxiang,LiWei79,ZhaiPeiChao,Reyn52166,gcw_9B2nSsjo,shikai-1,ykl999,arthur_morgan_hw,houyanbao,jason_yuan_ye,tingwood,liubin1986设为审查人
zhengfeiteng
zhengfeiteng
11 天前 评论:

compile

likedislike
zhengfeitengzhengfeiteng
11 天前 update merge request[project id: 8810053, iid: 4532, commit_id: 12a8c9e01dca6765f8782d96bc40573ab6123034] virtual merging success
zhengfeiteng
zhengfeiteng
11 天前 评论:

/ai review

likedislike
atomgit-bot
atomgit-bot
11 天前 评论:

同提交,复用上一轮审查结果。需要重扫请用 /ai review force

代码审查

✅ 未发现问题

likedislike
不准确?
CANN-robotCANN-robot成员
11 天前 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
11 天前 评论:

流水线任务触发成功
任务链接 [40acc84516f54183bf3fc02837d923f7][流水线指导]

任务名称状态日志下载链接
Compile_Ascend_X86 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM ✅ SUCCESS >>>>> >>>>>
pre_comment ✅ SUCCESS >>>>>
Compile_Ascend_X86_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_ubuntu24 ✅ SUCCESS >>>>> >>>>>
UT_Test_acl ✅ SUCCESS >>>>>
UT_Test_rts_v201 ✅ SUCCESS >>>>>
UT_Test_rts_c ✅ SUCCESS >>>>>
UT_Test_rts_david ✅ SUCCESS >>>>>
UT_Test_rts_910b ✅ SUCCESS >>>>>
UT_Test_rts_common ✅ SUCCESS >>>>>
UT_Test_platform ✅ SUCCESS >>>>>
UT_Test_qs ✅ SUCCESS >>>>>
UT_Test_aicpusd ✅ SUCCESS >>>>>
UT_Test_tsd ✅ SUCCESS >>>>>
UT_Test_error_manager ✅ SUCCESS >>>>>
UT_Test_slog ✅ SUCCESS >>>>>
UT_Test_atrace ✅ SUCCESS >>>>>
UT_Test_msprof_part1 ✅ SUCCESS
UT_Test_msprof_part2 ✅ SUCCESS
UT_Test_adump ✅ SUCCESS >>>>>
UT_Test_mmpa ✅ SUCCESS >>>>>
UT_Test_camodel_check ✅ SUCCESS
API_Check ✅ SUCCESS >>>>>
PreSmoke_A900_npupool ✅ SUCCESS >>>>>
UT_Test_rts_report ✅ SUCCESS >>>>>
UT_Test_msprof_report ✅ SUCCESS >>>>>

[2026-08-27 16:47:50]    CI执行结束

likedislike
CANN-robot
CANN-robot成员
11 天前 评论:

流水线任务触发成功
任务链接 [b40dabdc457543ec8ca746c158fa38af][流水线指导]

任务名称状态日志下载链接
codecheck ✅ SUCCESS >>>>>
SCA ✅ SUCCESS >>>>>
antipoison ✅ SUCCESS >>>>>
codecheck_Check_Pr ✅ SUCCESS
codecheck_style ✅ 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:18:25]    CI执行结束

likedislike
CANN-robotCANN-robot成员
11 天前 添加了label:api-check-pass
此处折叠了6条事件消息 查看更多
CANN-robotCANN-robot成员
7 天前 删除了label:ci-pipeline-passed
CANN-robot
CANN-robot成员
7 天前 评论:

Notification

This pull request has been changed(code update) or closed, so removes the following label(s): ci-pipeline-passed.

likedislike
CANN-robotCANN-robot成员
7 天前 添加了label:cann-cla/yes
zhengfeiteng
zhengfeiteng
7 天前 评论:

compile

likedislike
zhengfeitengzhengfeiteng
7 天前 update merge request[project id: 8810053, iid: 4532, commit_id: a4fa2c731cb319334e9a4ab64534f2cbbdef4da3] virtual merging success
CANN-robotCANN-robot成员
7 天前 删除了label:api-check-pass
CANN-robotCANN-robot成员
7 天前 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
7 天前 评论:

流水线任务触发成功
任务链接 [0aa7ede0fb3040f0997d96b342d13306][流水线指导]

任务名称状态日志下载链接
Compile_Ascend_X86 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM ✅ SUCCESS >>>>> >>>>>
pre_comment ✅ SUCCESS >>>>>
Compile_Ascend_X86_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_ubuntu24 ✅ SUCCESS >>>>> >>>>>
UT_Test_acl ✅ SUCCESS >>>>>
UT_Test_rts_v201 ✅ SUCCESS >>>>>
UT_Test_rts_c ✅ SUCCESS >>>>>
UT_Test_rts_david ✅ SUCCESS >>>>>
UT_Test_rts_910b ✅ SUCCESS >>>>>
UT_Test_rts_common ✅ SUCCESS >>>>>
UT_Test_platform ✅ SUCCESS >>>>>
UT_Test_qs ✅ SUCCESS >>>>>
UT_Test_aicpusd ✅ SUCCESS >>>>>
UT_Test_tsd ✅ SUCCESS >>>>>
UT_Test_error_manager ✅ SUCCESS >>>>>
UT_Test_slog ✅ SUCCESS >>>>>
UT_Test_atrace ✅ SUCCESS >>>>>
UT_Test_msprof_part1 ✅ SUCCESS
UT_Test_msprof_part2 ✅ SUCCESS
UT_Test_adump ✅ SUCCESS >>>>>
UT_Test_mmpa ✅ SUCCESS >>>>>
UT_Test_camodel_check ✅ SUCCESS
API_Check ✅ SUCCESS >>>>>
PreSmoke_A900_npupool ✅ SUCCESS >>>>>
UT_Test_rts_report ✅ SUCCESS >>>>>
UT_Test_msprof_report ✅ SUCCESS >>>>>

[2026-08-31 10:10:31]    CI执行结束

likedislike
CANN-robot
CANN-robot成员
7 天前 评论:

流水线任务触发成功
任务链接 [7ffe7cfd13904a82b64781e11a3c6c05][流水线指导]

任务名称状态日志下载链接
SCA ✅ SUCCESS >>>>>
antipoison ✅ SUCCESS >>>>>
codecheck_Check_Pr ✅ SUCCESS
codecheck_style ✅ SUCCESS >>>>>
codecheck_precommit ✅ SUCCESS >>>>>
StaticCheck_md ✅ SUCCESS

[2026-08-31 09:42:56]    CI执行结束

likedislike
CANN-robotCANN-robot成员
7 天前 添加了label:api-check-pass
CANN-robotCANN-robot成员
7 天前 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
7 天前 添加了label:ci-pipeline-passed
zhangjie
zhangjie成员
7 天前 评论:

/lgtm

likedislike
zhengfeiteng
zhengfeiteng
7 天前 评论:
likedislike
zhangjie
zhangjie成员
7 天前 评论:

/approve

likedislike
wangtao成员
7 天前 评论:

/approve

likedislike
ZhaiPeiChao
ZhaiPeiChao成员
7 天前 评论:

/lgtm
/approve

likedislike
袁野
袁野成员
7 天前 评论:

/approve

likedislike
CANN-robotCANN-robot成员
7 天前 添加了label:approved
houyanbao成员
7 天前 评论:

/lgtm

likedislike
CANN-robotCANN-robot成员
7 天前 添加了label:lgtm
CANN-robotCANN-robot成员
7 天前 合入了pull request