已关闭
[Documentation|文档反馈]: add skill for reg ascir #183
zqmin创建于 7月14日关闭于 7月14日
7月14日 添加了label:documentation
wangmingming
7月14日 评论:
7月14日 评论:
分析处理中


7月14日 将 gcw_WTfSfUy7 设为负责人
7月14日 issue状态由 进行中 改变为 已完成
7月14日 关闭了 issue
7月14日 修改了issue 的描述
7月16日 添加了label:resolved
Document Link(文档链接)
graph-autofusion 项目 ASCIR 注册流程目前缺少统一的、可被 agent 自动触发的操作指引文档。开发者新增/修改 ASCIR 算子时,容易遗漏 regbase 构建注册、ATT、Codegen、Python 暴露、性能模型、UT/ST/E2E、打包和上板故障诊断中的某些环节。
Issues Section(问题文档片段)
ASCIR 注册涉及完整修改面,包含但不限于:
*_reg_base.h生成、ascendc_reg_base_api_register.cpp)LoadApiHeaderFiles/IncludeApiHeaderFiles、tmp buffer、dtype 转换、节点校验)REG_ASC_IR、Input/Output/Attr/ComputeType/Impl/dtype map)ascir_api_perf_v2.cpp)pyascir.h的REGISTERED_OPS、pyascir.cpp的 IR Attr 绑定、ascir_api.py易用 API)run_autofuse_test.sh入口)当前没有一份文档将这些环节整合为可按步骤执行、可按矩阵检查的指引,导致每次新增/修改 ASCIR 都需要重复踩坑(如 regbase 内部 include 残留、官方 AscendC API 头缺失、Python
IrAttr属性未绑定、Device 编译选项未分离等)。Existing Issues(存在的问题)
LoadApiHeaderFiles()(项目内 regbase 头)与IncludeApiHeaderFiles()(CANN 官方头)容易混用或遗漏,只在真实 Device 编译时才暴露。#include "helper.h"残留会导致 Device 编译报file not found,缺少明确处理规则。IrAttr属性(如 ShiftedChebyshev 的n)未绑定会在上板构图阶段报IrAttr object has no attribute,C++ E2E 无法覆盖。acl/acl.h、helper.h file not found、ERFC/Lgamma undeclared、out of scbzi imm range、undefined symbol等)缺少分阶段诊断表。期望的文档改进
新增
af-reg-ascirSkill(.claude/skills/af-reg-ascir/),作为 agent 可自动触发的操作指引,包含:IncludeApiHeaderFiles强制判定 → tmp buffer → 注册 → 周边注册 → 测试)关联 PR:https://gitcode.com/cann/graph-autofusion/pull/1281