Open
[新精度问题][aclnnInplaceAtanh]aclnnInplaceAtanh算子存在 新精度问题 #78
sleeveenAdd on 6 days ago
sleeveen
6 days ago Comments:
6 days ago Comments:
陈展熹
6 days ago Comments:
6 days ago Comments:
已定位本 issue 的两条失败用例:现有 aclnnInplaceAtanh Golden 在设备执行前通过 inputRef.copy_(result) 改写了调用方输入。FP64 参考张量与原始 NumPy 输入共享存储,导致送入设备的已经是第一次 atanh 的结果,设备又计算了一次 atanh。以 003 为例:原始输入 1 被 Golden 改成 +Inf,随后设备计算 atanh(+Inf) 得到 NaN,而期望结果是 +Inf。
修复方式:Golden 返回独立参考结果 [result],删除对调用方 inputRef 的写回。设备接口自身的原地写入仍由 TTK 通过输出槽 (0,) 读取 inputRef 后验证。该修复不调整数值公式或容差。
已提交修复 PR,等待审核合入:
- 归档仓 operator-artifacts:https://gitcode.com/opencann/operator-artifacts/pull/393
- ops-math: https://gitcode.com/cann/ops-math/pull/7021
验证情况(Ascend950PR / CANN 9.1.0-beta.1 / ops-test-kit a89e7962a):使用实际修改的归档 Golden,通过原生 TTK ACLNN 路径回放 002、003,输入和 Golden dump 均与原失败基线逐字节一致。原 Golden 两条精度 FAIL,修复后两条精度 PASS,3 次重复执行的确定性均 PASS。
- 002,FP64
(7483,):有限值最大绝对误差8.881784197001252e-16,NaN 数量为 0。 - 003,FP64
(9833,1691):全部16,627,603个输出为+Inf,NaN 数量为 0。 - 另有 82 项 CPU 契约检查及 Ruff 静态检查通过,覆盖共享输入保持、输出独立性、重复调用、dtype/视图/特殊值与已有注册。
上述设备回放验证的是精度和确定性,未采集性能或执行内存检查。PR 尚待合入;合入后需要更新实际使用的 Golden 文件。


确定性问题描述:[新精度问题][aclnnInplaceAtanh]aclnnInplaceAtanh算子存在 新精度问题
通路:aclnn
golden版本:20261103
golden链接:https://gitcode.com/opencann/operator-artifacts/blob/master/Atanh/golden文件/atanh.py
cann版本:20261103
ttk版本:20261103
用例链接:https://gitcode.com/sleeveen/operator_test_case/tree/main/LongTail/Cases/Functional_Accuracy/Aclnn/aclnnInplaceAtanh
用例名:aclnnInplaceAtanh_L0_tolerance_002、aclnnInplaceAtanh_L0_tolerance_003
复现命令:python3 -m ttk aclnn -i 失败用例集_aclnnInplaceAtanh_aclnn_精度失败.csv --plugin /home/CI/golden/aclnnInplaceAtanh/ --device-whitelist=0 --dl=1 --xpu-perf -t aclnnInplaceAtanh_L0_tolerance_002
问题现象:
开发责任人:叶钊
PL:叶钊