Put utils in ifndef USE_ROCM to fix CI (#4167) (#4168)

Co-authored-by: Stefan He <hebiaobuaa@gmail.com>
This commit is contained in:
Yineng Zhang
2025-03-07 00:01:17 -08:00
committed by GitHub
parent 3c3eb374b2
commit 94a2b9d33e

View File

@@ -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