diff --git a/include/ck/utility/amd_ck_fp8.hpp b/include/ck/utility/amd_ck_fp8.hpp index cdc2a4fbda..b7af32d3dc 100644 --- a/include/ck/utility/amd_ck_fp8.hpp +++ b/include/ck/utility/amd_ck_fp8.hpp @@ -10,15 +10,11 @@ #include "ck/utility/functional.hpp" #include "ck/utility/type.hpp" -#ifdef CK_USE_FNUZ_FP8 -#define CK_USE_FNUZ_FP8 1 -#else +#ifndef CK_USE_FNUZ_FP8 #define CK_USE_FNUZ_FP8 0 #endif -#ifdef CK_USE_OCP_FP8 -#define CK_USE_OCP_FP8 1 -#else +#ifndef CK_USE_OCP_FP8 #define CK_USE_OCP_FP8 0 #endif @@ -432,7 +428,7 @@ __host__ __device__ inline constexpr bool fp8_is_inf(bf8_ocp_t a) namespace fp8_impl { // Assertions to check for supported conversion types -#define __assert_ocp_support(interp) \ +#define __fp8_impl_assert_ocp_support(interp) \ { \ if(interp != ck_fp8_interpretation_t::CK_E4M3_OCP && \ interp != ck_fp8_interpretation_t::CK_E5M2_OCP) \ @@ -440,7 +436,7 @@ namespace fp8_impl { __hip_assert(false && "type is unsupported by current target device"); \ } \ } -#define __assert_fnuz_support(interp) \ +#define __fp8_impl_assert_fnuz_support(interp) \ { \ if(interp != ck_fp8_interpretation_t::CK_E4M3_FNUZ && \ interp != ck_fp8_interpretation_t::CK_E5M2_FNUZ) \ @@ -454,10 +450,10 @@ __is_interpret_supported([[maybe_unused]] ck_fp8_interpretation_t interp) { #if defined(__HIP_DEVICE_COMPILE__) && __HIP_DEVICE_COMPILE__ #if CK_USE_OCP_FP8 - __assert_ocp_support(interp); + __fp8_impl_assert_ocp_support(interp); #endif #if CK_USE_FNUZ_FP8 - __assert_fnuz_support(interp); + __fp8_impl_assert_fnuz_support(interp); #endif #endif }