Fix elementwise_div UT by providing user defined gradients (#43536) (#43909)
Cherry-pick of #43536 Backgroud in #43262 In elementwise_div UT, the numeric gradient (validation) has large relative error in comparison to analytic gradient (Paddle OP). The default rtol for UTs is 0.005 The rtol for float32 and float64 elementwise_div OP is set to be 0.05 The rtol for float16 and bfloat16 elementwise_div OP is set to be 1.0 The relative error is too large, so this PR provides user defined gradients to test elementwise_div followed by the analytic method.
Showing
想要评论请 注册 或 登录