Loading...
Loading...
根据CATLASS算子设计文档生成算子工程交付件
npx skill4agent add ascend/agent-skills catlass-operator-code-gen设计文档解析 → Catlass 实现参考选型 → op_host 生成 → op_kernel 生成 → test_aclnn 生成 → 质量验证| 章节 | 必须遵守内容 | 验证方式 |
|---|---|---|
| 算子名 | 含 | 目录、OpDef、test_aclnn 命名一致 |
| I/O 与 dtype | 输入输出 shape、dtype、format | OpDef 与 test_aclnn tensor 一致 |
| 核心组件 | ArchTag、BlockMmad、BlockEpilogue、BlockScheduler、Kernel 类型 | op_kernel 与 custom-epilogue.md 一致 |
| 参考 example | 指定的 catlass example 路径与选型理由 | 实现与选型一致(非整份粘贴) |
| TilingKey | 各分支对应 dtype/转置等 | Host |
| Workspace | 固定写法 | 见 kernel-rules.md |
| 检查项 | 说明 |
|---|---|
| 设计文档 | 含算子名、I/O、dtype、转置、参考 example、Kernel/Block/Epilogue |
| 工程 | |
| Catlass | |
catlass/examples/ops/TILING_KEY_ISOPS_PROJECT_ROOTbash build.sh --genop=ops/<op_name>ascendc_config.json*_tiling.h*_tiling.cpp*_def.cpp*_infershape.cppGET_TILING_DATATILING_KEY_IS#define K_MAX_SHAPE_DIM 0#includeexamples/test_aclnn_<op_name>.cpp--genopIMPL_OP_*SetTilingSetInferShapecatlassifDeviceGemm#includeascendc_config.jsonascendc_config.json--pkg| 文件 | 内容 |
|---|---|
| compile-options.md | 编译选项配置 |
| code-structure.md | 目录树、文件职责索引 |
| example-rules.md | test_aclnn 写法 |
| tiling-rules.md | tiling.h / tiling.cpp |
| def-rules.md | def.cpp |
| infershape-rules.md | infershape.cpp |
| kernel-rules.md | Catlass 依赖与 Device 调用 |
| custom-epilogue.md | 自定义 Tile Epilogue |
| 文档/目录 | 用途 |
|---|---|
| catlass/examples/advanced/basic_matmul_aclnn | 工程化 op_host / op_kernel / 测试组织对照 |
| catlass/examples/03_matmul_add | MatmulEpilogue + BlockEpilogue 组合参考 |
| ascendc-operator-compile-debug | 编译、安装、跑示例 |
| catlass-operator-design | 设计文档 |