Guides the user through designing CATLASS operators for Ascend NPUs: analyzing requirements, reading the catlass repository, selecting components, and producing a structured design document.
Ships in external-gitcode-ascend-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.
Read when SKILL.md points to them.
需求分析 → 阅读 catlass 仓库 → 组件选型 → 输出设计文档
| 检查项 | 说明 |
|---|---|
| catlass 仓库 | 须在 OPS_PROJECT_ROOT 下可访问 catlass/(含 include/、examples/) |
| 必读参考 | 设计前必须阅读本 skill 的 references/ 文件 |
| 文件 | 用途 |
|---|---|
| design-document.md | 设计文档模板 |
| matmul-templates.md | 模板清单与选型指南 |
| epilogue-components.md | Epilogue 组件分类与组合模式 |
| custom-epilogue.md | 自定义 Epilogue 契约 |
op_name(snake_case)必须包含子串 catlass,例如:catlass_matmul_add、catlass_fused_gemm_biasmatmul_add、gemm_add)CatlassMatmulAdd、ops/catlass_matmul_add/NEVER:使用不含 catlass 的算子名定稿设计;把 example 整份照抄;设计文档中写大量代码块;在信息不足时臆测需求
ALWAYS:算子名含 catlass,目录名与类名一致映射;条件不明则追问;设计前存在 catlass 仓库并阅读其文档与代码;设计文档用选型表格描述组件
用户可能直接说出需求,也可能不说。执行本 skill 时:若认为信息不足,则继续追问。
需确认的信息:op_name(须含 catlass)、功能要点、I/O 与 dtype、布局、目标 SoC、参考 example(如有)、约束条件。
op_name:须含 catlassexamples/、include/ 下的文档与代码examples/ 中按功能找相似示例,在设计文档中写明:选中的 example 路径、选型理由catlass/include/catlass/epilogue/tile/ 中检索;无现成 Tile 时按 custom-epilogue.md 先写设计契约选型结果用概念表格记录在设计文档中,不写代码。
设计文档须显式写出选型表格:ArchTag、BlockMmad(L1/L0 TileShape、数据类型)、BlockEpilogue(各环节 Tile/Block 组件)、BlockScheduler、Kernel 类型。
设计文档须为独立 Markdown 文件,命名建议 design_<op_name>.md,存放于 USER_OP_PROJECT 或用户指定路径。
catlass,snake_case 目录名与 CamelCase 类名一致| 文件 | 用途 |
|---|---|
| design-document.md | 设计文档模板与章节规范 |
| matmul-templates.md | 模板清单与选型指南 |
| epilogue-components.md | Epilogue 组件分类与选型 |
| custom-epilogue.md | 自定义 Tile Epilogue 的设计契约 |
| catlass/examples/ | 开发形式与多种模板参考 |
| catlass/docs/3_API/gemm_api.md | Gemm API 分层模型、组件对照表 |
references/aicore-ascendc-constraints.md (opens in a new tab)references/custom-epilogue.md (opens in a new tab)references/design-document.md (opens in a new tab)references/epilogue-components.md (opens in a new tab)references/matmul-templates.md (opens in a new tab)references/requirements.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
catlass, ascend-operator, operator-design, ai-accelerator, npu
/external-gitcode-ascend-skills:external-gitcode-ascend-catlass-operator-designfrom external-gitcode-ascend-skills
npx claudepluginhub ascend-ai-coding/awesome-ascend-skills --plugin external-gitcode-ascend-skills91 skills in this plugin
/external-gitcode-ascend-analyse-coverage分析测试覆盖率盲区,生成覆盖率分析报告/external-gitcode-ascend-arxiv-recommendation-npu自动化推荐系统论文发现流水线。抓取 arxiv 推荐论文,检测源码,生成待迁移任务清单,由 npu-model-migration skill 完成 NPU 适配。/external-gitcode-ascend-ascendc-operator-code-gen根据设计文档生成 AscendC 算子完整代码实现并完成框架适配。TRIGGER when: 设计文档已完成,需要生成 op_host/op_kernel 代码、注册到 PyTorch 框架、编译测试。关键词:代码生成、op_host、op_kernel、tiling、kernel、框架适配、算子注册。Other plugins' skills for the same job