mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
Disable vectorized pow for half/bfloat16.
We are potentially seeing some accuracy issues with these. Ideally we would hand off to `float`, but that's not trivial with the current setup. We may want to consider adding `ppow<Packet>` and `HasPow`, so implementations can more easily specialize this.
This commit is contained in:
parent
f85038b7f3
commit
abcde69a79
@ -435,12 +435,14 @@ struct functor_traits<scalar_pow_op<Scalar,Exponent> > {
|
||||
Cost = 5 * NumTraits<Scalar>::MulCost,
|
||||
PacketAccess = (!NumTraits<Scalar>::IsComplex && !NumTraits<Scalar>::IsInteger &&
|
||||
packet_traits<Scalar>::HasExp && packet_traits<Scalar>::HasLog &&
|
||||
packet_traits<Scalar>::HasRound && packet_traits<Scalar>::HasCmp)
|
||||
packet_traits<Scalar>::HasRound && packet_traits<Scalar>::HasCmp &&
|
||||
// Temporarly disable packet access for half/bfloat16 until
|
||||
// accuracy is improved.
|
||||
!is_same<Scalar, half>::value && !is_same<Scalar, bfloat16>::value
|
||||
)
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
//---------- non associative binary functors ----------
|
||||
|
||||
/** \internal
|
||||
|
Loading…
x
Reference in New Issue
Block a user