You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The function ‘Kokkos::Details::ArithTraits::min()’ is documented as returning the same value as numeric_limts::min(), e.g. the smallest positive value of a real (e.g 1.17e-38 for a float). However for standard floats and doubles it appears to actually be equivalent to numeric_limits::lowest() and returns the most negative value of a real (e.g. -3.40e+38 for a float). Looking at the header file there are also some types where Kokkos min actually is compatible with numeric_limits::min() such as float128, dd_real, and qd_real. This difference in definition between the types could cause hard to debug problems in the future.
The text was updated successfully, but these errors were encountered:
Note there is a lot of code in Sierra and elsewhere that relies on the current 'lowest' return value for min. So if the behavior were to switch to the documented behavior a lot of things would break. For what it is worth I recommend resolving this by either:
a) Deleting the 'min' function and replacing with 'lowest' to force the update of dependent functions
or
b) Updating the header file comments and other documentation to reflect actual behavior of the function and update all the type specializations to behave consistently.
The function ‘Kokkos::Details::ArithTraits::min()’ is documented as returning the same value as numeric_limts::min(), e.g. the smallest positive value of a real (e.g 1.17e-38 for a float). However for standard floats and doubles it appears to actually be equivalent to numeric_limits::lowest() and returns the most negative value of a real (e.g. -3.40e+38 for a float). Looking at the header file there are also some types where Kokkos min actually is compatible with numeric_limits::min() such as float128, dd_real, and qd_real. This difference in definition between the types could cause hard to debug problems in the future.
The text was updated successfully, but these errors were encountered: