diff --git a/projects/clr/hipamd/include/hip/amd_detail/amd_hip_fp16.h b/projects/clr/hipamd/include/hip/amd_detail/amd_hip_fp16.h index c8117b1bf3..1a08bb8df1 100644 --- a/projects/clr/hipamd/include/hip/amd_detail/amd_hip_fp16.h +++ b/projects/clr/hipamd/include/hip/amd_detail/amd_hip_fp16.h @@ -1679,8 +1679,9 @@ THE SOFTWARE. __HOST_DEVICE__ bool __hisinf(__half x) { - // +Inf/-Inf - return x == HIPRT_INF_FP16 || x == __ushort_as_half((unsigned short)0xFC00U); + __half_raw hr = x; + // +/-Inf + return hr.x == 0x7C00U || hr.x == 0xFC00U; } inline __HOST_DEVICE__