From d43f0eedcc9249506ef7e4dc7c1febd1bca61346 Mon Sep 17 00:00:00 2001 From: foreman Date: Wed, 16 Oct 2019 17:47:55 -0400 Subject: [PATCH] P4 to Git Change 2014744 by vsytchen@vsytchen-ocl-win10-2 on 2019/10/16 17:37:46 SWDEV-207449 - [HIP CQE][HIPonPAL][LNX][QR] 6 hiptests failed on all ASICs hipTestHalf fails to build on Windows due to linker error "unresolved external symbol __gnu_h2f_ieee" 1. Expose __gnu_h2f_ieee() and __gnu_f2h_ieee() for Windows builds. ReviewBoardURL = http://ocltc.amd.com/reviews/r/18127/diff/ Affected files ... ... //depot/stg/opencl/drivers/opencl/api/hip/hip_hcc.def.in#31 edit ... //depot/stg/opencl/drivers/opencl/api/hip/hip_platform.cpp#45 edit --- api/hip/hip_hcc.def.in | 2 ++ api/hip/hip_platform.cpp | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/api/hip/hip_hcc.def.in b/api/hip/hip_hcc.def.in index 45aa1503cc..9df5287092 100644 --- a/api/hip/hip_hcc.def.in +++ b/api/hip/hip_hcc.def.in @@ -153,6 +153,8 @@ __hipRegisterFatBinary __hipRegisterFunction __hipRegisterVar __hipUnregisterFatBinary +__gnu_h2f_ieee +__gnu_f2h_ieee hipConfigureCall hipSetupArgument hipLaunchByPtr diff --git a/api/hip/hip_platform.cpp b/api/hip/hip_platform.cpp index b6ea5070e2..9773251bb0 100644 --- a/api/hip/hip_platform.cpp +++ b/api/hip/hip_platform.cpp @@ -869,6 +869,8 @@ void hipLaunchCooperativeKernelGGLImpl( } +#endif // defined(ATI_OS_LINUX) + // conversion routines between float and half precision static inline std::uint32_t f32_as_u32(float f) { union { float f; std::uint32_t u; } v; v.f = f; return v.u; } static inline float u32_as_f32(std::uint32_t u) { union { float f; std::uint32_t u; } v; v.u = u; return v.f; } @@ -908,5 +910,3 @@ extern "C" float __gnu_h2f_ieee(unsigned short h){ extern "C" unsigned short __gnu_f2h_ieee(float f){ return (unsigned short)__convert_float_to_half(f); } - -#endif // defined(ATI_OS_LINUX)