Merged
refactor(ccu): always build HComm runtime backend #388
每天都要吃馒头Add on 21 days ago
refactor(ccu): always build HComm runtime backend #388
Merged
每天都要吃馒头Add on 21 days ago
每天都要吃馒头
每天都要吃馒头Collaborators
21 days ago

当前PR是否有AI参与:

[x] 否

[ ] 是
__1. AI Agent 平台:
__2. AI 模型:
__3. Prompt上下文 :

PR功能描述 / 为什么需要这个合入**:

移除 CCU Runtime 的 HComm backend 构建开关

该PR关联的issue

(格式为fixes #<issue号>, 或者resolves #<issue号>): fixes #

希望检视人员了解:

改动类型 / Change Type

  • [x ] 代码重构 / Refactoring

测试信息 / Testing

  • [ x] 单元测试通过 / UT passed
  • [x ] 集成测试通过 / ST passed
  • [ x] 人工验证通过 / Manual verified

检查清单 / Checklist

  • [x ] 代码符合规范 / Code follows style guide
  • [ x] 测试添加并通过 / Tests added and passed
  • [ x] 文档已更新 / Docs updated if needed
  • [ x] 无硬编码敏感信息 / No secrets hardcoded
  • [ x] 提交信息符合规范 / Commit message follows convention
likedislike
Pull Request has been successfully merged by CANN-robot.
(Thank you for 每天都要吃馒头's contribution.)
每天都要吃馒头每天都要吃馒头Collaborators
21 days ago Created pull request, commit 1903ef96
atomgit-bot
atomgit-bot
21 days ago Comments:

变更摘要

本 PR 将 HComm runtime 后端从可选编译项改为默认且必然构建:打包脚本不再传入后端开关配置,也不再校验 CMake 缓存中的该开关;运行时后端的编译期条件分支被移除,systemBackend() 统一返回 hcommBackend()。整体上属于构建配置与后端选择逻辑的收敛,减少了一套"后端不可用"的降级路径。

主要改动

  • HComm 后端改为始终构建: scripts/package/build_package.sh 中移除了 -DASCCOMM_BUILD_CCU_RUNTIME_HCOMM_BACKEND=ON 这一 CMake 配置项,仅保留 -DASCCOMM_BUILD_CCU=ON 与 -DASCCOMM_BUILD_CCU_RUNTIME=ON。
  • 删除后端开关的构建产物校验: 同一脚本中不再通过 grep 检查 CMakeCache.txt 里的 ASCCOMM_BUILD_CCU_RUNTIME_HCOMM_BACKEND 是否为 ON,也不再因此报出 "built without the HComm backend" 错误。
  • 移除条件编译分支: src/ccu/experimental/ccu_runtime_backend.cpp 中 #include "ccu_runtime_hcomm_backend.h" 不再受 CCU_TRANSLATOR_HAS_HCOMM_BACKEND 宏包裹,头文件始终引入。
  • 删除不可用后端占位实现: 移除了在缺少 HComm 后端时启用的 UnavailableBackend 类,该类此前对 contextCreate、contextDestroy、externalEventVa、externalXnVa、launch、synchronize、launchDestroy 等接口一律返回 CCU_STATUS_RUNTIME_ERROR。
  • 简化 systemBackend() 选择逻辑: 该函数由宏条件分支改为单行实现,在未设置测试后端时直接返回 hcommBackend(),setBackendForTesting 的测试注入能力保持不变。
likedislike
Incorrect?
atomgit-bot
atomgit-bot
21 days ago Comments:

代码审查

✅ 未发现问题

likedislike
Incorrect?
CANN-robotCANN-robotCollaborators
21 days ago Added label: stat/needs-squash
CANN-robotCANN-robotCollaborators
21 days ago Added label: cann-cla/yes
CANN-robot
CANN-robotCollaborators
21 days ago Comments:

CLA Signature Pass

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

likedislike
CANN-robot
CANN-robotCollaborators
21 days ago Comments:

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/asc-comm ✅ changxianyu, dengjing_aoe (2/2) ✅ changxianyu (1/1)
src ✅ changxianyu, dengjing_aoe (2/2) ✅ changxianyu (1/1)

💡 Tip:

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

CLA Signature Pass

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

likedislike
CANN-robotCANN-robotCollaborators
21 days ago Set zhanghao_0689,mlidongfeng,suqwe,yanqingshang,qin437231,kong0808,dengjing_aoe,YeZZzzz1,bluesky901,xun_zhuge,bianque,houyuyang,xiaoting624,shi_nanxiang,jiangxinyu3,ascendhjh,DragonBornHD84,changxianyu,hyolee,chenma as approver
7 event messages are collapsed here。 See more
每天都要吃馒头每天都要吃馒头Collaborators
21 days ago Associated issue: [Requirement|需求建议]: 简化 CCU runtime 用户接口并统一 descriptor ABI
每天都要吃馒头
每天都要吃馒头Collaborators
18 days ago Comments:

compile

likedislike
每天都要吃馒头每天都要吃馒头Collaborators
18 days ago Pre merge succeeded (commit_id: 2a31f001969bf2d3137234eb60ecc99c8a0ded5a)
CANN-robot
CANN-robotCollaborators
18 days ago Comments:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robotCollaborators
18 days ago Added label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
18 days ago Removed label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
18 days ago Added label: ci-pipeline-passed
changxianyu
changxianyuCollaborators
18 days ago Comments:

/lgtm
/approve

likedislike
CANN-robotCANN-robotCollaborators
18 days ago Added label: approved
dengjing_aoe
dengjing_aoeCollaborators
18 days ago Comments:

/lgtm

likedislike
CANN-robotCANN-robotCollaborators
18 days ago Added label: lgtm
CANN-robotCANN-robotCollaborators
18 days ago Merged pull request