Closed
expint kernel 边界行为与三方标杆不一致(+inf 覆盖与大值缩放重算),需对齐并移除溢出保护逻辑 #4676
zhaoxinmengAdd on  6 days agoClosed at  5 days ago
zhaoxinmengCollaborators
6 days ago Create

问题描述

expint kernel 此前为提升边界精度做了两项增强,与三方标杆(TF 原生实现,实测对齐)的边界行为不一致:

  1. x = +inf 显式覆盖为 +inf(三方标杆直算 exp(+inf)×(1/+inf) = inf×0 = NaN)
  2. x > ~88.72 时按缩放公式重算返回有限真值(三方标杆 fp32 直算在该区间因 exp(x) 中间量溢出提前饱和为 +inf)

由此导致含 x=+inf 与大值区间输入的三方精度比对会判定不一致,且两项增强逻辑(clamp、缩放重算、+inf 覆盖,共约 46 条向量指令/轮 + 1 个专用缓冲)带来额外开销。

期望

kernel 边界行为与三方标杆对齐(Cephes 直算语义),移除相关溢出保护逻辑与专用缓冲,降低维护成本并顺带提升每轮处理量。

likedislike
ZzhaoxinmengCollaborators
6 days ago Assign zhaoxinmeng as responsible person
ZzhaoxinmengCollaborators
6 days ago Associated pull request
CANN-robotCANN-robotCollaborators
5 days ago Close issue
CANN-robotCANN-robotCollaborators
5 days ago changed custom state from 待办的 to 已完成
CANN-robotCANN-robotCollaborators
5 days ago Added label: resolved