Closed
[Bug-Report|缺陷反馈]: ApplyCamePart4 参数声明与二进制配置不一致,参考实现缺少数值域检查 #8118
陈思Add on 17 days agoClosed at 16 days ago
17 days ago Added label: bug-report
17 days ago Assign chensi79 as responsible person
16 days ago Close issue
16 days ago Added label: resolved
Describe the current behavior / 问题描述
ApplyCamePart4 的算子定义、GE 原型与二进制配置存在接口声明不一致:
param/r/c,而修改前的 OpDef 和 ascend350/ascend950 二进制配置分别使用param_in/r_in/c_in、param_out/r_out/c_out。sum_r放在 index 7,但当前 OpDef、GE 原型和 kernel 的顺序是sum_u_r/sum_u_c/sum_u_rc/sum_r(index 7/8/9/10)。rc / denom和平方根。denom <= 0、非有限值或舍入后的 rc 为零/负值时,可能产生 NaN/Inf 并进入精度比较。Environment Information / 环境信息
optim/apply_came_part4。fff6e0f2fcbc5ebac8b03d6a9b230a8f00b33580。Steps to reproduce the issue / 重现步骤
op_graph/apply_came_part4_proto.h、op_host/apply_came_part4_def.cpp和两个平台的apply_came_part4_binary.json,检查输入输出名称及 index 7~10 的输入顺序。beta3=1且sum_r=0,或构造两项抵消使 denom 为零、归一化 rc 非正的输入,检查计算结果是否包含 NaN/Inf。Describe the expected behavior / 预期结果
sum_r、global_shape。Related log / screenshot / 日志 / 截图
源码差异可在关联 PR 的 Files 页面查看。已对本次 5 个变更文件运行仓库 pre-commit,clang-format、ruff check、ruff format、JSON、codespell、OAT 等适用检查均通过;
git diff --check通过。未进行 NPU 上板验证。Special notes for this issue / 备注
修复范围为接口声明、二进制配置、Torch 对照实现及相关注释。kernel 未定义 epsilon/clamp,参考实现通过显式拒绝无效数值域处理边界输入。
关联 PR:https://gitcode.com/cann/ops-nn/pull/13551