diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2019-04-02 12:51:21 +0100 |
---|---|---|
committer | Giuseppe Rossini <giuseppe.rossini@arm.com> | 2019-04-02 16:23:17 +0000 |
commit | dbfc2dc182f90af5cad6fc283fff817ac7258a19 (patch) | |
tree | 5bf598dc0ddd76f60ce95da369e69300f3300670 /src/runtime/CL/functions/CLDeconvolutionLayerUpsample.cpp | |
parent | 881c6842eadf2d2fd4578b9f62ee6238a83cad65 (diff) | |
download | ComputeLibrary-dbfc2dc182f90af5cad6fc283fff817ac7258a19.tar.gz |
COMPMID-2069: Rework CL ML layers to run exclusively on CL.
Change-Id: If6cbf7a2e013d264e5d7f7cb54143ce32ba2687b
Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com>
Reviewed-on: https://review.mlplatform.org/c/934
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Isabella Gottardi <isabella.gottardi@arm.com>
Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/runtime/CL/functions/CLDeconvolutionLayerUpsample.cpp')
-rw-r--r-- | src/runtime/CL/functions/CLDeconvolutionLayerUpsample.cpp | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/src/runtime/CL/functions/CLDeconvolutionLayerUpsample.cpp b/src/runtime/CL/functions/CLDeconvolutionLayerUpsample.cpp index ce8667d656..c66dff01c5 100644 --- a/src/runtime/CL/functions/CLDeconvolutionLayerUpsample.cpp +++ b/src/runtime/CL/functions/CLDeconvolutionLayerUpsample.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 ARM Limited. + * Copyright (c) 2017-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -27,14 +27,11 @@ #include "arm_compute/core/Utils.h" #include "arm_compute/runtime/CL/CLScheduler.h" -#include <cmath> -#include <memory> -#include <tuple> - -using namespace arm_compute; - +namespace arm_compute +{ CLDeconvolutionLayerUpsample::CLDeconvolutionLayerUpsample() // NOLINT : _upsample(), + _memset(), _output(nullptr) { } @@ -51,22 +48,13 @@ void CLDeconvolutionLayerUpsample::configure(ICLTensor *input, ICLTensor *output ARM_COMPUTE_ERROR_ON_NULLPTR(input, output); _output = output; + _memset.configure(_output, PixelValue(0, _output->info()->data_type(), _output->info()->quantization_info())); _upsample.configure(input, _output, inner_border, info); } void CLDeconvolutionLayerUpsample::run() { - _output->map(CLScheduler::get().queue(), true); - if(is_data_type_quantized_asymmetric(_output->info()->data_type())) - { - const uint8_t quantized_zero = _output->info()->quantization_info().offset; - std::fill_n(_output->buffer(), _output->info()->total_size(), quantized_zero); - } - else - { - memset(_output->buffer(), 0, _output->info()->total_size()); - } - _output->unmap(CLScheduler::get().queue()); - - CLScheduler::get().enqueue(_upsample, false); + CLScheduler::get().enqueue(_memset, false); + CLScheduler::get().enqueue(_upsample, true); } +} // namespace arm_compute
\ No newline at end of file |