Pull Request已成功合入, 合并人@CANN-robot
(感谢 yuning_chen 的贡献)变更摘要
本 PR 为纯文档/注释类改动,未修改算子接口、数据结构或运行逻辑,主要统一各算子原型头文件(*_proto.h)及 common/inc/op_graph/op_nn_proto_extend.h、common/stub/op_graph/math_proto_stub.cpp 中描述的产品名称表述。改动将原本冗长或分散的产品命名收敛为统一术语:Ascend 950 AI Processor、Ascend 950PR/Ascend 950DT、Ascend950PR/Ascend950DT、npuaArch 3510 AI Processor 等统一为 Ascend 950PR&950DT products;Atlas A2 Training Series Product/Atlas 800I A2 Inference Product/A200I A2 Box Heterogeneous Component 收敛为 Atlas A2 products,Atlas A3 Training Series Product/Atlas A3 Inference Series Product 收敛为 Atlas A3 products,Atlas Inference Series Product 与 Atlas Training Series Product 分别改为 Atlas inference products、Atlas training products,同时删除部分已不适用的精度约束说明。
主要改动
- 统一 Ascend 950 系列产品命名:将
activation、conv、matmul、pooling、norm、index、quant等目录下大量*_proto.h中的Ascend 950 AI Processor、Ascend 950PR/Ascend 950DT、Ascend950PR/Ascend950DT、Ascend 910_95 AI Processor等表述统一替换为Ascend 950PR&950DT products,涉及数据类型、格式、shape 范围等约束描述的措辞。 - 统一 Atlas 产品系列命名:将
Atlas A2 Training Series Product/Atlas 800I A2 Inference Product/A200I A2 Box Heterogeneous Component简化为Atlas A2 products,Atlas A3 Training Series Product/Atlas A3 Inference Series Product简化为Atlas A3 products,Atlas Inference Series Product、Atlas Training Series Product分别改为Atlas inference products、Atlas training products,出现在conv3d_v2、quant_batch_matmul_v3、avg_pool3_d_grad、trans_quant_param_v2、dynamic_rnnv2等算子说明中。 - 移除部分精度约束说明:删除
BNTrainingUpdate、GNTrainingUpdate、BatchNorm3D、BNInfer、BNTrainingUpdateV2/V3、InferV2等算子的「Atlas 200/300/500 Inference Product因平方根指令导致精度不达标」类注释,并同步删除对应的@attention Constraints段。 - 清理描述标记与格式:将
softmax_focal_loss、non_zero_with_value、quant_batch_matmul_v3等文件中的<term>...</term>标签去除,仅保留产品名称文本,并整理因命名替换产生的多余换行。 - 个别产品命名细化调整:如
rotate_quant_proto.h中将Atlas A5 Series Products改为Ascend 950PR&950DT products,map_index_proto.h中将Ascend 910_95 AI Processor改为Ascend 950PR&950DT products,avg_pool3_d_grad_proto.h中将Ascend950PR/Ascend950DT改为Ascend 950PR&950DT products。


compile


Thanks for your pull-request.
The full list of commands accepted by me can be found at here.
You can get sig-info at here.
You can self-configure the PR merge rules for this repository. For more details, please refer to Here.
For more, you also can visit HICANN.
PR Approval Progress
✅ Congratulations! All modules have met the lgtm and approve requirements.
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| 9.2.0 | ✅ 陈展熹, 陈娇 (2/2) | ✅ 陈娇 (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
yolic, thanks for your pull request. All authors of the commits have signed the CLA. 👍


| 🚀 CI 流水线已启动 |
|---|
| 📋 执行详情: 点击查看流水线 |


流水线失败分析报告
流水线: run 2020bfe30ba5442fb67e2a5db6b083eb | PR #11179 | 失败时间 2026-09-24 12:07 | 失败 Job:
CodeCheck_precommit(1/40)
定界结论: 代码问题 / 代码检查错误(pre-commit 格式检查) — 置信度: 高
| 项目 | 内容 |
|---|---|
| 失败类型 | 代码问题(代码检查错误) |
| 失败 Job | CodeCheck_precommit(JOB_codecheck_5), 时长 41s(12:07:15~12:07:56), 失败步骤 3_precommit |
| 根因 | PR 变更文件存在两处格式不规范: ① 65 个文件不符合 clang-format 规范; ② 24 个 *_proto.h 文件末尾换行符不符合 end-of-file-fixer 要求。两个 hook 均报 Failed 并自动改写文件, precommit.py 以 exit code=1 退出 |
| 处置 | 提交者本地执行 pre-commit 修复后重新推送, 重触发流水线 |
判定依据: pre-commit 仅对 PR 变更文件列表执行(日志: cat pr_filelist_precommit.txt | ... | xargs pre-commit run --files), 被 Fixing/Formatting 的文件全部来自本 PR 变更, 格式问题由提交代码引入, 非环境/平台问题。其余 hook(trim trailing whitespace / check for merge conflicts / detect private key / codespell 等)均通过, 排除环境类因素。
排除项: 下游 ut/ST_test_950/PreSmoke_A2/Kirin_PreSmoke/API_Check 等 Job 处于 INIT 未启动, 属门禁失败的级联结果, 非独立失败; 2 个 Compile_Ascend_experimental 编译 Job 仍在 RUNNING, 与本次失败无关。
日志证据(节选自失败 Job 的 3_precommit.log)
[2026-09-24 12:07:33.686+08:00] fix end of files.........................................................Failed
[2026-09-24 12:07:33.687+08:00] - hook id: end-of-file-fixer
[2026-09-24 12:07:33.688+08:00] - exit code: 1
[2026-09-24 12:07:33.689+08:00] - files were modified by this hook
[2026-09-24 12:07:33.692+08:00] Fixing matmul/batch_mat_mul_v3/op_graph/batch_mat_mul_v3_proto.h
[2026-09-24 12:07:33.693+08:00] Fixing loss/l1_loss_grad/op_graph/l1_loss_grad_proto.h
...(共 24 个 *_proto.h 被修复)
[2026-09-24 12:07:33.726+08:00] clang-format.............................................................Failed
[2026-09-24 12:07:33.727+08:00] - hook id: clang-format
[2026-09-24 12:07:33.728+08:00] - files were modified by this hook
[2026-09-24 12:07:33.731+08:00] Formatting [1/4] pooling/adaptive_avg_pool3d_grad/op_graph/adaptive_avg_pool3d_grad_proto.h
...(共 65 个文件被格式化)
[2026-09-24 12:07:33.820+08:00] ::error::precommit.py 异常退出: exit code=1, signal=null
代表性影响文件(均在 PR 变更列表内):
- clang-format 不合规(65 个, 主要为各算子目录下
op_graph/*_proto.h):pooling/adaptive_avg_pool3d_grad/op_graph/adaptive_avg_pool3d_grad_proto.h、conv/conv3d_backprop_input_v2/op_graph/conv3d_backprop_input_v2_proto.h、norm/bn_training_update_v2/op_graph/bn_training_update_v2_proto.h、common/inc/op_graph/op_nn_proto_extend.h、common/stub/op_graph/math_proto_stub.cpp等 - 文件末尾换行符不合规(24 个):
matmul/batch_mat_mul_v3/op_graph/batch_mat_mul_v3_proto.h、loss/l1_loss_grad/op_graph/l1_loss_grad_proto.h、activation/softmax_v2/.../softmax_v2_proto.h等(两个 hook 的文件列表有重叠)
影响范围与修复建议
影响范围: 门禁被阻, 下游 UT/ST/冒烟/API_Check Job 均未启动(INIT 级联); 功能性验证(编译/测试)尚未执行到, 本次失败仅为格式问题, 不影响代码逻辑判断。
修复建议(两个失败 hook 均为自动修复型, 无需手工逐文件修改):
- 本地针对本 PR 变更文件执行 pre-commit:
pip3 install "pre-commit>=4.0.0"
pre-commit run --files <本PR变更的 .h/.cpp 文件列表>
- clang-format 与 end-of-file-fixer 会自动改写文件, 确认
git diff中仅格式变化后提交并推送到 PR 源分支, 流水线将自动重触发。 - 本地 pre-commit 环境配置参考: pre-commit 配置指导书(社区贡献者使用 pre-commit 能力)
结构化结论:
{
"repo": "ops-nn",
"run_id": "2020bfe30ba5442fb67e2a5db6b083eb",
"job": "CodeCheck_precommit",
"Failed_Type": "代码问题",
"Failed_Sub_Type": "代码检查错误",
"Failed_Reason": "pre-commit 两个 hook 失败: clang-format(65 个文件被格式化) + end-of-file-fixer(24 个 *_proto.h 被修复), precommit.py exit code=1",
"evidence": "3_precommit.log: clang-format...Failed - files were modified by this hook",
"suggestion": "本地执行 pre-commit run --files 修复格式问题后重新推送并重触发流水线"
}


compile


| 🚀 CI 流水线已启动 |
|---|
| 📋 执行详情: 点击查看流水线 |


流水线分析报告 — ops-nn run#10429
流水线: https://gitcode.com/CANN/ops-nn/actions/runs/697804988a9f4450997b021089a28977 | PR#11179 | 2026-09-24 14:37:17 ~ 2026-09-24 14:43:02 | 失败 Job 1 个
定界结论: 代码问题 / 代码检查错误 — clang-format 格式不符合规范(65 个 op_graph proto.h 文件)
- 失败类型: 代码问题
- 根因: CodeCheck_precommit 中 clang-format hook 不通过, 65 个
*/op_graph/*_proto.h头文件不符合格式规范, 被 hook 就地格式化(files were modified by this hook), 说明 PR 提交的文件未按仓库 clang-format 规范格式化 - 处置建议: 通知 PR 提交者修复 —— 本地对变更文件执行
clang-format -i或pre-commit run clang-format --files <变更文件>, 提交格式化结果后重新触发流水线- 参考链接: 本地执行 pre-commit 指导
- 排除项: 下游
ut/API_Check/PreSmoke_A2/ST_test_950/Kirin_PreSmoke均为 INIT(前置失败级联未启动), 无独立失败; 其余检查(trim trailing whitespace / end of files / codespell / Antipoison / SCA / CodeCheck_style 等)均通过
失败根因分析
根因 #1: 代码问题 / 代码检查错误 — clang-format 格式不符(65 个 op_graph proto.h 文件)
- 判据: pre-commit clang-format hook Failed,
files were modified by this hook - 定位步骤:
3_precommit.log - 影响 Job: CodeCheck_precommit
- 根因证据(日志原文):
[2026-09-24 14:40:40.555+08:00] clang-format.............................................................Failed
[2026-09-24 14:40:40.556+08:00] - hook id: clang-format
[2026-09-24 14:40:40.557+08:00] - files were modified by this hook
[2026-09-24 14:40:40.639+08:00] [py stderr] 2026-09-24 14:40:40,411 - INFO ❌ 存在部分文件格式错误
[2026-09-24 14:40:40.648+08:00] ::error::precommit.py 异常退出: exit code=1, signal=null
- 被格式化的 65 个文件(均为
*/op_graph/*_proto.h, 全部需按 clang-format 规范修复):
activation/fast_gelu/op_graph/fast_gelu_proto.h
activation/ge_glu_grad_v2/op_graph/ge_glu_grad_v2_proto.h
activation/ge_glu_v2/op_graph/ge_glu_v2_proto.h
activation/gelu_grad/op_graph/gelu_grad_proto.h
activation/log_softmax_grad/op_graph/log_softmax_grad_proto.h
activation/log_softmax_v2/op_graph/log_softmax_v2_proto.h
activation/relu_grad_v2/op_graph/relu_grad_v2_proto.h
activation/relu_v2/op_graph/relu_v2_proto.h
activation/softmax_grad/op_graph/softmax_grad_proto.h
activation/softmax_grad_ext/op_graph/softmax_grad_ext_proto.h
activation/softmax_v2/op_graph/softmax_v2_proto.h
common/inc/op_graph/op_nn_proto_extend.h
common/stub/op_graph/math_proto_stub.cpp
conv/conv3d_backprop_filter_v2/op_graph/conv3d_backprop_filter_v2_proto.h
conv/conv3d_backprop_input_v2/op_graph/conv3d_backprop_input_v2_proto.h
conv/conv3d_transpose_v2/op_graph/conv3d_transpose_v2_proto.h
conv/conv3d_v2/op_graph/conv3d_v2_proto.h
conv/extend_conv2d/op_graph/extend_conv2d_proto.h
conv/quant_conv3d/op_graph/quant_conv3d_proto.h
experimental/index/index_fill/op_graph/index_fill_proto.h
index/embedding_dense_grad_v2/op_graph/embedding_dense_grad_v2_proto.h
index/index_fill/op_graph/index_fill_proto.h
index/map_index/op_graph/map_index_proto.h
index/non_zero_with_value/op_graph/non_zero_with_value_proto.h
index/quant_update_scatter/op_graph/quant_update_scatter_proto.h
index/scatter_elements/op_graph/scatter_elements_proto.h
index/scatter_elements_v2/op_graph/scatter_elements_v2_proto.h
index/sparse_to_dense/op_graph/sparse_to_dense_proto.h
loss/l1_loss_grad/op_graph/l1_loss_grad_proto.h
loss/softmax_focal_loss/op_graph/softmax_focal_loss_proto.h
matmul/batch_mat_mul_v3/op_graph/batch_mat_mul_v3_proto.h
matmul/fused_mat_mul/op_graph/fused_mat_mul_proto.h
matmul/mat_mul_v3/op_graph/mat_mul_v3_proto.h
matmul/quant_batch_matmul_v3/op_graph/quant_batch_matmul_v3_proto.h
matmul/quant_matmul_activation_quant/op_graph/quant_matmul_activation_quant_proto.h
matmul/quant_matmul_reduce_sum/op_graph/quant_matmul_reduce_sum_proto.h
matmul/rotate_quant/op_graph/rotate_quant_proto.h
matmul/weight_quant_batch_matmul_v2/op_graph/weight_quant_batch_matmul_v2_proto.h
norm/batch_norm3_d/op_graph/batch_norm3d_proto.h
norm/batch_norm_ext2/op_graph/batch_norm_ext2_proto.h
norm/bn3_d_training_update/op_graph/bn3_d_training_update_proto.h
norm/bn_infer/op_graph/bn_infer_proto.h
norm/bn_inference/op_graph/bn_inference_proto.h
norm/bn_training_update_v2/op_graph/bn_training_update_v2_proto.h
norm/bn_training_update_v3/op_graph/bn_training_update_v3_proto.h
norm/group_norm_silu/op_graph/group_norm_silu_proto.h
norm/in_infer_v2/op_graph/in_infer_v2_proto.h
norm/layer_norm_grad_v3/op_graph/layer_norm_grad_v3_proto.h
pooling/adaptive_avg_pool3d/op_graph/adaptive_avg_pool3d_proto.h
pooling/adaptive_avg_pool3d_grad/op_graph/adaptive_avg_pool3d_grad_proto.h
pooling/avg_pool/op_graph/avg_pool_proto.h
pooling/avg_pool3_d/op_graph/avg_pool3_d_proto.h
pooling/avg_pool3_d_grad/op_graph/avg_pool3_d_grad_proto.h
pooling/avg_pool_grad/op_graph/avg_pool_grad_proto.h
pooling/avg_pool_v2_grad/op_graph/avg_pool_v2_grad_proto.h
pooling/max_pool3_d/op_graph/max_pool3_d_proto.h
pooling/max_pool3d_grad_with_argmax/op_graph/max_pool_grad_with_argmax_v1_proto.h
pooling/max_pool_v3/op_graph/max_pool_proto.h
pooling/max_pool_v3/op_graph/max_pool_v3_proto.h
quant/ascend_quant/op_graph/ascend_quant_proto.h
quant/dequant_swiglu_quant/op_graph/dequant_swiglu_quant_proto.h
quant/dynamic_quant/op_graph/dynamic_quant_proto.h
quant/dynamic_quant_v2/op_graph/dynamic_quant_v2_proto.h
quant/trans_quant_param_v2/op_graph/trans_quant_param_v2_proto.h
rnn/dynamic_rnnv2/op_graph/dynamic_rnnv2_proto.h
由门禁失败定界分析自动生成 | repo: ops-nn | run: 697804988a9f4450997b021089a28977 | PR#11179


compile


| 🚀 CI 流水线已启动 |
|---|
| 📋 执行详情: 点击查看流水线 |


您好,pr合入已准备就绪,请尽快联系committer进行检视,谢谢!


描述
原型注释里的产品名称仍沿用 Series Product、Ascend 950 AI Processor、Ascend 950PR/Ascend 950DT 等旧表述,与当前产品命名不一致。本次只改注释,不改算子接口和计算逻辑。
合入目标:cann/ops-nn 的 9.2.0。
覆盖各算子
op_graph/*_proto.h,以及common/inc/op_graph/op_nn_proto_extend.h、common/stub/op_graph/math_proto_stub.cpp。关联的Issue
关联 Issue #6213(Close #6213)
https://gitcode.com/cann/ops-nn/issues/6213
测试
仅修改原型注释中的产品名称,不涉及算子 host/kernel 计算逻辑,无需算子泛化。已在本地用仓库 pre-commit 的 end-of-file-fixer 与 clang-format 核对格式,且没有改动算子输入、输出和属性定义。
文档更新
更新了 op_graph 原型注释中的产品名称,无独立 markdown 文档。
类型标签
AI/Agent生成声明