From 5450021f93e71cc87312f5891985fa729668fb88 Mon Sep 17 00:00:00 2001 From: "Sun, Peng" Date: Thu, 8 Jun 2017 19:20:10 -0500 Subject: [PATCH] Add clang version guard so the hip_fp16.h header won't be picked up by gcc Change-Id: Ia21335a455bc93210901b44bc8c76a7f4a385b55 --- hipamd/include/hip/hcc_detail/hip_fp16.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hipamd/include/hip/hcc_detail/hip_fp16.h b/hipamd/include/hip/hcc_detail/hip_fp16.h index b1ecc61cb0..4d90ec82b2 100644 --- a/hipamd/include/hip/hcc_detail/hip_fp16.h +++ b/hipamd/include/hip/hcc_detail/hip_fp16.h @@ -24,7 +24,7 @@ THE SOFTWARE. #define HIP_INCLUDE_HIP_HCC_DETAIL_HIP_FP16_H #include "hip/hcc_detail/hip_vector_types.h" - +#if ( __clang_major__ > 3) typedef __fp16 __half; typedef __fp16 __half1 __attribute__((ext_vector_type(1))); typedef __fp16 __half2 __attribute__((ext_vector_type(2))); @@ -454,6 +454,6 @@ __device__ static inline __half2 h2trunc(const __half2 h) { a.xy = __hip_hc_ir_h2trunc_int(h.xy); return a; } - +#endif //clang_major > 3 #endif