This is an automated email from the ASF dual-hosted git repository. masahi pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tvm.git
The following commit(s) were added to refs/heads/main by this push: new 291dd2f063 support false-positive fast math (#12702) 291dd2f063 is described below commit 291dd2f06331342f5c89216d5d211cb61fe3d19f Author: cery999 <112694109+cery...@users.noreply.github.com> AuthorDate: Wed Sep 7 15:06:31 2022 +0800 support false-positive fast math (#12702) --- include/tvm/topi/elemwise.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/tvm/topi/elemwise.h b/include/tvm/topi/elemwise.h index fc9ab13988..f26105cb18 100644 --- a/include/tvm/topi/elemwise.h +++ b/include/tvm/topi/elemwise.h @@ -81,7 +81,7 @@ TOPI_DECLARE_UNARY_OP(isinf); inline Tensor fast_tanh_float(const Tensor& in, std::string name, std::string tag) { // Clamp the inputs to the range [-9, 9] since anything outside // this range is +/-1.0f in single-precision. - auto x = maximum(minimum(in, make_const(in->dtype, 9.0)), make_const(in->dtype, -9.0)); + auto x = maximum(make_const(in->dtype, -9.0), minimum(make_const(in->dtype, 9.0), in)); // The monomial coefficients of the numerator polynomial (odd). auto alpha_1 = make_const(in->dtype, 4.89352455891786e-03);