AVX path for BF16

This commit is contained in:
Sheng Yang
2020-07-14 01:34:03 +00:00
committed by Rasmus Munk Larsen
parent 4ab32e2de2
commit 56b3e3f3f8
8 changed files with 460 additions and 89 deletions

View File

@@ -23,6 +23,13 @@ limitations under the License.
#define EIGEN_EXPLICIT_CAST(tgt_type) operator tgt_type()
#endif
#define BF16_PACKET_FUNCTION(PACKET_F, PACKET_BF16, METHOD) \
template <> \
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED \
PACKET_BF16 METHOD<PACKET_BF16>(const PACKET_BF16& _x) { \
return F32ToBf16(METHOD<PACKET_F>(Bf16ToF32(_x))); \
}
namespace Eigen {
struct bfloat16;