Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By catman626v0.1.1CANN-2.0In 1 marketplace
CAKE2 - Collaborative Ascend Kernel Evolution. AI-powered AscendC operator generation for Ascend NPU.
Claude hands work to one, or you mention it with @.
1 caution to review before installing
A hook runs when Claude uses the Bash tool
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
CAKE2 (Collaborative Agent Kernel Evolution 2) 是一个用于昇腾(Ascend)NPU 算子开发的进化式Agent系统。它提供了一套完整的流程,从算子描述生成到最终的AscendC代码实现和评估,并支持通过进化算法自动优化内核性能。
# 在 Claude Code 中注册 cannbot marketplace(CAKE2 作为社区插件 cake 合入其中)
/plugin marketplace add https://gitcode.com/cann/cannbot-skills.git
# 安装 cake 插件
/plugin install cake@cannbot
# 安装后直接以 agent 启动
claude --agent cake:cake
claude --agent cake:cake-evo
Marketplace 是 Claude Code 的插件分发机制。CAKE2 作为 cake 插件登记在 cannbot 仓库根的 .claude-plugin/marketplace.json 中,使用 /plugin marketplace add 注册该 marketplace 后即可安装。
# 从本地路径临时加载(不写入配置)
claude --plugin-dir /path/to/cake2
# 直接以特定 agent 启动
claude --plugin-dir /path/to/cake2 --agent cake:cake
claude --plugin-dir /path/to/cake2 --agent cake:cake-evo
# 可用 agent:
# cake - 标准算子生成
# cake-evo - 进化式多变体优化
# cake-partial - 部分流程生成(DSL → 评估)
# 命令行直接指定 agent 启动
claude --agent cake
# 或进入 Claude Code 后:
# 输入 /agents 选择 agent
# 或直接在对话中请求,如 "用 cake agent 生成一个 Softmax 算子"
读取 docs/SinkhornKnopp 中的算子描述, 生成 SinkhornKnoppCustom 算子。
读取 docs/MoeInitRouting 中的算子描述, 进化生成 MoeInitRoutingCustom 算子,最大轮数 2,每轮并行数 2,目标加速比 2x 相对于 PyTorch 小算子 eager 实现。
本项目旨在简化昇腾NPU自定义算子的开发流程,通过自动化的方式将算子描述转换为可在昇腾NPU上运行的高性能算子实现。
主要功能包括:
需要完整的 CANN + Ascend NPU 环境(无 CPU-only 模式,不支持 macOS/Windows):
| 组件 | 要求 | 说明 |
|---|---|---|
| Ascend NPU | 910B,已装 driver(npu-smi 可用) | 编译 / 精度 / 性能评测必需 |
| CANN | >= 8.3.RC1(在 8.5.0 上验证) | 提供 msopgen / msprof / acl 等工具链 |
| Python | >= 3.10 | |
| PyTorch + torch_npu | 二者及 CANN 三者版本需匹配(验证组合:torch 2.9.0 + torch_npu 2.9.0 + CANN 8.5.0) | torch_npu 由昇腾环境提供,需按 CANN 版本选对应 wheel,非 PyPI 通用分发 |
| Node.js + Claude Code | Node 20+,npm i -g @anthropic-ai/claude-code | 运行本插件的宿主 |
| tilelang-ascend / torchair | (可选,源码构建) | 仅 TileLang DSL / torch.compile 图模式需要 |
创建隔离的 Python 虚拟环境(conda/uv/venv)后,安装纯 Python 依赖:
pip install -r requirements.txt
# 再安装与你的 CANN 版本匹配的 torch / torch_npu(见上表)
注意: 该工具在使用过程中会安装custom-ops.whl进行测试, 多人环境下会造成冲突,导致算子生成失败。因此必须使用隔离的python环境(例如,使用conda创建)。
本地没有 NPU 硬件时,可以通过 SSH 连接远程 NPU 服务器进行编译和测试:
# 1. 配置远程连接
cp ${CLAUDE_SKILL_DIR}/scripts/npus.example.yaml .npus.yaml
# 编辑 .npus.yaml 配置 remotes(docker / hdspace 后端均支持)
# 2. 探测远程平台信息
uv run ${CLAUDE_SKILL_DIR}/scripts/npu.py exec <target> info
Agent 启动时会自动检测环境模式(本地/远程),详见 skills/remote-cann-development/ 。
claude --plugin-dir /path/to/cake2
打开 Claude Code 后输入 /agents 选择 cake agent,然后描述算子需求即可。
./cake.run
会在当前目录下生成output/{op_name}文件夹,生成产物如下:
output/
└── {op_name}/
├── {op_name}_op_desc.json # 算子描述
├── {op_name}_reference.py # PyTorch参考实现
├── {op_name}_functional.py # 函数式API实现
├── {op_name}_dsl.py # DSL基线代码
├── {op_name}_project.json # 项目配置
├── {op_name}.cpp # Python绑定代码
└── {op_name}Custom/ # AscendC项目目录
npx claudepluginhub catman626/cannbot-skills --plugin cakeBuilt from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
Plugins from other owners that cover similar ground