已合并
feat(mc2): add src/cc skeleton for hccl migration (PR#1/5) #248
feat(mc2): add src/cc skeleton for hccl migration (PR#1/5) #248
已合并
liuyiming创建于 19 天前
liuyiming
liuyiming成员
19 天前

当前PR是否有AI参与:

  1. AI Agent 平台: OpenCode
  2. AI 模型: DeepSeek v4 flash
  3. Prompt上下文 : 迁移方案设计与CMake骨架代码生成,人工复核与云环境编译验证

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

MC2 算子开发 API(adv_api/hccl)从 asc-devkit 迁移到本仓的第一步:搭建 src/cc/ 构建骨架。

  • 根 CMakeLists 新增 ASCCOMM_BUILD_MC2 选项(默认 OFF,不影响现有构建)和 src/cc 子目录
  • src/cc/CMakeLists.txt 定义 mc2_client SHARED 目标(源列表留空,后续 PR 填充),include 路径、编译选项按 devkit 原构建平移,libhcomm 链接 stub 机制原样保留
  • 详细方案见关联 Issue,本 PR 为系列 5 个中的第 1 个

该PR关联的issue

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

希望检视人员了解:

  • option 默认 OFF:默认配置下本 PR 对现有构建零影响,需显式 -DASCCOMM_BUILD_MC2=ON 才构建
  • 迁移基线:asc-devkit a00678a7b
  • 后续 PR(common/kfc/ops)在此骨架上按模块填充源码,每个独立可编译

改动类型 / Change Type

测试信息 / Testing

在 aarch64 + CANN 环境验证(-DASCCOMM_BUILD_MC2=ON -DASCCOMM_BUILD_CCU=OFF):

  • cmake configure/generate 成功

  • mc2_client 目标编译通过,libmc2_client.so 与 libhcomm stub 均正常生成

(骨架期无源码,UT/ST 随后续 PR 补充)

检查清单 / Checklist

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 liuyiming 的贡献)
liuyimingliuyiming成员
19 天前 创建了 pull request,commit 57edb7c9
liuyimingliuyiming成员
19 天前 关联了issue:[Requirement|需求建议]: 将 devkit 中的 MC2 算子开发 API(hccl)迁移到本仓
atomgit-bot
atomgit-bot
19 天前 评论:

变更摘要

本 PR 是 MC2 算子开发 API(adv_api/hccl)从 asc-devkit 迁移到本仓的系列 5 个 PR 中的第 1 个,目标是搭建 src/cc/ 的构建骨架。核心做法是在根 CMakeLists.txt 中新增构建开关 ASCCOMM_BUILD_MC2(默认 OFF,显式置 ON 才参与构建),并在 src/cc/CMakeLists.txt 中定义 mc2_client SHARED 目标,源码列表暂留空,include 路径、编译选项与 libhcomm 链接 stub 机制按 devkit 原构建平移;迁移基线为 asc-devkit a00678a7b。由于开关默认关闭,默认配置下对现有构建无影响。

主要改动

  • 新增 MC2 构建开关: 根 CMakeLists.txt 引入 ASCCOMM_BUILD_MC2 选项并默认设为 OFF,仅在显式开启时引入 src/cc 子目录,保证默认构建行为不变。
  • 新增 src/cc 子目录构建脚本: 在 src/cc/CMakeLists.txt 中定义 mc2_client SHARED 目标,源文件列表预留为空以便后续 PR 按模块填充,保证骨架阶段即可独立可编译。
  • 沿用 devkit 原构建配置: 该目标的 include 路径与编译选项按 devkit 原构建平移,并保留 libhcomm 的链接 stub 机制,维持与迁移前一致的依赖处理方式。
  • 迁移基线与范围声明: 明确以 asc-devkit a00678a7b 为迁移基线,本 PR 仅负责骨架搭建,common/kfc/ops 等模块源码后续 PR 在此骨架上分别填充。
likedislike
不准确?
CANN-robot
CANN-robot成员
19 天前 评论:

Hi @WhiteJunior, welcome to submitting your first PR to asc-comm!

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.

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

代码审查

✅ 未发现问题

likedislike
不准确?
此处折叠了104条消息 查看更多
chenma成员
17 天前 评论:

/lgtm
/approve

likedislike
CANN-robotCANN-robot成员
17 天前 添加了label:lgtm
zhanghao_0689
zhanghao_0689成员
17 天前 评论:

/lgtm
/approve

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