diff options
Diffstat (limited to 'src/cpu/kernels/activation/generic/sve/fp16.cpp')
-rw-r--r-- | src/cpu/kernels/activation/generic/sve/fp16.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cpu/kernels/activation/generic/sve/fp16.cpp b/src/cpu/kernels/activation/generic/sve/fp16.cpp index 5730a361d9..6e9648b5bf 100644 --- a/src/cpu/kernels/activation/generic/sve/fp16.cpp +++ b/src/cpu/kernels/activation/generic/sve/fp16.cpp @@ -114,6 +114,9 @@ void sve_fp16_activation(const ITensor *src, ITensor *dst, const ActivationLayer case ActivationLayerInfo::ActivationFunction::HARD_SWISH: tmp = svmul_f16_z(pg, vin, svmul_f16_z(pg, const_inv_6, svmin_f16_z(pg, const_6, svmax_f16_z(pg, const_0, svadd_f16_z(pg, vin, const_3))))); break; + case ActivationLayerInfo::ActivationFunction::SWISH: + tmp = svmul_f16_z(pg, vin, svinv_f16_z(pg, svadd_f16_z(pg, const_1, svexp_f16_z(pg, svneg_f16_z(pg, svmul_f16_z(pg, va, vin)))))); + break; default: ARM_COMPUTE_ERROR("Unsupported activation function"); } @@ -129,4 +132,4 @@ void sve_fp16_activation(const ITensor *src, ITensor *dst, const ActivationLayer } } // namespace cpu } // namespace arm_compute -#endif /* defined(__ARM_FEATURE_FP16_VECTOR_ARITHMETIC) && defined(ENABLE_FP16_KERNELS) */
\ No newline at end of file +#endif /* defined(__ARM_FEATURE_FP16_VECTOR_ARITHMETIC) && defined(ENABLE_FP16_KERNELS) */ |