diff options
author | Sheri Zhang <sheri.zhang@arm.com> | 2021-02-02 11:49:34 +0000 |
---|---|---|
committer | Sheri Zhang <sheri.zhang@arm.com> | 2021-02-08 13:35:26 +0000 |
commit | 7e20e29904c98adae5a91c6492fd78da88b7a9bf (patch) | |
tree | 96309359fd28c2244984ed1d4d1a9069528b64dc /src/runtime/CL/functions/CLReshapeLayer.cpp | |
parent | afc9c3df7600dcecf12d3d3a4686d2008502a813 (diff) | |
download | ComputeLibrary-7e20e29904c98adae5a91c6492fd78da88b7a9bf.tar.gz |
Make memset/copy functions state-less
Port following functions:
- CLCopy
- CLFill
- CLPermute
- CLReshapeLayer
- CLCropResize
Resolves: COMPMID-4002
Signed-off-by: Sheri Zhang <sheri.zhang@arm.com>
Change-Id: I8392aa515aaeb5b44dab6122be6a795d08376d5f
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5003
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/runtime/CL/functions/CLReshapeLayer.cpp')
-rw-r--r-- | src/runtime/CL/functions/CLReshapeLayer.cpp | 35 |
1 files changed, 12 insertions, 23 deletions
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<CLReshapeLayerKernel>(); - 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<experimental::CLReshape> op{ nullptr }; + const ICLTensor *src{ nullptr }; + ICLTensor *dst{ nullptr }; + std::unique_ptr<opencl::ClReshape> 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<experimental::CLReshape>(); + _impl->op = std::make_unique<opencl::ClReshape>(); _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 |