Closed
[Bug-Report|缺陷反馈]: PSROIPoolingGradV2D Golden 坐标精度不一致与 Host 格式校验缺失 #8502
Hu1L1Add on 11 days agoClosed at 8 days ago
11 days ago Added label: bug-report
11 days ago Associated pull request
11 days ago Assign Hu1L1 as responsible person
11 days ago Modify description of issue
8 days ago Close issue
8 days ago changed custom state from 待办的 to 已完成
8 days ago Added label: resolved
Describe the current behavior / 问题描述
PSROIPoolingGradV2D 存在以下问题(修复前基线:master 的 aad5504ab8):
Environment Information / 环境信息
Steps to reproduce the issue / 重现步骤
在修复前的算子仓根目录,用 NumPy/PyTorch 执行:
import runpy import numpy as np golden = runpy.run_path( "pooling/psroi_pooling_grad_v2_d/tests/assets/golden.py" )["golden_ps_roi_pooling_grad_v2"] x = np.zeros((1, 1, 31, 31), dtype=np.float32) x[0, 0, 30, 30] = 1 rois = np.array([0, 1, 1, 1, 1], dtype=np.float32).reshape(1, 5, 1) y = golden(x, rois, float(np.float32(31 / 61)), 1, 31, [2, 2])[0] print(y[0, 960])旧 FP64 坐标路径输出
[[0.25, 0.25], [0.25, 0.25]],而 FP32 分离乘加语义要求[[0, 0], [0, 1]]。格式问题可在真实 TilingContext Faker 中使用合法 shape/dtype/platform,将 x/y 的 storage format 改为 NHWC、NC1HWC0,或令 x/y 的 storage format 不一致。旧入口没有对应格式拒绝检查。原 GE 示例的
CheckOutput只检查 shape、dtype、format、字节数及数据指针,不比较元素值。Describe the expected behavior / 预期结果
Related log / 日志与验证结果
storage format 调整前(e24378efc)的服务器真实框架 Host UT:
其中 12 项 InferShape、13 项 Tiling,均为 CPU Host 验证。一次性 Golden CPU 回归的 28 个子用例通过,反向验证可检出修改前错误。示例在服务器完成目标文件编译,在本机通过参考计算/比较器检查;尚未链接运行示例或进行 GE/NPU 数值验收。
本次 storage format 调整已同步修改 Tiling UT,并通过静态检视和 git diff --check;尚未重新运行 Host UT 或 GE/NPU 图。
Special notes / 备注
修复 PR:ops-nn #14040。本 Issue 对应该 PR 当前的 Golden、Host 格式校验、Host UT 和示例修改。