@@ -118,8 +118,8 @@ struct PADDLE_ALIGN(2) float16 {
118
118
PADDLE_HOSTDEVICE inline float16 (const Eigen::half& h) : x (h.x ) {}
119
119
#endif // USE_EIGEN
120
120
121
- #if (PADDLE_GNUC_VER >= 61 || PADDLE_CLANG_VER >= 34 ) && \
122
- defined (PADDLE_NEON) && defined (PADDLE_ARM_FP16 )
121
+ #if defined(PADDLE_NEON) && defined(PADDLE_ARM_FP16 ) && \
122
+ (PADDLE_GNUC_VER >= 61 || PADDLE_CLANG_VER >= 34 )
123
123
// __fp16 is a native half precision data type for arm cpu,
124
124
// float16_t is an alias for __fp16 in arm_fp16.h,
125
125
// which is included in arm_neon.h.
@@ -207,8 +207,8 @@ struct PADDLE_ALIGN(2) float16 {
207
207
}
208
208
#endif // USE_EIGEN
209
209
210
- #if (PADDLE_GNUC_VER >= 61 || PADDLE_CLANG_VER >= 34 ) && \
211
- defined (PADDLE_NEON) && defined (PADDLE_ARM_FP16 )
210
+ #if defined(PADDLE_NEON) && defined(PADDLE_ARM_FP16 ) && \
211
+ (PADDLE_GNUC_VER >= 61 || PADDLE_CLANG_VER >= 34 )
212
212
PADDLE_HOSTDEVICE inline float16& operator =(const float16_t * rhs) {
213
213
x = *reinterpret_cast <uint16_t *>(rhs);
214
214
return *this ;
@@ -302,8 +302,8 @@ struct PADDLE_ALIGN(2) float16 {
302
302
}
303
303
#endif // USE_EIGEN
304
304
305
- #if (PADDLE_GNUC_VER >= 61 || PADDLE_CLANG_VER >= 34 ) && \
306
- defined (PADDLE_NEON) && defined (PADDLE_ARM_FP16 )
305
+ #if defined(PADDLE_NEON) && defined(PADDLE_ARM_FP16 ) && \
306
+ (PADDLE_GNUC_VER >= 61 || PADDLE_CLANG_VER >= 34 )
307
307
// check whether it works or not
308
308
PADDLE_HOSTDEVICE inline operator float16_t () const {
309
309
float16 h = *this ;
0 commit comments