aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core
diff options
context:
space:
mode:
authorGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2016-05-25 15:56:15 -0700
committerGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2016-05-25 15:56:15 -0700
commit0322c66a3f696fed9548fdeb516ebb561e2e02a8 (patch)
tree7a18d6f3df1fd686d846785500342bff3b33252c /Eigen/src/Core
parent3ac40452727a837f55aa1f3f484d5e8c52d6d769 (diff)
Explicitly specify the rounding mode when converting floats to fp16
Diffstat (limited to 'Eigen/src/Core')
-rw-r--r--Eigen/src/Core/arch/CUDA/PacketMathHalf.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Eigen/src/Core/arch/CUDA/PacketMathHalf.h b/Eigen/src/Core/arch/CUDA/PacketMathHalf.h
index 7fb62cbaf..18efcbc72 100644
--- a/Eigen/src/Core/arch/CUDA/PacketMathHalf.h
+++ b/Eigen/src/Core/arch/CUDA/PacketMathHalf.h
@@ -378,7 +378,7 @@ ploadquad<Packet8h>(const Eigen::half* from) {
EIGEN_STRONG_INLINE Packet8f half2float(const Packet8h& a) {
#ifdef EIGEN_HAS_FP16_C
- return _mm256_cvtph_ps(a.x);
+ return _mm256_cvtph_ps(a.x, _MM_FROUND_TO_NEAREST_INT|_MM_FROUND_NO_EXC);
#else
EIGEN_ALIGN32 Eigen::half aux[8];
pstore(aux, a);