Clean up packetmath tests and fix various bugs to make bfloat16 pass (almost) all packetmath tests with SSE, AVX, and AVX512.

This commit is contained in:
Rasmus Munk Larsen
2020-10-09 20:05:49 +00:00
parent 7a8d3d5b81
commit 4e4d3f32d1
8 changed files with 114 additions and 70 deletions

View File

@@ -3373,6 +3373,11 @@ template <> EIGEN_STRONG_INLINE Packet4bf pmax<Packet4bf>(const Packet4bf &a,
return F32ToBf16(pmax<Packet4f>(Bf16ToF32(a), Bf16ToF32(b)));
}
template<> EIGEN_STRONG_INLINE Packet4bf plset<Packet4bf>(const bfloat16& a)
{
return F32ToBf16(plset<Packet4f>(static_cast<float>(a)));
}
template<> EIGEN_STRONG_INLINE Packet4bf por(const Packet4bf& a,const Packet4bf& b) {
return por<Packet4us>(a, b);
}