From e539c37e7d47b9c6dfeb529c1b86df9ad1a6bfb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20Martinez=20Caama=C3=B1o?= Date: Tue, 6 Aug 2024 20:40:34 +0200 Subject: [PATCH] Add missing constexpr to if conditions (#1444) [ROCm/composable_kernel commit: fd9ef4e6782ab009dd8afc3c92d7362778ce9f8f] --- include/ck/utility/f8_utils.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/ck/utility/f8_utils.hpp b/include/ck/utility/f8_utils.hpp index 1960667732..98e8092af5 100644 --- a/include/ck/utility/f8_utils.hpp +++ b/include/ck/utility/f8_utils.hpp @@ -165,7 +165,7 @@ In this case, the fp16 mantissa should be shift left by 1 */ if(out_exponent > max_exp) { - if(clip) + if constexpr(clip) { mantissa = (1 << out_mant) - 1; out_exponent = max_exp; @@ -235,7 +235,8 @@ __host__ __device__ Y run_cast_from_f8(X x) return (mantissa == 0) ? (sign ? NegInf : Inf) : NaN; } - if((NumericUtils::mant == 10) && (NumericUtils::mant == 2) && !negative_zero_nan) + if constexpr((NumericUtils::mant == 10) && (NumericUtils::mant == 2) && + !negative_zero_nan) { retval = x; retval <<= 8;