From 01934e9953bdc0f3b931e6719241a5e415a4f2a1 Mon Sep 17 00:00:00 2001 From: Gunes Bayir Date: Wed, 2 Nov 2022 11:50:37 +0000 Subject: Partially Revert "Add threshold for floating-point SOFT_RELU activation" Revert the range removal in tests for soft relu and bring the former implementation in CL backend back. Resolves: COMPMID-5677 Change-Id: I35d5ac03a134299041ce97aabc9fff2d4380d09f Signed-off-by: Gunes Bayir Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/8551 Reviewed-by: Milos Puzovic Reviewed-by: Viet-Hoa Do Comments-Addressed: Arm Jenkins Benchmark: Arm Jenkins Tested-by: Arm Jenkins --- src/core/CL/cl_kernels/activation_float_helpers.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/CL/cl_kernels/activation_float_helpers.h') diff --git a/src/core/CL/cl_kernels/activation_float_helpers.h b/src/core/CL/cl_kernels/activation_float_helpers.h index fe124bc032..3f93c8d6fc 100644 --- a/src/core/CL/cl_kernels/activation_float_helpers.h +++ b/src/core/CL/cl_kernels/activation_float_helpers.h @@ -52,7 +52,7 @@ #define lrelu_op(DATA_TYPE, VEC_SIZE, x, A_VAL, B_VAL) ((min(x, (DATA_TYPE)0.0) * (DATA_TYPE)A_VAL) + max(x, (DATA_TYPE)0.0)) // Soft RELU Activation -#define srelu_op(DATA_TYPE, VEC_SIZE, x, A_VAL, B_VAL) (select((log((DATA_TYPE)1.0 + exp(x))), x, (SELECT_VEC_DATA_TYPE(DATA_TYPE, VEC_SIZE))isgreaterequal(x,(DATA_TYPE)16.63553047))) +#define srelu_op(DATA_TYPE, VEC_SIZE, x, A_VAL, B_VAL) (log((DATA_TYPE)1.0 + exp(x))) // ELU Activation #define elu_op(DATA_TYPE, VEC_SIZE, x, A_VAL, B_VAL) (select(((DATA_TYPE)A_VAL * (exp(x) - (DATA_TYPE)1.0)), x, (SELECT_VEC_DATA_TYPE(DATA_TYPE, VEC_SIZE))isgreaterequal(x, (DATA_TYPE)0.0))) -- cgit v1.2.1