Closed
[Documentation|文档反馈]: aclnnFlatQuantV3 资料 161002 错误码表子项重复(L363/L366 逐字相同) #7345
liuhanwen8Add on 27 days agoClosed at 16 days ago
27 days ago Added label: documentation
yuning_chen
26 days ago Comments:
26 days ago Comments:
25 days ago Assign liujie12345678 as responsible person
yuning_chen
25 days ago Comments:
25 days ago Comments:
您好,问题已收到,当前 @liujie12345678 正在处理中。


25 days ago Assign gitee-duhuiping as responsible person
25 days ago Removed responsible person liujie12345678
16 days ago Close issue
16 days ago Added label: resolved
chenjiayi_
11 days ago Comments:
11 days ago Comments:
补充说明本问题的修复结果:
结论:已删除 161002 错误码表中的重复子项,rowspan 由 13 改为 12。
修复内容(文件/函数):
matmul/flat_quant/docs/aclnnFlatQuantV3.md:330-331:ACLNN_ERR_PARAM_INVALID/161002两列的rowspan由13改为12。- 同文件原 L366:删除与 L363 逐字重复的子项「out的数据类型为INT32时,x的shape尾轴不是out的shape尾轴大小的8倍,或者x与out的shape的非尾轴的大小不一致。」
matmul/flat_quant/docs/aclnnFlatQuantV3_en.md:同步修改英文表述。
验证:
- 静态核对:修改后该表共 12 个子项,无逐字重复,
rowspan与子项条数一致;INT32 出参的两条约束已合并到同一行描述中,与 INT4 那一行的写法对称。 - 本次仅改文档,不涉及代码与返回码。
该 issue 已随修复合入关闭。


现象
matmul/flat_quant/docs/aclnnFlatQuantV3.md的「返回值」小节中,161002(ACLNN_ERR_PARAM_INVALID)错误码表声明rowspan="13",表中确有 13 个子项,但其中第 11、12 个子项(L363、L366)的描述逐字相同:同一段文字在表内出现两次,13 个子项实际只有 12 条不同约束,有一条约束缺少描述。
期望
错误码表每一行描述一条独立约束,不出现逐字重复的行;
rowspan与实际子项条数一致。环境
cann/ops-nn,origin/master=b1feeebbd174622298e8a7bb2509b2abc1441915(资料 blob1ab0696)matmul/flat_quant/docs/aclnnFlatQuantV3.md(L330–L371 为该表)aclnnFlatQuantV3复现步骤
git clone https://gitcode.com/cann/ops-nn.git && cd ops-nngit checkout b1feeebrepro_dup_row.pypython3 repro_dup_row.py .复现脚本
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """aclnnFlatQuantV3 资料 161002 错误码表:子项描述逐字重复(并校验 rowspan 一致)。""" import io import os import re import sys REL = "matmul/flat_quant/docs/aclnnFlatQuantV3.md" def main(root): path = os.path.join(root, REL) if not os.path.isfile(path): print("[SKIP] %s not found" % path) return 2 lines = io.open(path, encoding="utf-8").read().split("\n") start = span = None for i, ln in enumerate(lines): m = re.search(r'<td rowspan="(\d+)">\s*161002\s*</td>', ln) if m: start, span = i, int(m.group(1)) break if start is None: print("[SKIP] no 161002 rowspan cell") return 2 row0 = start while row0 > 0 and "<tr>" not in lines[row0]: row0 -= 1 subs, i = [], row0 while i < len(lines) and "</table>" not in lines[i]: if "<tr>" in lines[i]: j = i while j < len(lines) and "</tr>" not in lines[j]: j += 1 cells = [] for k in range(i, j + 1): for c in re.findall(r"<td[^>]*>(.*?)</td>", lines[k]): if c.strip(): cells.append((re.sub(r"\s+", "", re.sub(r"<[^>]+>", "", c)), k + 1)) if cells: subs.append(cells[-1]) i = j i += 1 print("[INFO] 161002 表在 L%d,rowspan=%d,解析到子项 %d 条" % (start + 1, span, len(subs))) bad = False if span != len(subs): bad = True print("[DEFECT] rowspan=%d 与子项行数 %d 不符" % (span, len(subs))) seen = {} for text, ln in subs: if text in seen: bad = True print("[DEFECT] L%d 与 L%d 的子项描述逐字相同" % (seen[text], ln)) else: seen[text] = ln return 1 if bad else 0 if __name__ == "__main__": sys.exit(main(sys.argv[1] if len(sys.argv) > 1 else "."))实测输出(退出码 1):
判据资格(阴性对照):把 L366 删除、同时把
rowspan="13"改为rowspan="12"后,同一脚本输出[OK]之外还会打印161002 error table: 12 sub-items, no duplicate, rowspan consistent,退出码 0。影响
161002唯一的契约来源,重复行使错误码子项总数虚增(声明 13 条、实际 12 条不同约束)。建议
删除 L366 的重复行并把该行所在单元格的
rowspan="13"改为 12;若两条约束本意不同,请补回被覆盖的那条描述(例如「out 为 INT32 时 x 与 out 的非尾轴维度不一致」)。