• Z
    [Cherry-Pick] Fix the calculation of y_grad in divide_backward (#53584) · e63fb1e6
    Zhang Zheng 提交于
    Cherry-Pick: #53582
    修改内容:在除法out = x / y中,将y的反向公式由dy = -dout * out / y 改为 dy = -dout * ((x / y) / y)
    修改原因:使用result作为反向的输入,在低精度的时候本身cast之后就会存在一些精度损失,所以重新计算后才是更准确的结果
    修改影响:此改动可以使结果更精确且对性能影响忽略不计
    e63fb1e6
elementwise_divide_grad_kernel.cu 3.1 KB