Pull Request已成功合入, 合并人@CANN-robot
(感谢 liuyiming 的贡献)变更摘要
本 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_clientSHARED 目标,源文件列表预留为空以便后续 PR 按模块填充,保证骨架阶段即可独立可编译。 - 沿用 devkit 原构建配置: 该目标的 include 路径与编译选项按 devkit 原构建平移,并保留
libhcomm的链接 stub 机制,维持与迁移前一致的依赖处理方式。 - 迁移基线与范围声明: 明确以 asc-devkit
a00678a7b为迁移基线,本 PR 仅负责骨架搭建,common/kfc/ops等模块源码后续 PR 在此骨架上分别填充。


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.


/lgtm
/approve


当前PR是否有AI参与:
PR功能描述 / 为什么需要这个合入:
MC2 算子开发 API(adv_api/hccl)从 asc-devkit 迁移到本仓的第一步:搭建
src/cc/构建骨架。ASCCOMM_BUILD_MC2选项(默认 OFF,不影响现有构建)和src/cc子目录src/cc/CMakeLists.txt定义mc2_clientSHARED 目标(源列表留空,后续 PR 填充),include 路径、编译选项按 devkit 原构建平移,libhcomm 链接 stub 机制原样保留该PR关联的issue
(格式为fixes #<issue号>, 或者resolves #<issue号>): fixes #66
希望检视人员了解:
-DASCCOMM_BUILD_MC2=ON才构建a00678a7b改动类型 / 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