From 27e67f0b2047cfa2f011f9e242e3068d9e106b39 Mon Sep 17 00:00:00 2001 From: Michalis Spyrou Date: Tue, 16 Feb 2021 11:34:39 +0000 Subject: Remove Compute Vision Neon support Resolves COMPMID-4150 Change-Id: I316e8ab97de796666c71eadfde894715fcf4a1aa Signed-off-by: Michalis Spyrou Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5141 Tested-by: Arm Jenkins Reviewed-by: Michele Di Giorgio Comments-Addressed: Arm Jenkins --- .../NEON/functions/NELaplacianReconstruct.cpp | 106 --------------------- 1 file changed, 106 deletions(-) delete mode 100644 src/runtime/NEON/functions/NELaplacianReconstruct.cpp (limited to 'src/runtime/NEON/functions/NELaplacianReconstruct.cpp') diff --git a/src/runtime/NEON/functions/NELaplacianReconstruct.cpp b/src/runtime/NEON/functions/NELaplacianReconstruct.cpp deleted file mode 100644 index a50e7ccbef..0000000000 --- a/src/runtime/NEON/functions/NELaplacianReconstruct.cpp +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (c) 2016-2020 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/runtime/NEON/functions/NELaplacianReconstruct.h" - -#include "arm_compute/core/CPP/ICPPKernel.h" -#include "arm_compute/core/Error.h" -#include "arm_compute/core/IPyramid.h" -#include "arm_compute/core/ITensor.h" -#include "arm_compute/core/TensorInfo.h" -#include "arm_compute/core/Validate.h" - -#include - -namespace arm_compute -{ -NELaplacianReconstruct::~NELaplacianReconstruct() = default; - -NELaplacianReconstruct::NELaplacianReconstruct() // NOLINT - : _tmp_pyr(), - _addf(), - _scalef(), - _depthf() -{ -} - -void NELaplacianReconstruct::configure(const IPyramid *pyramid, ITensor *input, ITensor *output, BorderMode border_mode, uint8_t constant_border_value) -{ - ARM_COMPUTE_ERROR_ON(nullptr == pyramid); - ARM_COMPUTE_ERROR_ON(input == output); - ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::S16); - ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(output, 1, DataType::U8); - ARM_COMPUTE_ERROR_ON(input->info()->num_dimensions() != pyramid->get_pyramid_level(0)->info()->num_dimensions()); - ARM_COMPUTE_ERROR_ON(output->info()->num_dimensions() != pyramid->get_pyramid_level(0)->info()->num_dimensions()); - ARM_COMPUTE_ERROR_ON(output->info()->dimension(0) != pyramid->get_pyramid_level(0)->info()->dimension(0)); - ARM_COMPUTE_ERROR_ON(output->info()->dimension(1) != pyramid->get_pyramid_level(0)->info()->dimension(1)); - ARM_COMPUTE_ERROR_ON(input->info()->dimension(0) != pyramid->get_pyramid_level(pyramid->info()->num_levels() - 1)->info()->dimension(0)); - ARM_COMPUTE_ERROR_ON(input->info()->dimension(1) != pyramid->get_pyramid_level(pyramid->info()->num_levels() - 1)->info()->dimension(1)); - - const size_t num_levels = pyramid->info()->num_levels(); - - // Create and initialize the tmp pyramid: I(n-2) = upsample( input + Laplace(n-1) ) - PyramidInfo pyramid_info; - pyramid_info.init(num_levels, 0.5f, output->info()->tensor_shape(), arm_compute::Format::S16); - - _tmp_pyr.init(pyramid_info); - - // Allocate add and scale functions. Level 0 does not need to be scaled. - _addf.resize(num_levels); - _scalef.resize(num_levels - 1); - - const size_t last_level = num_levels - 1; - - _addf[last_level].configure(input, pyramid->get_pyramid_level(last_level), _tmp_pyr.get_pyramid_level(last_level), ConvertPolicy::SATURATE); - - // Scale levels n-1 to 1, and add levels n-2 to 0 - for(size_t l = 0; l < last_level; ++l) - { - _scalef[l].configure(_tmp_pyr.get_pyramid_level(l + 1), _tmp_pyr.get_pyramid_level(l), ScaleKernelInfo{ arm_compute::InterpolationPolicy::NEAREST_NEIGHBOR, border_mode, constant_border_value, SamplingPolicy::CENTER, false }); - _addf[l].configure(_tmp_pyr.get_pyramid_level(l), pyramid->get_pyramid_level(l), _tmp_pyr.get_pyramid_level(l), ConvertPolicy::SATURATE); - } - - // Convert level 0 from S16 to U8 - _depthf.configure(_tmp_pyr.get_pyramid_level(0), output, ConvertPolicy::SATURATE, 0); - - _tmp_pyr.allocate(); -} - -void NELaplacianReconstruct::run() -{ - ARM_COMPUTE_ERROR_ON_MSG(_addf.empty(), "Unconfigured function"); - - const size_t last_level = _tmp_pyr.info()->num_levels() - 1; - - _addf[last_level].run(); - - // Run l = [last_level - 1, 0] - for(size_t l = last_level; l-- > 0;) - { - _scalef[l].run(); - _addf[l].run(); - } - - _depthf.run(); -} -} // namespace arm_compute -- cgit v1.2.1