SWDEV-384362 - Added explicit cast from __fp16 to _Float16 in rcph

Change-Id: Ibbb11e928a80126ed7a8c7cd8bddebc74c38986d
This commit is contained in:
Ioannis Assiouras committed 2023-02-21 17:32:59 -05:00
1 bovenliggende cbb3937196
commit aaf1c19609
1 file changed
+3 -3
@@ -1569,7 +1569,7 @@ THE SOFTWARE.
__half hrcp(__half x) __half hrcp(__half x)
{ {
return __half_raw{ return __half_raw{
__builtin_amdgcn_rcph(static_cast<__half_raw>(x).data)}; static_cast<_Float16>(__builtin_amdgcn_rcph(static_cast<__half_raw>(x).data))};
} }
inline inline
__device__ __device__
@@ -1673,8 +1673,8 @@ THE SOFTWARE.
inline inline
__HOST_DEVICE__ __HOST_DEVICE__
__half2 h2rcp(__half2 x) { __half2 h2rcp(__half2 x) {
return _Float16_2{__builtin_amdgcn_rcph(x.x), return _Float16_2{static_cast<_Float16>(__builtin_amdgcn_rcph(x.x)),
__builtin_amdgcn_rcph(x.y)}; static_cast<_Float16>(__builtin_amdgcn_rcph(x.y))};
} }
inline inline
__HOST_DEVICE__ __HOST_DEVICE__