Open
[功能问题][Atanh]Atanh算子存在 功能问题 #90
sleeveenAdd on  5 days ago
sleeveenCollaborators
5 days ago Create

确定性问题描述:[功能问题][Atanh]Atanh算子存在 功能问题
通路:tf
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/TF/Atanh
用例名:Atanh_L0_tolerance_001、Atanh_L0_tolerance_002
错误码:(未获取到)
复现命令:python3 -m ttk e2e -i 失败用例集_Atanh_tf_功能失败.csv --plugin /home/CI/golden/Atanh/ --device-whitelist=0 -c -d --dl=1 --xpu-perf -t Atanh_L0_tolerance_001
问题现象:

golden问题

CANNBot实际失败分析:
1) 失败根因与类别:golden脚本缺陷(非NPU算子问题)
golden实现 /home/CI/golden/Atanh/atanh.py 在tf通路上未正确处理输入张量类型:输入已是TF EagerTensor,但代码走numpy_to_torch_tensor()分支,该函数只接受np.ndarray,导致golden生成失败,三种模式(eager/graph_cst/graph_dyn)均判GOLDEN_FAILURE。NPU侧执行正常(E2E MD5三次一致),排除算子实现缺陷。该问题影响csv中全部Atanh用例(tf通路共用同一golden)。

修复建议

让 _compute 兼容 tf 张量(/home/CI/golden/Atanh/atanh.py:27):

def _compute(x):
    import numpy as np
    import torch
    from ttk.utilities.dtypes import numpy_to_torch_tensor, torch_to_numpy_tensor

    if isinstance(x, torch.Tensor):
        return torch.atanh(x)
    if hasattr(x, "numpy"):
        x = x.numpy()
    tensor = numpy_to_torch_tensor(np.asarray(x))
    return torch_to_numpy_tensor(torch.atanh(tensor))

golden 修复后,预派发会带上 DATA 位从 tf endpoint 采集三方输出,
cross_check 比对即可正常工作。

开发责任人:叶钊
PL:叶钊

迁移来源:https://gitcode.com/sleeveen/operator_test_case/issues/206

likedislike
sleeveenCollaborators
5 days ago Comments:
SsleeveenCollaborators
5 days ago Modify description of issue
陈陈展熹Collaborators
4 days ago Associated pull request
SsleeveenCollaborators
3 days ago Added label: 已提单