From fb170439e86220903960269abd4dbcbe31a4ff6f Mon Sep 17 00:00:00 2001 From: eqy Date: Wed, 14 Aug 2024 11:59:59 -0700 Subject: [PATCH] Update half.h (#1709) --- include/cutlass/half.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/cutlass/half.h b/include/cutlass/half.h index e5dcd71e..a0f39828 100644 --- a/include/cutlass/half.h +++ b/include/cutlass/half.h @@ -602,30 +602,39 @@ struct numeric_limits { static int const digits = 10; /// Least positive value + CUTLASS_HOST_DEVICE static cutlass::half_t min() { return cutlass::half_t::bitcast(0x0001); } /// Minimum finite value + CUTLASS_HOST_DEVICE static cutlass::half_t lowest() { return cutlass::half_t::bitcast(0xfbff); } /// Maximum finite value + CUTLASS_HOST_DEVICE static cutlass::half_t max() { return cutlass::half_t::bitcast(0x7bff); } /// Returns smallest finite value + CUTLASS_HOST_DEVICE static cutlass::half_t epsilon() { return cutlass::half_t::bitcast(0x1800); } /// Returns maximum rounding error + CUTLASS_HOST_DEVICE static cutlass::half_t round_error() { return cutlass::half_t(0.5f); } /// Returns positive infinity value + CUTLASS_HOST_DEVICE static cutlass::half_t infinity() { return cutlass::half_t::bitcast(0x7c00); } /// Returns quiet NaN value + CUTLASS_HOST_DEVICE static cutlass::half_t quiet_NaN() { return cutlass::half_t::bitcast(0x7fff); } /// Returns signaling NaN value + CUTLASS_HOST_DEVICE static cutlass::half_t signaling_NaN() { return cutlass::half_t::bitcast(0x7fff); } /// Returns smallest positive subnormal value + CUTLASS_HOST_DEVICE static cutlass::half_t denorm_min() { return cutlass::half_t::bitcast(0x0001); } }; } // namespace std