用途:在 ascend-kernel 上编排 Catlass 算子从零到生产可用的开发流程,通用能力复用 ascendc-* 子技能,Catlass 专属部分使用 catlass-* 子技能。
主要能力:六阶段串行工作流——工程初始化(含 Catlass 源码)→ 设计文档 → 代码生成与编译测试 → 接口文档 → 精度评估 → 性能评测;阶段门控,前一阶段检查点全部通过才进入下一阶段;设计驱动编码,代码生成依赖 catlass-operator-design 定稿的 design.md 与 catlass/examples 选型;精度需 ≥30 例,性能需 torch_npu.profiler 对比评测。
使用方式:先确认 CANN 路径与 Conda 环境,算子名 op_name(snake_case)必须包含子串 catlass。Phase 1 调用 ascendc-operator-project-init 创建骨架,并在工程根执行 git clone https://gitcode.com/cann/catlass.git catlass(禁止在 csrc/ops/<op_name>/ 内克隆);Phase 2 调用 catlass-operator-design 生成 design.md;Phase 3 调用 catlass-operator-code-gen,其阶段 5 调用 ascendc-operator-compile-debug;Phase 4 调用 ascendc-operator-doc-gen;Phase 5 调用 ascendc-operator-precision-eval;Phase 6 调用 ascendc-operator-performance-eval。交付后可选 catlass-operator-performance-optim,改代码后须从 Phase 3 起复跑。
限制:各阶段必须遵循对应子 skill,不得自行替代实现或跳过阶段;编译需 BUILD_CATLASS_MODULE=ON、CATLASS_ARCH 与芯片一致;pytest/torch_npu 报 ASCEND_RUNTIME_PATH 时需 export ASCEND_RUNTIME_PATH="${ASCEND_TOOLKIT_HOME}/runtime";因环境或依赖无法继续时应说明原因并停止。具体价格、平台支持范围等资料暂未提供。