Merged
feat(cake): 导入 SIMT 轨 #102
feat(cake): 导入 SIMT 轨 #102
Merged
JunyiAdd on Oct 7
Junyi
JunyiCollaborators
Oct 7

概述

CAKE2 的 SIMT 轨(Ascend 950PR)由上游 918b31c6(PR #538,2026-08-14)引入,是纯新增
技能,不改动任何已有技能
。本 MR 把它搬入本仓。

源分支 feat/cake-simt-track,base cann/cannbot:master。50 文件 / +10964 行。

A  plugins-community/collaborative-agent-kernel-evolution/skills/simt-codegen/   45 文件
A  plugins-community/collaborative-agent-kernel-evolution/agents/cake-partial-simt.md   233 行
M  plugins-community/collaborative-agent-kernel-evolution/.claude-plugin/plugin.json   agents 3 → 4
M  plugins-community/collaborative-agent-kernel-evolution/README.OpenSource   组件 4 → 5
M  OAT.xml   cake filteritem 44 → 45
M  CHANGELOG.md

按 M0.5 以工作树复制方式取内容,未建立指向 CAKE2 的任何 git 关联——
git remote -v 无 CAKE2,git log --all --source | grep -c CAKE2 为 0。


一、不依赖任何待合入的 MR

cake-partial-simt 的 frontmatter 声明 8 个技能,其中 7 个已在 master 的 19 技能基座上:

技能 在 master
task-progress、skill-trace、cake-code-review、ascendc-evaluation、ascendc-op-debug、git-version-management、cake-docs-search 是
simt-codegen 本 MR 新增

因此本 MR 与 !54 / !60 / !63 / !71 互不依赖,可并行评审。


二、不与 ops/ascendc-simt-* 去重(与原计划不同,请重点看这一节)

旧计划对 simt-codegen 定的处置是「重叠的 10 类改为引用 ops/ascendc-simt-*,不自带
副本」,理由是两者有 10 类逐项重叠。实测后改为全部保留。

文本重合率 3%–14%。 对本技能 20 个 references/*.md 与
ops/ascendc-simt-best-practices、ops/ascendc-simt-tiling-design 的 15 个 .md 逐个做词集
比对(长度 ≥4 的标识符),每个文件取与之最相似的对手,重合率区间为 3%–14%,最高的
simt_memory_ops.md 对 ascendc-simt-best-practices/SKILL.md 为 14%。无一对构成近似重复。

内容量差一个数量级。 ops/ 侧 14 个 reference 合计约 1454 行,其中 12 个在 33–128 行:

ops 侧 行数 本技能侧 行数
编译与运行.md 158 simt_build_and_compile.md 410
debug-api.md 530 simt_debug_patterns.md 433
data-transfer.md 50 simt_memory_ops.md 67
thread-stride-pattern.md 48 simt_warp_ops.md 105
index-calculation.md / compute-operators.md / multi-core-sync.md / vf-declaration.md / vf-call.md 49 / 33 / 38 / 38 / 50 无一对一对应物 —

simt_multi_dtype_guide.md(553)、msopgen_adaptation.md(481)、
memory_optimization_guide.md(474)、simt_operator_patterns.md(424)在 ops/ 侧没有
对应物。按原处置执行会把 410 行的编译指南换成 158 行的,并对没有对应物的文件产生误判。

结论:原判断说的是主题重叠,不是文本重复,两边内容不可替换。ops/ascendc-simt-*
是通用 SIMT 知识、由 ops/ 维护方维护;本技能的 references/ 是生成轨自带的实测语料,
含 Ascend 950PR 的 ISA 探针(11 文件)与三个 pass 模型。两者并存,不互相替代。


三、四处适配

# 内容
1 scripts/check_claim_xrefs.py 补华为 CANN-2.0 许可头(本技能唯一的 .py)
2 两处技能改名:ascendc-docs-search → cake-docs-search、ascendc-code-review → cake-code-review,共 8 个文件,对应本仓已有的改名
3 agent frontmatter 去掉 cakebook(该技能未引入;既有三个 agent 对 cakebook 的引用数均为 0,与之一致)
4 9 个 ISA 探针记录的 verify_cmd 原写探针作者家目录下的绝对路径,该路径下的四个 .sh 既不随本技能分发、CAKE2 上游亦无这些文件。统一替换为 ${PROBE_WORKSPACE},并在 isa_matrix.md 说明这些 verify_cmd 是复现方式的记录、不是可执行指令。绝对路径由 34 处降为 0

四、第三方登记

references/operator_examples/torch_gather_20_20/gather_custom_tiling.h 带 MindStudio 的
Mulan PSL v2 头,为 MindStudio 算子工程生成器的产出。保留其上游声明,并:

  • README.OpenSource 登记该组件(4 → 5),含 Upstream URL 与 License;
  • OAT.xml 增一条 filteritem,豁免 CANN-2.0 头检查(cake filteritem 44 → 45)。

复核:本技能内头 25 行含非华为许可标识的文件共 1 个,被 OAT filteritem 覆盖 1 个。


五、验证

项 结果
绝对路径(/root/、/data0/<user>/、/home/<user>/,放行 /home/developer) 0(适配前 34 处)
凭据形态(cnb_、服务地址) 0
无华为许可头的 .py 0
ruff check(按仓内 .pre-commit-config.yaml 的忽略集) All checks passed
python3 -m py_compile 通过
npm --prefix script test 84 / 84
OAT.xml / README.OpenSource 解析合法
行尾空白与文件末尾 按 .pre-commit-config.yaml 规范化;md 硬换行按 --markdown-linebreak-ext=md 保留
M0.5 git remote -v 无 CAKE2;无 CAKE2 来源提交
likedislike
Pull Request has been successfully merged by CANN-robot.
(Thank you for Junyi's contribution.)
JunyiJunyiCollaborators
Oct 7 Created pull request, commit a2be7b5a
JunyiJunyiCollaborators
Oct 7 Change title to "feat(cake): 导入 SIMT 轨", originally titled "feat(cake): 导入 SIMT 轨(simt-codegen 技能与 cake-partial-simt agent)".
CANN-robotCANN-robotCollaborators
Oct 7 Added label: cann-cla/yes
CANN-robot
CANN-robotCollaborators
Oct 7 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/cannbot ✅ 汤平川, 金炯 (2/2) ✅ 汤平川 (1/1)

💡 Tip:

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

CLA Signature Pass

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

likedislike
Junyi
JunyiCollaborators
Oct 7 Comments:

compile

likedislike
66 messages are collapsed here。 See more
jon_jinjon_jinCollaborators
26 days ago Resolved final issue
jon_jin
jon_jinCollaborators
26 days ago Comments:

/lgtm

likedislike
jon_jin
jon_jinCollaborators
26 days ago Comments:

@xutianze 您好,这笔 SIMT 轨导入(!102,51 文件纯新增技能,含 simt-codegen 技能与 cake-partial-simt agent)此前卡在两处:作者已 rebase 解决合并冲突,目录归属讨论也已按意见闭环(保留本仓 agent/编排部分、知识内容归属已在讨论中说明,详见已 resolve 的行内讨论)。

当前票面缺 lgtm,麻烦您在方便时协同复核这批 SIMT 技能内容;如无问题请补一枚 lgtm,票齐即走收编。 — jon_jin

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