Commit d2c25a07 authored by Umang Yadav's avatar Umang Yadav
Browse files

Remove FP8_Lowest/Max

parent 3411649c
......@@ -373,18 +373,6 @@ inline MIGRAPHX_HIP_DEVICE fp8e5m2 fabs(fp8e5m2 v)
return v;
}
template <class T>
MIGRAPHX_HIP_DEVICE constexpr T F8_Max()
{
return T{0x7F, T::from_bits()};
}
template <class T>
MIGRAPHX_HIP_DEVICE constexpr T F8_Lowest()
{
return T{0xFF, T::from_bits()};
}
template <>
class numeric_limits<fp8e4m3fnuz>
{
......
......@@ -248,8 +248,9 @@ constexpr T numeric_max()
return __FLT_MAX__;
else if constexpr(is_same<T, migraphx::half>{})
return __FLT16_MAX__;
// TODO: Do it generically for all fp8 types
else if constexpr(is_same<T, migraphx::fp8::fp8e4m3fnuz>{})
return migraphx::fp8::F8_Max<T>();
return migraphx::fp8::numeric_limits<T>::max();
else
return 0;
}
......@@ -265,7 +266,7 @@ constexpr T numeric_lowest()
return -numeric_max<T>() - 1;
}
else if constexpr(is_same<T, migraphx::fp8::fp8e4m3fnuz>{})
return migraphx::fp8::F8_Lowest<T>();
return migraphx::fp8::numeric_limits<T>::lowest();
else
{
return -numeric_max<T>();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment