Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions paddle/math/float16.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ struct PADDLE_ALIGN(2) float16 {
half tmp = __float2half(val);
x = *reinterpret_cast<uint16_t*>(&tmp);

#elif defined(PADDLE_NEON)
#elif defined(PADDLE_WITH_NATIVE_FP16)
float32x4_t tmp = vld1q_dup_f32(&val);
float16_t res = vget_lane_f16(vcvt_f16_f32(tmp), 0);
x = *reinterpret_cast<uint16_t*>(&res);
Expand Down Expand Up @@ -252,7 +252,7 @@ struct PADDLE_ALIGN(2) float16 {
half tmp = *reinterpret_cast<const half*>(this);
return __half2float(tmp);

#elif defined(PADDLE_NEON)
#elif defined(PADDLE_WITH_NATIVE_FP16)
float16x4_t res = vld1_dup_f16(reinterpret_cast<const float16_t*>(this));
return vgetq_lane_f32(vcvt_f32_f16(res), 0);

Expand Down