diff --git a/include/hip/hcc_detail/hip_fp16.h b/include/hip/hcc_detail/hip_fp16.h index 74424a9f8b..11e1b6be11 100644 --- a/include/hip/hcc_detail/hip_fp16.h +++ b/include/hip/hcc_detail/hip_fp16.h @@ -106,7 +106,7 @@ THE SOFTWARE. #if !defined(__HIP_NO_HALF_CONVERSIONS__) template< typename T, Enable_if_t{}>* = nullptr> - __device__ + __host__ __device__ __half(T x) : data{static_cast<_Float16>(x)} {} #endif @@ -233,11 +233,10 @@ THE SOFTWARE. return __half_raw{data}; } - // ACCESSORS - DEVICE ONLY #if !defined(__HIP_NO_HALF_CONVERSIONS__) template< typename T, Enable_if_t{}>* = nullptr> - __device__ + __host__ __device__ operator T() const { return data; } #endif