diff options
author | 2016-05-11 17:37:34 -0700 | |
---|---|---|
committer | 2016-05-11 17:37:34 -0700 | |
commit | 56a1757d7409d1c0392aaf33ee0086af897600ca (patch) | |
tree | f0bc1c4962fd34e612017715d6829060ddc12994 | |
parent | 9091351dbea903103869fe60e2962cf2a7ae03c8 (diff) |
Made predux_min and predux_max on fp16 less noisy
-rw-r--r-- | Eigen/src/Core/arch/CUDA/PacketMathHalf.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Eigen/src/Core/arch/CUDA/PacketMathHalf.h b/Eigen/src/Core/arch/CUDA/PacketMathHalf.h index 1b32d20aa..be0e2bdf2 100644 --- a/Eigen/src/Core/arch/CUDA/PacketMathHalf.h +++ b/Eigen/src/Core/arch/CUDA/PacketMathHalf.h @@ -245,7 +245,7 @@ template<> EIGEN_DEVICE_FUNC inline half predux_max<half2>(const half2& a) { #else float a1 = __low2float(a); float a2 = __high2float(a); - return half(__float2half_rn(numext::maxi(a1, a2))); + return a1 > a2 ? __low2half(a) : __high2half(a); #endif } @@ -257,7 +257,7 @@ template<> EIGEN_DEVICE_FUNC inline half predux_min<half2>(const half2& a) { #else float a1 = __low2float(a); float a2 = __high2float(a); - return half(__float2half_rn(numext::mini(a1, a2))); + return a1 < a2 ? __low2half(a) : __high2half(a); #endif } |