Skip to content

Commit

Permalink
Fix tanh typo for rvv. (#5584)
Browse files Browse the repository at this point in the history
* Fix tanh typo for rvv.

* Fix tanh for rvv fp16.
  • Loading branch information
zhangyang2057 authored Jul 18, 2024
1 parent 569617f commit 081a9c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/layer/riscv/rvv_mathfun.h
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ _RVV_FLOAT32_COS_OP(8, 4)
\
/* clamp the inputs to the range [-9, 9] since anything outside */ \
/* this range is -/+1.0f in single-precision. */ \
x2 = vfmin_vf_f32m##LMUL(x, c_tanh_hi, vl); \
x2 = vfmin_vf_f32m##LMUL(x2, c_tanh_hi, vl); \
\
/* since the polynomials are odd/even, we need x**2. */ \
vfloat32m##LMUL##_t z = vfmul_vv_f32m##LMUL(x2, x2, vl); \
Expand Down
2 changes: 1 addition & 1 deletion src/layer/riscv/rvv_mathfun_fp16s.h
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ _RVV_FLOAT16_COS_OP(8, 2)
\
/* clamp the inputs to the range [-9, 9] since anything outside */ \
/* this range is -/+1.0f in single-precision. */ \
x2 = vfmin_vf_f16m##LMUL(x, c_tanh_hi, vl); \
x2 = vfmin_vf_f16m##LMUL(x2, c_tanh_hi, vl); \
\
/* since the polynomials are odd/even, we need x**2. */ \
vfloat16m##LMUL##_t z = vfmul_vv_f16m##LMUL(x2, x2, vl); \
Expand Down

0 comments on commit 081a9c3

Please sign in to comment.