From 94a2b9d33e5b6a057be5e1881a799cf0254748f7 Mon Sep 17 00:00:00 2001 From: Yineng Zhang Date: Fri, 7 Mar 2025 00:01:17 -0800 Subject: [PATCH] Put utils in ifndef USE_ROCM to fix CI (#4167) (#4168) Co-authored-by: Stefan He --- sgl-kernel/src/sgl-kernel/include/utils.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sgl-kernel/src/sgl-kernel/include/utils.h b/sgl-kernel/src/sgl-kernel/include/utils.h index 7eee85960..94bcefa7f 100644 --- a/sgl-kernel/src/sgl-kernel/include/utils.h +++ b/sgl-kernel/src/sgl-kernel/include/utils.h @@ -109,6 +109,7 @@ using FP8_TYPE = c10::Float8_e4m3fnuz; constexpr auto FP8_E4M3_MAX = 224.0f; #endif +#ifndef USE_ROCM __device__ __forceinline__ float atomicMaxFloat(float* addr, float value) { float old; old = (value >= 0) ? __int_as_float(atomicMax((int*)addr, __float_as_int(value))) @@ -124,3 +125,4 @@ __device__ __forceinline__ float warpReduceMax(float max_value) { max_value = fmaxf(max_value, __shfl_xor_sync(0xffffffff, max_value, 1)); return max_value; } +#endif