aboutsummaryrefslogtreecommitdiff
path: root/src/core/CL
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/CL')
-rw-r--r--src/core/CL/cl_kernels/elementwise_unary.cl2
-rw-r--r--src/core/CL/kernels/CLElementWiseUnaryLayerKernel.cpp3
2 files changed, 5 insertions, 0 deletions
diff --git a/src/core/CL/cl_kernels/elementwise_unary.cl b/src/core/CL/cl_kernels/elementwise_unary.cl
index 89bffed16d..866b7ee2b0 100644
--- a/src/core/CL/cl_kernels/elementwise_unary.cl
+++ b/src/core/CL/cl_kernels/elementwise_unary.cl
@@ -36,6 +36,8 @@
#define sin_op(input) sin(input)
// Calculate abs for floating point values
#define fabs_op(input) fabs(input)
+// Calculate natural_log
+#define natural_log_op(input) log(input)
/** Applies element wise unary operator in a tensor.
*
diff --git a/src/core/CL/kernels/CLElementWiseUnaryLayerKernel.cpp b/src/core/CL/kernels/CLElementWiseUnaryLayerKernel.cpp
index 15823b06ce..8b8d2965df 100644
--- a/src/core/CL/kernels/CLElementWiseUnaryLayerKernel.cpp
+++ b/src/core/CL/kernels/CLElementWiseUnaryLayerKernel.cpp
@@ -93,6 +93,9 @@ void CLElementWiseUnaryLayerKernel::configure(const ICLTensor *input, ICLTensor
case ElementWiseUnary::ABS:
build_opts.add_option("-DOPERATION=fabs_op");
break;
+ case ElementWiseUnary::LOG:
+ build_opts.add_option("-DOPERATION=natural_log_op");
+ break;
default:
ARM_COMPUTE_ERROR("Not implemented");
}