Closed
【CI】PR编译范围按白名单+CMake/def推导,Compile任务按arch拆分 #5732
景明Add on  Sep 29Closed at  Oct 10
景明
景明Collaborators
Sep 29 Create

背景

ops-transformer 的 PR 编译/UT 范围长期由 tests/test_config.yaml(example 看护规则)与 tests/test_soc_config.yaml(SoC 选择,已长期未维护)驱动,存在:

  • 编译范围与实际编译依赖(CMake depends)/ SoC 注册(def.cpp AddConfig)脱节;
  • Compile_x86/Compile_arm 两个任务粗粒度全编,arch22/arch35 不区分;
  • mc2 PR UT 单独挑 SoC,与非 mc2 口径不一致。

目标

  1. PR 编译范围改为白名单优先 + op_host/CMakeLists.txt *_depends 反向闭包 + *def.cpp AddConfig SoC 过滤;
  2. Compile 任务按 arch 拆分:arch22(ascend910b/ascend910_93 两条单 SoC 命令、vendor 区分包名)、arch35(ascend950);
  3. 接入分布式编译判定(check_distributed_compile.sh),判定口径与实编译范围一致;
  4. UT 侧删除废弃 test_soc_config.yaml/get_soc_version.py,统一五 SoC 矩阵。

当前口径(已确认决策)

  • SoC 唯一依据为 def.cpp AddConfig,op_host/config/<soc> 目录已废弃不作依据;
  • 310p/350 暂不编译;ubuntu24/experimental/monitor 等任务暂不改;
  • 多 SoC 单构建不支持,arch22 用两条单 SoC 命令;
  • 域内 common/3rd 变更按 depends 反向闭包触发依赖算子(粒度从粗)。

任务清单

likedislike
游震Collaborators
Sep 29 Comments:

/assign @gitcode_lijd

likedislike
CANN-robotCANN-robotCollaborators
Sep 29 Assign gitcode_lijd as responsible person
景明景明Collaborators
Oct 10 changed custom state from 进行中 to 已完成
景明景明Collaborators
Oct 10 Close issue
周云飞
周云飞Collaborators
3 days ago Comments:

相关 PR 已合入,涉及以下改动:

  • 新增分布式编译判断脚本,根据白名单或 CMake 依赖反向闭包及 def.cpp 的 SoC 配置推导受影响算子,再结合各 SoC 的长耗时算子名单判断是否需要分布式编译。
  • 扩展编译范围推导:白名单中 impact: [] 的算子暂缓编译,直接变更和依赖闭包均不纳入;同时暂不因域内 common/3rd 变更触发下游编译。
  • 登记了 fused_infer_attention_score、mega_moe 和 matmul_all_reduce 三个暂缓编译条目。该机制仅影响 kernel 编译范围,不影响 UT。

目前无法根据这些改动确认 Compile 任务按 arch 拆分的完成情况。

关联 PR:PR #11997、PR #13631

likedislike