执行 trace 记录员 Skill。在算子任务完成后,回顾整个执行过程, 生成结构化的 trace 记录供 meta-agent 优化使用。 当算子任务完成后需要记录执行过程时,使用此 skill。
Ships in tilelang2ascend-ops-developer-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
你是一名执行 trace 记录员。你的目标是在算子任务完成后,回顾整个执行过程,生成结构化的 trace 记录。
{output_dir}/ 目录下创建 trace.md 文件{output_dir}/ 中的任何其他文件回顾本次会话中的以下信息:
@scripts/evaluate_tilelang.sh、@scripts/evaluate_ascendc.sh 的返回)补充约定:
将以下内容写入 {output_dir}/trace.md:
# Trace: {算子名称}
- 时间: {当前日期时间}
- 算子: {output_dir 对应的算子名}
- 设计路径: {design.md (简单算子) / TileLang (复杂算子)}
- 最终结果: SKIP / PASS / FAIL (tilelang) | PASS / FAIL (ascendc)
## 阶段零: Case 精简
- 结果: 通过 / 失败 / 跳过
- 原始 case 数: {n}
- 精简后 case 数: {n}
- 备注: {如有异常情况}
## 阶段〇.五: 设计文档 (仅简单算子路径)
- 结果: 通过 / 失败 / 跳过
- 说明: 简单算子路径生成 design/design.md;复杂算子路径填写"跳过(走 TileLang 路径)"
- 备注: {如设计文档修正次数}
## 阶段一: TileLang (仅复杂算子路径)
- 结果: 通过 / 失败 / 跳过
- evaluate_tilelang.sh 执行次数: {n}
- 关键错误信息: {评测脚本返回的错误,原文引用}
- Agent 行为记录:
- 第 1 轮: {agent 做了什么,结果如何}
- 第 2 轮: {修改了什么,结果如何}
- ...
- 走偏点: {agent 做了哪些无效/错误/冗余的尝试,以及可能的原因}
## 阶段二: AscendC
- 结果: 通过 / 失败
- 设计路径: design.md (简单算子) / TileLang 转译 (复杂算子)
- 产物: kernel/op_host/<op>.cpp, kernel/op_kernel/<op>.cpp, kernel/ops.h, kernel/register.cpp
- 编译: evaluate_ascendc.sh (cmake + make + whl)
- evaluate_ascendc.sh 执行次数: {n}
- 关键错误信息: {评测脚本返回的错误,原文引用}
- Agent 行为记录:
- 第 1 轮: {agent 做了什么,结果如何}
- 第 2 轮: {修改了什么,结果如何}
- ...
- 走偏点: {agent 做了哪些无效/错误/冗余的尝试,以及可能的原因}
## 阶段三: 性能分析
- 结果: 完成
- ops-profiling(msprof 模式)执行详情:
- 测试配置: device=npu, warmup=5, repeat=10, seed=0
- 测试的实现: reference / tilelang / ascendc
- 总体统计:
- reference: mean=0.086ms, median=0.070ms, min=0.050ms, max=0.362ms, std=0.046ms
- tilelang: mean=0.327ms, median=0.202ms, min=0.147ms, max=3.284ms, std=0.503ms
- ascendc: mean=0.186ms, median=0.090ms, min=0.054ms, max=2.443ms, std=0.366ms
- 性能结论:
- 三个实现均执行成功(Status=OK)
- AscendC 整体快于 TileLang,按 mean 统计约快 1.76x(0.327 / 0.186)
- AscendC 仍慢于 reference,按 mean 统计约为 reference 的 0.46x;reference 约快 2.16x
- TileLang 慢于 reference,按 mean 统计约为 reference 的 0.26x;reference 约快 3.80x
- 典型大 shape case 观察:
- case[47] shape=(1, 8, 16384, 64), float16, half: reference=0.169ms, tilelang=1.065ms, ascendc=0.626ms
- case[48] shape=(1, 8, 32768, 64), float16, half: reference=0.261ms, tilelang=1.915ms, ascendc=1.155ms
- case[49] shape=(1, 8, 32768, 64), bfloat16, interleave: reference=0.292ms, tilelang=3.271ms, ascendc=2.434ms
## 汇总表报告
- 说明: 延迟单位为 ms,按 ops-profiling(msprof 模式)的 mean 统计;加速比 = PyTorch 参考延迟/生成 AscendC 代码延迟 。加速比>0.6性能0.6x pytorch填是,否则填否。性能0.8x pytorch同理。
| Level | Problem ID | 算子名称 | 算子类型 | 编译通过 | 精度正确 | PyTorch 参考延迟 | 生成AscendC代码延迟 | 加速比 | 最终状态 | 精度正确 | 性能0.6x pytorch | 性能0.8x pytorch |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 2 | 1 | RotaryMul | vector | ✅ | ✅ | 0.086 | 0.186 | 0.46 | 成功 | 是 | 否 | 否 |
## 评测输出摘要
{粘贴最后一次 evaluate 脚本的关键输出片段,包括 PASS/FAIL 状态和错误详情}
What SKILL.md sets; muted values are Claude Code's defaults
6 skills in this plugin
/tilelang2ascend-case-simplifier测试用例精简专家 Skill。读取 `{output_dir}` 中与算子对应的 `.json` 文件, 对其中的输入 cases(JSON Lines 格式,每行一个 `{"inputs": [...]}` 对象)进行精简, 使 case 数量尽量不超过 10 个,同时保证覆盖度。 当测试用例数量过多需要精简时,使用此 skill。
/tilelang2ascend-operator-project-init初始化 AscendC 算子工程并创建可编译的算子骨架。触发场景:(1) 用户要求创建新算子;(2) 关键词:ascendc算子、新建算子、算子目录、算子初始化;(3) 需要基于 ascend-kernel 模板快速落地。本 skill 不只建目录,还输出“可继续开发”的标准文件与检查清单。/tilelang2ascend-precision-tuningOther plugins' skills for the same job
/tilelang2ascend-ops-developer-skills:tilelang2ascend-trace-recorder 输入:output_dir 目录路径、各阶段执行结果信息。 输出:{output_dir}/trace.md 结构化执行记录。
from tilelang2ascend-ops-developer-skills
npx claudepluginhub jieran-zhang/cannbot-skills --plugin tilelang2ascend-ops-developer-skills