Rename an Ascend custom operator end-to-end to a new *Prof name, including opdef, host/kernel, tiling, pybind, autogenerated aclnn wrappers, file and directory names, examples, and git commit/push. Use when user asks to rename operators like NotifyDispatch to NotifyDispatchProf or requests full-chain symbol/path migration.
将 Ascend 自定义算子从旧名(如 NotifyDispatch)改为新名(如 NotifyDispatchProf),并保证以下层面一致:
aclnn_* 导出接口aclnnInner* 调用接口(会随 opdef 变化)当用户提到以下任意场景时使用本技能:
先定位大小写、下划线两种形态:
NotifyDispatchnotify_dispatch重点关注路径:
src/ascend_kernels/**src/pybind/**examples/**src/ascend_kernels/pregen/build_out/autogen/**先在现有文件内改名,避免重命名后漏改。
必须覆盖:
OP_ADD(...) / IMPL_OP_OPTILING(...)notify_dispatch_prof)notify_dispatch_prof)和 C++ 实现函数名aclnn* 导出接口名(如 aclnnNotifyDispatchProf*)按“旧名路径 -> 新名路径”迁移,并同步 include:
notify_dispatch -> notify_dispatch_profnotify_dispatch.* -> notify_dispatch_prof.*NotifyDispatch.json -> NotifyDispatchProf.jsontest_notify_dispatch.py -> test_notify_dispatch_prof.pyaclnn_notify_dispatch.* -> aclnn_notify_dispatch_prof.*aclnn_notify_dispatch_prof.cpp 中,inner 接口通常随 opdef 变更,需显式检查并修正:
aclnnInnerNotifyDispatchGetWorkspaceSize -> aclnnInnerNotifyDispatchProfGetWorkspaceSizeaclnnInnerNotifyDispatch -> aclnnInnerNotifyDispatchProf若只改了外层 aclnnNotifyDispatchProf* 但没改 inner 调用,运行期会出现符号绑定不一致风险。
至少做以下检查:
git status 中仅包含预期改动当用户要求提交时:
git add 本次相关文件,排除无关未跟踪目录可选模板:
rename <OldOp> to <NewOp> across operator stackfix inner <op> prof symbol binding正文建议说明:
TORCH_LIBRARY 中的 schema 名aclnnInner* 调用op 字段