From 7e20e29904c98adae5a91c6492fd78da88b7a9bf Mon Sep 17 00:00:00 2001 From: Sheri Zhang Date: Tue, 2 Feb 2021 11:49:34 +0000 Subject: Make memset/copy functions state-less Port following functions: - CLCopy - CLFill - CLPermute - CLReshapeLayer - CLCropResize Resolves: COMPMID-4002 Signed-off-by: Sheri Zhang Change-Id: I8392aa515aaeb5b44dab6122be6a795d08376d5f Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5003 Comments-Addressed: Arm Jenkins Reviewed-by: Michele Di Giorgio Tested-by: Arm Jenkins --- src/runtime/CL/functions/CLPadLayer.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/runtime/CL/functions/CLPadLayer.cpp') diff --git a/src/runtime/CL/functions/CLPadLayer.cpp b/src/runtime/CL/functions/CLPadLayer.cpp index 8c5d529117..d105c0597c 100644 --- a/src/runtime/CL/functions/CLPadLayer.cpp +++ b/src/runtime/CL/functions/CLPadLayer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2020 Arm Limited. + * Copyright (c) 2019-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -22,14 +22,13 @@ * SOFTWARE. */ #include "arm_compute/runtime/CL/functions/CLPadLayer.h" -#include "src/core/CL/kernels/CLCopyKernel.h" #include "src/core/CL/kernels/CLPadLayerKernel.h" namespace arm_compute { CLPadLayer::CLPadLayer() : _pad_kernel(std::make_unique()), - _copy_kernel(std::make_unique()), + _copy(), _perform_pad(false) { } @@ -57,7 +56,7 @@ void CLPadLayer::configure(const CLCompileContext &compile_context, ICLTensor *i else { // Copy the input to the whole output if no padding is applied - _copy_kernel->configure(compile_context, input, output); + _copy.configure(compile_context, input, output); } } Status CLPadLayer::validate(const ITensorInfo *input, const ITensorInfo *output, const PaddingList &padding, PixelValue constant_value, PaddingMode mode) @@ -73,7 +72,7 @@ Status CLPadLayer::validate(const ITensorInfo *input, const ITensorInfo *output, } else { - ARM_COMPUTE_RETURN_ON_ERROR(CLCopyKernel::validate(input, output)); + ARM_COMPUTE_RETURN_ON_ERROR(CLCopy::validate(input, output)); } return Status{}; } @@ -85,7 +84,7 @@ void CLPadLayer::run() } else { - CLScheduler::get().enqueue(*_copy_kernel); + _copy.run(); } } } // namespace arm_compute \ No newline at end of file -- cgit v1.2.1