From abcde69a79c35c118e156964a1b6fb75f1ea2adb Mon Sep 17 00:00:00 2001 From: Antonio Sanchez Date: Fri, 5 Feb 2021 12:17:34 -0800 Subject: 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` and `HasPow`, so implementations can more easily specialize this. --- Eigen/src/Core/functors/BinaryFunctors.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'Eigen/src/Core/functors') diff --git a/Eigen/src/Core/functors/BinaryFunctors.h b/Eigen/src/Core/functors/BinaryFunctors.h index a3ec9e177..271608123 100644 --- a/Eigen/src/Core/functors/BinaryFunctors.h +++ b/Eigen/src/Core/functors/BinaryFunctors.h @@ -435,12 +435,14 @@ struct functor_traits > { Cost = 5 * NumTraits::MulCost, PacketAccess = (!NumTraits::IsComplex && !NumTraits::IsInteger && packet_traits::HasExp && packet_traits::HasLog && - packet_traits::HasRound && packet_traits::HasCmp) + packet_traits::HasRound && packet_traits::HasCmp && + // Temporarly disable packet access for half/bfloat16 until + // accuracy is improved. + !is_same::value && !is_same::value + ) }; }; - - //---------- non associative binary functors ---------- /** \internal -- cgit v1.2.3