Replace __float2half_rn with __float2half The latter provides a consistent definition for CUDA 8.0 and 9.0.
diff --git a/Eigen/src/Core/arch/CUDA/PacketMathHalf.h b/Eigen/src/Core/arch/CUDA/PacketMathHalf.h index e3e45b0..8a6f209 100644 --- a/Eigen/src/Core/arch/CUDA/PacketMathHalf.h +++ b/Eigen/src/Core/arch/CUDA/PacketMathHalf.h
@@ -231,7 +231,7 @@ #else float a1 = __low2float(a); float a2 = __high2float(a); - return Eigen::half(__float2half_rn(a1 + a2)); + return Eigen::half(__float2half(a1 + a2)); #endif } @@ -265,7 +265,7 @@ #else float a1 = __low2float(a); float a2 = __high2float(a); - return Eigen::half(__float2half_rn(a1 * a2)); + return Eigen::half(__float2half(a1 * a2)); #endif }