用途:在 ascend-kernel 上编排 Catlass 算子从零到生产可用的开发流程,采用六阶段串行工作流,每阶段必须打开并遵循对应子 skill,前一阶段检查点全部通过后才进入下一阶段。
主要能力与流程:Phase 0 需求收集,确认 CANN 路径、Conda 环境、算子名(snake_case 且必须含 catlass)与功能描述;Phase 1 工程初始化,调用 ascendc-operator-project-init 生成 csrc/ops/<op_name>/ 骨架,并在工程根克隆 Catlass 源码(git clone https://gitcode.com/cann/catlass.git catlass,禁止在算子目录内克隆);Phase 2 由 catlass-operator-design 生成并落盘 design.md;Phase 3 由 catlass-operator-code-gen 落地 op_host/op_kernel 与框架适配,并内部调用 ascendc-operator-compile-debug 完成编译安装与基础测试;Phase 4 由 ascendc-operator-doc-gen 生成 PyTorch 风格中文 README.md;Phase 5 由 ascendc-operator-precision-eval 完成 ≥30 例精度评估;Phase 6 由 ascendc-operator-performance-eval 用 torch_npu.profiler(warmup=5、active=5)输出对比性能报告。交付后可选 catlass-operator-performance-optim 做 tiling 调优,改代码须从 Phase 3 起复跑。
使用方式:按阶段门控执行,关键结果需在聊天界面以 Markdown 展示,不能只给路径。编译注意 BUILD_CATLASS_MODULE=ON、CATLASS_ARCH 与芯片一致;pytest 报 ASCEND_RUNTIME_PATH 时执行 export ASCEND_RUNTIME_PATH="${ASCEND_TOOLKIT_HOME}/runtime"。
限制:环境或依赖无法继续时应说明原因并停机;不得跳过设计、文档、精度、性能阶段,不得自行替代子 skill 实现,不得引用不存在的 skill。