Skip to content

Commit

Permalink
arm stuff fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Amir Ramezani committed Aug 29, 2023
1 parent 25084ca commit edf4418
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/layer/arm/unaryop_arm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -481,10 +481,9 @@ struct unary_op_erf
#if __ARM_NEON
float32x4_t func_pack4(const float32x4_t& x) const
{
float norm_x = x / sqrt(2.0f);
float32x4_t norm_x_vec = x / vsqrtq_f32(vdupq_n_f32(2.0f));
float32x4_t erf_approx = vmovq_n_f32(1.0f);
float32x4_t norm_x_vec = vdupq_n_f32(norm_x);
float32x4_t tanh_x = tanh(vmulq_f32(pi, norm_x_vec));
float32x4_t tanh_x = tanh_ps(vmulq_f32(pi, norm_x_vec));
return vsubq_f32(erf_approx, vmulq_f32(0.5f, tanh_x));
}
#endif // __ARM_NEON
Expand Down

0 comments on commit edf4418

Please sign in to comment.