Closed
[Documentation|文档反馈]: aclnnInplaceAddRmsNorm 错误码表未声明 rank/shape/rstdOut 维度/epsilon 违约时的返回码 #7407
liuhanwen8Add on 26 days agoClosed at 6 days ago
26 days ago Added label: documentation
yuning_chen
26 days ago Comments:
26 days ago Comments:
初步分析
感谢反馈。
现象理解:
aclnnInplaceAddRmsNorm 错误码表仅列 161001/161002(dtype);rank/shape/rstdOut/epsilon 违约实测多为 561002 等内部码,资料未声明。
当前判断:初步判断,待复现确认。
偏文档完整性问题,也暴露 shape/epsilon 类校验落在 tiling 层。建议错误码表补齐约束对应返回码,或把校验前移到首段 161002。
涉及范围:
norm/inplace_add_rms_norm 文档与 host 校验。
下一步:
按参数表约束补错误码表;评估将 rank/shape/epsilon 校验前移并统一对外码。


25 days ago Assign liujie12345678 as responsible person
yuning_chen
25 days ago Comments:
25 days ago Comments:
您好,问题已收到,当前 @liujie12345678 正在处理中。


25 days ago Assign liuyun_nj as responsible person
25 days ago Assign gitee-duhuiping as responsible person
25 days ago Removed responsible person liujie12345678
18 days ago Removed responsible person gitee-duhuiping
18 days ago Assign gitee-duhuiping as responsible person, remove original responsible person: liuyun_nj
18 days ago Assign gitee-duhuiping as responsible person, remove original responsible person: liuyun_nj
11 days ago Associated pull request
6 days ago Assign liuyun_nj as responsible person
6 days ago changed custom state from 进行中 to 已完成
6 days ago Close issue
3 days ago Assign chenjiayi_ as responsible person
chenjiayi_
3 days ago Comments:
3 days ago Comments:
补充说明本问题的后续处理:
已修复并随关联 PR 合入。
处理结果:
- !14221:fix issue,add md doc,add check shape
验证:
- 关联 PR(2026-11-13)已合入,变更可从 PR 记录追溯。
- 本次以 PR 记录与 issue 讨论核对为主,未重新执行复现或真机验证。
说明:合入分支与版本以 PR 记录为准;如仍有问题,请重新提 issue 并附版本、shape 与日志。
如果还有后续需要,请重新提 issue。


1 day ago Removed responsible person chenjiayi_
Document Link(文档链接)
norm/inplace_add_rms_norm/docs/aclnnInplaceAddRmsNorm.md(仓内路径;aclnnInplaceAddRmsNormGetWorkspaceSize→ 「返回值」小节)Issues Section(问题文档片段)
「返回值」错误码表(原文,
aclnnInplaceAddRmsNorm.md:169-194)只有两行:而同文件参数表里显式声明了下列约束(原文摘录):
Existing Issues(存在的问题)
x1Refrank=0561002(ACLNN_ERR_INNER_TILING_ERROR)gamma尾维比x1Ref尾维少 1561002rstdOutrank 比x1Ref少一维561002rstdOut尾维不为 1561002rstdOut前缀维与x1Ref不符561002rstdOut元素数偏多561002epsilon=-1e-6561002rstdOut元素数为 0361001(ACLNN_ERR_RUNTIME_ERROR)(对照:
fp64/int8/int32/int64/bool与混合 dtype 均正确返回161002,所以缺的只是 shape/rank/epsilon 这一族。)复现脚本
下面是自包含的文本断言脚本(只用标准库,离线可跑):把资料原文读出来,比对「参数表声明的约束」与「错误码表覆盖的场景」,缺一项即判缺陷。
复现脚本
import re import sys path = sys.argv[1] if len(sys.argv) > 1 else "norm/inplace_add_rms_norm/docs/aclnnInplaceAddRmsNorm.md" text = open(path, encoding="utf-8").read() rows = re.findall(r"<td[^>]*>\s*(ACLNN_ERR_[A-Z_]+)\s*</td>\s*" r"<td[^>]*>\s*(\d{5,6})\s*</td>\s*<td[^>]*>(.*?)</td>", text, re.S) if not rows: print("[SKIP] 没解析到错误码表") sys.exit(2) codes = {c: re.sub(r"<[^>]+>", "", d).strip() for _, c, d in rows} desc = " ".join(codes.values()) print("[INFO] 错误码表:%s" % sorted(codes)) print("[INFO] 描述正文:%s" % desc) need = [ ("rank 1-8 约束", bool(re.search(r"<td>\s*1-8\s*</td>", text)), r"维度数|rank|维数"), ("rstdOut 维度关系", "维度数与`x1Ref`保持一致" in text, r"shape|形状|维度"), ("x2Ref 与 x1Ref 形状一致", "shape需要与`x1Ref`保持一致" in text, r"shape|形状"), ("epsilon 取值约束", "建议值为1e-6" in text, r"epsilon|eps"), ] missing = [] for name, declared, pat in need: covered = bool(re.search(pat, desc, re.I)) print("[INFO] %-28s 资料有约束=%s 码表覆盖=%s" % (name, "是" if declared else "否", "是" if covered else "否")) if declared and not covered: missing.append(name) if missing: print("[DEFECT] 参数表声明了 %d 类约束,错误码表只覆盖空指针与 dtype 越界:" % len(missing)) for m in missing: print("[DEFECT] - %s" % m) print("[DEFECT] 实测违反这些约束返回 561002 / 361001,均不在本资料码表内") sys.exit(1) print("[OK] 错误码表覆盖了资料显式声明的全部约束")实测输出(rc=1,即缺陷成立):
建议
在「返回值」错误码表的
ACLNN_ERR_PARAM_INVALID / 161002行下补齐子项(与该仓其他算子资料的rowspan多子项写法一致),至少覆盖:561002)。