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/CLReshapeLayer.cpp | 35 ++++++++++------------------- 1 file changed, 12 insertions(+), 23 deletions(-) (limited to 'src/runtime/CL/functions/CLReshapeLayer.cpp') diff --git a/src/runtime/CL/functions/CLReshapeLayer.cpp b/src/runtime/CL/functions/CLReshapeLayer.cpp index 9abaa1b4e1..060eddb96c 100644 --- a/src/runtime/CL/functions/CLReshapeLayer.cpp +++ b/src/runtime/CL/functions/CLReshapeLayer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2020 Arm Limited. + * Copyright (c) 2017-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -23,32 +23,21 @@ */ #include "arm_compute/runtime/CL/functions/CLReshapeLayer.h" +#include "arm_compute/core/CL/CLKernelLibrary.h" #include "arm_compute/core/CL/ICLTensor.h" -#include "src/core/CL/kernels/CLReshapeLayerKernel.h" +#include "arm_compute/core/Types.h" +#include "arm_compute/core/Validate.h" +#include "src/core/CL/ICLKernel.h" +#include "src/runtime/gpu/cl/operators/ClReshape.h" /** [CLReshapeLayer snippet] **/ namespace arm_compute { -namespace experimental -{ -void CLReshape::configure(const CLCompileContext &compile_context, const ITensorInfo *input, ITensorInfo *output) -{ - auto k = std::make_unique(); - k->configure(compile_context, input, output); - _kernel = std::move(k); -} - -Status CLReshape::validate(const ITensorInfo *input, const ITensorInfo *output) -{ - return arm_compute::CLReshapeLayerKernel::validate(input, output); -} -} // namespace experimental - struct CLReshapeLayer::Impl { - const ICLTensor *src{ nullptr }; - ICLTensor *dst{ nullptr }; - std::unique_ptr op{ nullptr }; + const ICLTensor *src{ nullptr }; + ICLTensor *dst{ nullptr }; + std::unique_ptr op{ nullptr }; }; CLReshapeLayer::CLReshapeLayer() @@ -69,14 +58,14 @@ void CLReshapeLayer::configure(const CLCompileContext &compile_context, const IC { _impl->src = input; _impl->dst = output; - _impl->op = std::make_unique(); + _impl->op = std::make_unique(); _impl->op->configure(compile_context, input->info(), output->info()); } Status CLReshapeLayer::validate(const ITensorInfo *input, const ITensorInfo *output) { ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(input, output); - ARM_COMPUTE_RETURN_ON_ERROR(experimental::CLReshape::validate(input, output)); + ARM_COMPUTE_RETURN_ON_ERROR(opencl::ClReshape::validate(input, output)); return Status{}; } @@ -89,4 +78,4 @@ void CLReshapeLayer::run() _impl->op->run(pack); } } // namespace arm_compute -/** [CLReshapeLayer snippet] **/ +/** [CLReshapeLayer snippet] **/ \ No newline at end of file -- cgit v1.2.1