aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/CL/functions/CLElementWiseUnaryLayer.cpp
diff options
context:
space:
mode:
authorManuel Bottini <manuel.bottini@arm.com>2020-04-08 10:15:51 +0100
committerManuel Bottini <manuel.bottini@arm.com>2020-04-23 17:53:59 +0000
commit2b84be544e4a27f7e8e80827e9c85c8f0d58b4ce (patch)
tree078051a911f9b8883a3f11955cfd3b7ba0d7d9f3 /src/runtime/CL/functions/CLElementWiseUnaryLayer.cpp
parent0de45d0a8009e19331c4e29d617fa183167c513a (diff)
downloadComputeLibrary-2b84be544e4a27f7e8e80827e9c85c8f0d58b4ce.tar.gz
COMPMID-3280: Make all ML primitives for CL use the new interface - Part 2
- CLFunctions have been updated Change-Id: Ie3256a6c775bc12f3126482bd8e8a46da54b267c Signed-off-by: Manuel Bottini <manuel.bottini@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3053 Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/runtime/CL/functions/CLElementWiseUnaryLayer.cpp')
-rw-r--r--src/runtime/CL/functions/CLElementWiseUnaryLayer.cpp49
1 files changed, 42 insertions, 7 deletions
diff --git a/src/runtime/CL/functions/CLElementWiseUnaryLayer.cpp b/src/runtime/CL/functions/CLElementWiseUnaryLayer.cpp
index 9955d240f9..ce615327a9 100644
--- a/src/runtime/CL/functions/CLElementWiseUnaryLayer.cpp
+++ b/src/runtime/CL/functions/CLElementWiseUnaryLayer.cpp
@@ -32,8 +32,13 @@ namespace arm_compute
{
void CLRsqrtLayer::configure(const ICLTensor *input, ICLTensor *output)
{
+ configure(CLKernelLibrary::get().get_compile_context(), input, output);
+}
+
+void CLRsqrtLayer::configure(const CLCompileContext &compile_context, const ICLTensor *input, ICLTensor *output)
+{
auto k = arm_compute::support::cpp14::make_unique<CLElementWiseUnaryLayerKernel>();
- k->configure(input, output, ElementWiseUnary::RSQRT);
+ k->configure(compile_context, input, output, ElementWiseUnary::RSQRT);
_kernel = std::move(k);
}
Status CLRsqrtLayer::validate(const ITensorInfo *input, const ITensorInfo *output)
@@ -43,8 +48,13 @@ Status CLRsqrtLayer::validate(const ITensorInfo *input, const ITensorInfo *outpu
void CLExpLayer::configure(const ICLTensor *input, ICLTensor *output)
{
+ configure(CLKernelLibrary::get().get_compile_context(), input, output);
+}
+
+void CLExpLayer::configure(const CLCompileContext &compile_context, const ICLTensor *input, ICLTensor *output)
+{
auto k = arm_compute::support::cpp14::make_unique<CLElementWiseUnaryLayerKernel>();
- k->configure(input, output, ElementWiseUnary::EXP);
+ k->configure(compile_context, input, output, ElementWiseUnary::EXP);
_kernel = std::move(k);
}
Status CLExpLayer::validate(const ITensorInfo *input, const ITensorInfo *output)
@@ -54,8 +64,13 @@ Status CLExpLayer::validate(const ITensorInfo *input, const ITensorInfo *output)
void CLNegLayer::configure(const ICLTensor *input, ICLTensor *output)
{
+ configure(CLKernelLibrary::get().get_compile_context(), input, output);
+}
+
+void CLNegLayer::configure(const CLCompileContext &compile_context, const ICLTensor *input, ICLTensor *output)
+{
auto k = arm_compute::support::cpp14::make_unique<CLElementWiseUnaryLayerKernel>();
- k->configure(input, output, ElementWiseUnary::NEG);
+ k->configure(compile_context, input, output, ElementWiseUnary::NEG);
_kernel = std::move(k);
}
Status CLNegLayer::validate(const ITensorInfo *input, const ITensorInfo *output)
@@ -65,8 +80,13 @@ Status CLNegLayer::validate(const ITensorInfo *input, const ITensorInfo *output)
void CLSinLayer::configure(const ICLTensor *input, ICLTensor *output)
{
+ configure(CLKernelLibrary::get().get_compile_context(), input, output);
+}
+
+void CLSinLayer::configure(const CLCompileContext &compile_context, const ICLTensor *input, ICLTensor *output)
+{
auto k = arm_compute::support::cpp14::make_unique<CLElementWiseUnaryLayerKernel>();
- k->configure(input, output, ElementWiseUnary::SIN);
+ k->configure(compile_context, input, output, ElementWiseUnary::SIN);
_kernel = std::move(k);
}
Status CLSinLayer::validate(const ITensorInfo *input, const ITensorInfo *output)
@@ -76,8 +96,13 @@ Status CLSinLayer::validate(const ITensorInfo *input, const ITensorInfo *output)
void CLAbsLayer::configure(const ICLTensor *input, ICLTensor *output)
{
+ configure(CLKernelLibrary::get().get_compile_context(), input, output);
+}
+
+void CLAbsLayer::configure(const CLCompileContext &compile_context, const ICLTensor *input, ICLTensor *output)
+{
auto k = arm_compute::support::cpp14::make_unique<CLElementWiseUnaryLayerKernel>();
- k->configure(input, output, ElementWiseUnary::ABS);
+ k->configure(compile_context, input, output, ElementWiseUnary::ABS);
_kernel = std::move(k);
}
Status CLAbsLayer::validate(const ITensorInfo *input, const ITensorInfo *output)
@@ -86,8 +111,13 @@ Status CLAbsLayer::validate(const ITensorInfo *input, const ITensorInfo *output)
}
void CLLogLayer::configure(const ICLTensor *input, ICLTensor *output)
{
+ configure(CLKernelLibrary::get().get_compile_context(), input, output);
+}
+
+void CLLogLayer::configure(const CLCompileContext &compile_context, const ICLTensor *input, ICLTensor *output)
+{
auto k = arm_compute::support::cpp14::make_unique<CLElementWiseUnaryLayerKernel>();
- k->configure(input, output, ElementWiseUnary::LOG);
+ k->configure(compile_context, input, output, ElementWiseUnary::LOG);
_kernel = std::move(k);
}
Status CLLogLayer::validate(const ITensorInfo *input, const ITensorInfo *output)
@@ -97,8 +127,13 @@ Status CLLogLayer::validate(const ITensorInfo *input, const ITensorInfo *output)
void CLRoundLayer::configure(const ICLTensor *input, ICLTensor *output)
{
+ configure(CLKernelLibrary::get().get_compile_context(), input, output);
+}
+
+void CLRoundLayer::configure(const CLCompileContext &compile_context, const ICLTensor *input, ICLTensor *output)
+{
auto k = arm_compute::support::cpp14::make_unique<CLElementWiseUnaryLayerKernel>();
- k->configure(input, output, ElementWiseUnary::ROUND);
+ k->configure(compile_context, input, output, ElementWiseUnary::ROUND);
_kernel = std::move(k);
}
Status CLRoundLayer::validate(const ITensorInfo *input, const ITensorInfo *output)