mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-11 19:29:02 +08:00
Explicitly specify the rounding mode when converting floats to fp16
This commit is contained in:
parent
3ac4045272
commit
0322c66a3f
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user