SWDEV-503299 - Do not use operator to check for nan
Some libs use __HIP_NO_HALF_OPERATORS__ and __HIP_NO_HALF_CONVERSIONS__
which results in operators being hidden and can cause errors.
Change-Id: I83c194d7d727cba30b46d7c296f7d396549f5fca
[ROCm/clr commit: 98b33886cd]
This commit is contained in:
committed by
Rakesh Roy
parent
3fc8b99a79
commit
78ec2a66af
@@ -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__
|
||||
|
||||
Reference in New Issue
Block a user