aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/CL/functions/CLPadLayer.cpp
diff options
context:
space:
mode:
authorSang-Hoon Park <sang-hoon.park@arm.com>2020-10-21 15:58:54 +0100
committerSang-Hoon Park <sang-hoon.park@arm.com>2020-11-07 08:07:22 +0000
commitbef7fa27b0d231a8649952f60808132d109b6345 (patch)
tree7543c66a473d90e28b4860986fad77afa5115043 /src/runtime/CL/functions/CLPadLayer.cpp
parentb9531540dadce8331a703c32456f3c9defdfefa9 (diff)
downloadComputeLibrary-bef7fa27b0d231a8649952f60808132d109b6345.tar.gz
COMPMID-3639: (3RDPARTY_UPDATE) Move CL kernels to src
Change-Id: I10d27db788e5086adae1841e3e2441cd9b76ef84 Signed-off-by: Sang-Hoon Park <sang-hoon.park@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4310 Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/runtime/CL/functions/CLPadLayer.cpp')
-rw-r--r--src/runtime/CL/functions/CLPadLayer.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/runtime/CL/functions/CLPadLayer.cpp b/src/runtime/CL/functions/CLPadLayer.cpp
index fb6078cc79..388b07b76e 100644
--- a/src/runtime/CL/functions/CLPadLayer.cpp
+++ b/src/runtime/CL/functions/CLPadLayer.cpp
@@ -22,14 +22,21 @@
* SOFTWARE.
*/
#include "arm_compute/runtime/CL/functions/CLPadLayer.h"
+#include "src/core/CL/kernels/CLCopyKernel.h"
+#include "src/core/CL/kernels/CLPadLayerKernel.h"
+#include "support/MemorySupport.h"
namespace arm_compute
{
CLPadLayer::CLPadLayer()
- : _pad_kernel(), _copy_kernel(), _perform_pad(false)
+ : _pad_kernel(support::cpp14::make_unique<CLPadLayerKernel>()),
+ _copy_kernel(support::cpp14::make_unique<CLCopyKernel>()),
+ _perform_pad(false)
{
}
+CLPadLayer::~CLPadLayer() = default;
+
void CLPadLayer::configure(ICLTensor *input, ICLTensor *output, const PaddingList &padding, PixelValue constant_value, PaddingMode mode)
{
configure(CLKernelLibrary::get().get_compile_context(), input, output, padding, constant_value, mode);
@@ -46,12 +53,12 @@ void CLPadLayer::configure(const CLCompileContext &compile_context, ICLTensor *i
if(_perform_pad)
{
- _pad_kernel.configure(compile_context, input, output, padding, constant_value, mode);
+ _pad_kernel->configure(compile_context, input, output, padding, constant_value, mode);
}
else
{
// Copy the input to the whole output if no padding is applied
- _copy_kernel.configure(compile_context, input, output);
+ _copy_kernel->configure(compile_context, input, output);
}
}
Status CLPadLayer::validate(const ITensorInfo *input, const ITensorInfo *output, const PaddingList &padding, PixelValue constant_value, PaddingMode mode)
@@ -75,11 +82,11 @@ void CLPadLayer::run()
{
if(_perform_pad)
{
- CLScheduler::get().enqueue(_pad_kernel);
+ CLScheduler::get().enqueue(*_pad_kernel);
}
else
{
- CLScheduler::get().enqueue(_copy_kernel);
+ CLScheduler::get().enqueue(*_copy_kernel);
}
}
} // namespace arm_compute \ No newline at end of file