Open
[新精度问题][torch_npu.fused_cross_entropy_loss_with_max_sum]torch_npu.fused_cross_entropy_loss_with_max_sum算子存在 新精度问题 #232
sleeveenAdd on 2 days ago
sleeveen
2 days ago Comments:
2 days ago Comments:
严明奎
2 days ago Comments:
2 days ago Comments:
torch_npu.fused_cross_entropy_loss_with_max_sum 的 kernel 实现无精度缺陷。失败发生在 cross_check 判据的“小值域误差计数比”上,诱因是 torchapi(e2e) 用例未声明输出槽,导致框架的 golden 升精度(Promote)被静默跳过,三方误差比的分母塌陷为 0。
- vocab=None(仅 loss):tensor_view_shapes 末尾补一个 None,tensor_dtypes 补 'float32',output_tensor_indexes="(6,)"
- 带 vocab(loss+softmax):补两个 None,dtype 补两个 'float32',output_tensor_indexes="(6,7)"
修改后的用例附件:


确定性问题描述:[新精度问题][torch_npu.fused_cross_entropy_loss_with_max_sum]torch_npu.fused_cross_entropy_loss_with_max_sum算子存在 新精度问题
通路:torchapi
golden版本:20261109
golden链接:https://gitcode.com/opencann/operator-artifacts/blob/master/FusedCrossEntropyLossWithMaxSum/Golden/golden.py
cann版本:20261109
ttk版本:20261109
用例链接:https://gitcode.com/sleeveen/operator_test_case/tree/main/LongTail/Cases/Functional_Accuracy/torchapi/torch_npu.fused_cross_entropy_loss_with_max_sum
用例名:aclnnFusedCrossEntropyLossWithMaxSum_L0_tolerance_003、aclnnFusedCrossEntropyLossWithMaxSum_L0_tolerance_012
复现命令:python3 -m ttk e2e -i 失败用例集_torch_npu.fused_cross_entropy_loss_with_max_sum_torchapi_精度失败.csv --dl=1 --plugin /home/CI/golden/torch_npu.fused_cross_entropy_loss_with_max_sum/ --device-whitelist=0 --xpu-perf -t aclnnFusedCrossEntropyLossWithMaxSum_L0_tolerance_003
问题现象:
开发责任人:张磊
PL:张磊