From 3d74b01b99dd778ff0c26d5c2362808101e19e9e Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Mon, 30 Oct 2023 17:19:05 -0700 Subject: [PATCH] Delete some unused/redundant code. PiperOrigin-RevId: 578003516 --- ml_dtypes/include/float8.h | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/ml_dtypes/include/float8.h b/ml_dtypes/include/float8.h index 29e18d50..8d6d41df 100644 --- a/ml_dtypes/include/float8.h +++ b/ml_dtypes/include/float8.h @@ -882,18 +882,10 @@ struct IdentityConversion { static EIGEN_DEVICE_FUNC inline Scalar run(Scalar from) { return from; } }; -template -struct ConvertImpl : public IdentityConversion {}; -template -struct ConvertImpl : public IdentityConversion {}; -template -struct ConvertImpl : public IdentityConversion {}; -template -struct ConvertImpl : public IdentityConversion {}; +template +struct ConvertImpl + : public IdentityConversion {}; template struct TraitsBase { @@ -1221,15 +1213,6 @@ struct ConvertImpl { } }; -template <> -struct ConvertImpl { - static EIGEN_DEVICE_FUNC inline Eigen::half run(float8_e5m2 from) { - return Eigen::numext::bit_cast( - static_cast(static_cast(from.rep()) << 8)); - } -}; - // Direct casts of e5m2 to Eigen::half simply shifts bits over. template struct ConvertImpl {