From 94450f1fc91a89778354c2e1c07a328ba86d9cfc Mon Sep 17 00:00:00 2001 From: Moritz Pflanzer Date: Fri, 30 Jun 2017 12:48:43 +0100 Subject: COMPMID-417: Use a common create_tensor function Change-Id: I6b0511484a5b433ebec3fd62d778e64dcb4f89b5 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/79362 Reviewed-by: Georgios Pinitas Tested-by: Kaizen --- tests/CL/Helper.h | 76 ---------------------- tests/NEON/Helper.h | 43 +----------- tests/Utils.h | 18 +++++ tests/benchmark/CL/ActivationLayer.cpp | 1 - tests/benchmark/CL/BitwiseAnd.cpp | 8 +-- tests/benchmark/CL/ConvolutionLayer.cpp | 1 - tests/benchmark/CL/FullyConnectedLayer.cpp | 1 - tests/benchmark/CL/GEMM.cpp | 1 - tests/benchmark/CL/GEMM.h | 8 +-- tests/benchmark/CL/NormalizationLayer.cpp | 1 - tests/benchmark/CL/PoolingLayer.cpp | 1 - tests/benchmark/NEON/ActivationLayer.cpp | 1 - tests/benchmark/NEON/BitwiseAnd.cpp | 8 +-- tests/benchmark/NEON/ConvolutionLayer.cpp | 1 - tests/benchmark/NEON/ConvolutionLayerDirect.cpp | 1 - tests/benchmark/NEON/FullyConnectedLayer.cpp | 1 - tests/benchmark/NEON/GEMM.cpp | 1 - tests/benchmark/NEON/GEMM.h | 8 +-- tests/benchmark/NEON/NormalizationLayer.cpp | 1 - tests/benchmark/NEON/PoolingLayer.cpp | 1 - tests/benchmark/common/ActivationLayer.h | 4 +- tests/benchmark/common/ConvolutionLayer.h | 8 +-- tests/benchmark/common/FullyConnectedLayer.h | 8 +-- tests/benchmark/common/NormalizationLayer.h | 4 +- tests/benchmark/common/PoolingLayer.h | 4 +- tests/benchmark/system_tests/CL/AlexNet.cpp | 1 - tests/benchmark/system_tests/CL/LeNet5.cpp | 1 - tests/benchmark/system_tests/NEON/AlexNet.cpp | 1 - tests/benchmark/system_tests/NEON/LeNet5.cpp | 1 - tests/benchmark/system_tests/common/AlexNet.h | 4 +- tests/benchmark/system_tests/common/LeNet5.h | 6 +- tests/model_objects/AlexNet.h | 5 +- tests/model_objects/LeNet5.h | 5 +- tests/validation/CL/ActivationLayer.cpp | 9 ++- tests/validation/CL/BitwiseAnd.cpp | 19 +++--- tests/validation/CL/Box3x3.cpp | 9 ++- tests/validation/CL/CMakeLists.txt | 1 - tests/validation/CL/DepthConvert.cpp | 9 ++- tests/validation/CL/FillBorder.cpp | 3 +- tests/validation/CL/Gaussian3x3.cpp | 9 ++- tests/validation/CL/Gaussian5x5.cpp | 9 ++- tests/validation/CL/IntegralImage.cpp | 9 ++- tests/validation/CL/NonLinearFilter.cpp | 9 ++- tests/validation/CL/PoolingLayer.cpp | 7 +- tests/validation/CL/Sobel3x3.cpp | 13 ++-- tests/validation/CL/Sobel5x5.cpp | 13 ++-- tests/validation/CL/SoftmaxLayer.cpp | 9 ++- tests/validation/CL/Threshold.cpp | 9 ++- tests/validation/NEON/AbsoluteDifference.cpp | 19 +++--- tests/validation/NEON/Accumulate.cpp | 9 ++- tests/validation/NEON/AccumulateSquared.cpp | 9 ++- tests/validation/NEON/AccumulateWeighted.cpp | 9 ++- tests/validation/NEON/ActivationLayer.cpp | 9 ++- tests/validation/NEON/ArithmeticAddition.cpp | 25 ++++--- tests/validation/NEON/ArithmeticSubtraction.cpp | 25 ++++--- tests/validation/NEON/BatchNormalizationLayer.cpp | 27 ++++---- tests/validation/NEON/BitwiseAnd.cpp | 19 +++--- tests/validation/NEON/BitwiseNot.cpp | 9 ++- tests/validation/NEON/BitwiseOr.cpp | 13 ++-- tests/validation/NEON/BitwiseXor.cpp | 13 ++-- tests/validation/NEON/Box3x3.cpp | 9 ++- tests/validation/NEON/CMakeLists.txt | 1 - tests/validation/NEON/ConvolutionLayer.cpp | 19 +++--- tests/validation/NEON/ConvolutionLayerDirect.cpp | 9 ++- tests/validation/NEON/DepthConvert.cpp | 9 ++- tests/validation/NEON/FillBorder.cpp | 3 +- tests/validation/NEON/Fixedpoint/Exp_QS16.cpp | 5 +- tests/validation/NEON/Fixedpoint/Exp_QS8.cpp | 5 +- tests/validation/NEON/Fixedpoint/Invsqrt_QS16.cpp | 5 +- tests/validation/NEON/Fixedpoint/Invsqrt_QS8.cpp | 5 +- tests/validation/NEON/Fixedpoint/Log_QS16.cpp | 5 +- tests/validation/NEON/Fixedpoint/Log_QS8.cpp | 5 +- .../validation/NEON/Fixedpoint/Reciprocal_QS16.cpp | 5 +- .../validation/NEON/Fixedpoint/Reciprocal_QS8.cpp | 5 +- tests/validation/NEON/FullyConnectedLayer.cpp | 19 +++--- tests/validation/NEON/GEMM.cpp | 17 +++-- tests/validation/NEON/Gaussian3x3.cpp | 9 ++- tests/validation/NEON/Gaussian5x5.cpp | 9 ++- tests/validation/NEON/IntegralImage.cpp | 9 ++- tests/validation/NEON/MeanStdDev.cpp | 5 +- tests/validation/NEON/NonLinearFilter.cpp | 9 ++- tests/validation/NEON/NormalizationLayer.cpp | 7 +- tests/validation/NEON/PixelWiseMultiplication.cpp | 43 ++++++------ tests/validation/NEON/PoolingLayer.cpp | 8 +-- tests/validation/NEON/ROIPoolingLayer.cpp | 6 +- tests/validation/NEON/Sobel3x3.cpp | 13 ++-- tests/validation/NEON/Sobel5x5.cpp | 13 ++-- tests/validation/NEON/SoftmaxLayer.cpp | 9 ++- tests/validation/NEON/Threshold.cpp | 9 ++- tests/validation/system_tests/CL/AlexNet.cpp | 1 - tests/validation/system_tests/CL/LeNet5.cpp | 1 - tests/validation/system_tests/NEON/AlexNet.cpp | 1 - tests/validation/system_tests/NEON/LeNet5.cpp | 1 - 93 files changed, 339 insertions(+), 497 deletions(-) delete mode 100644 tests/CL/Helper.h (limited to 'tests') diff --git a/tests/CL/Helper.h b/tests/CL/Helper.h deleted file mode 100644 index a6063e95ae..0000000000 --- a/tests/CL/Helper.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) 2017 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. - */ -#ifndef __ARM_COMPUTE_TEST_CL_HELPER_H__ -#define __ARM_COMPUTE_TEST_CL_HELPER_H__ - -#include "Globals.h" -#include "TensorLibrary.h" - -#include "arm_compute/runtime/CL/CLTensor.h" - -namespace arm_compute -{ -namespace test -{ -namespace cl -{ -/** Helper to create an empty tensor. - * - * @param[in] shape Desired shape. - * @param[in] data_type Desired data type. - * @param[in] num_channels (Optional) It indicates the number of channels for each tensor element - * @param[in] fixed_point_position (Optional) Fixed point position that expresses the number of bits for the fractional part of the number when the tensor's data type is QS8 or QS16. - * - * @return Empty @ref CLTensor with the specified shape and data type. - */ -inline CLTensor create_tensor(const TensorShape &shape, DataType data_type, int num_channels = 1, int fixed_point_position = 0) -{ - CLTensor tensor; - tensor.allocator()->init(TensorInfo(shape, num_channels, data_type, fixed_point_position)); - - return tensor; -} - -/** Helper to create an empty tensor. - * - * @param[in] name File name from which to get the dimensions. - * @param[in] data_type Desired data type. - * - * @return Empty @ref CLTensor with the specified shape and data type. - */ -inline CLTensor create_tensor(const std::string &name, DataType data_type) -{ - constexpr unsigned int num_channels = 1; - - const RawTensor &raw = library->get(name); - - CLTensor tensor; - tensor.allocator()->init(TensorInfo(raw.shape(), num_channels, data_type)); - - return tensor; -} -} // namespace cl -} // namespace test -} // namespace arm_compute -#endif diff --git a/tests/NEON/Helper.h b/tests/NEON/Helper.h index e64ac27ef3..e77615406e 100644 --- a/tests/NEON/Helper.h +++ b/tests/NEON/Helper.h @@ -24,11 +24,9 @@ #ifndef __ARM_COMPUTE_TEST_NEON_HELPER_H__ #define __ARM_COMPUTE_TEST_NEON_HELPER_H__ -#include "Globals.h" -#include "TensorLibrary.h" - #include "arm_compute/runtime/Array.h" -#include "arm_compute/runtime/Tensor.h" + +#include namespace arm_compute { @@ -36,43 +34,6 @@ namespace test { namespace neon { -/** Helper to create an empty tensor. - * - * @param[in] shape Desired shape. - * @param[in] data_type Desired data type. - * @param[in] num_channels (Optional) It indicates the number of channels for each tensor element - * @param[in] fixed_point_position (Optional) Fixed point position that expresses the number of bits for the fractional part of the number when the tensor's data type is QS8 or QS16. - * - * @return Empty @ref Tensor with the specified shape and data type. - */ -inline Tensor create_tensor(const TensorShape &shape, DataType data_type, int num_channels = 1, int fixed_point_position = 0) -{ - Tensor tensor; - tensor.allocator()->init(TensorInfo(shape, num_channels, data_type, fixed_point_position)); - - return tensor; -} - -/** Helper to create an empty tensor. - * - * @param[in] name File name from which to get the dimensions. - * @param[in] data_type Desired data type. - * @param[in] fixed_point_position (Optional) Number of bits for the fractional part of the fixed point numbers - * - * @return Empty @ref Tensor with the specified shape and data type. - */ -inline Tensor create_tensor(const std::string &name, DataType data_type, int fixed_point_position = 0) -{ - constexpr unsigned int num_channels = 1; - - const RawTensor &raw = library->get(name); - - Tensor tensor; - tensor.allocator()->init(TensorInfo(raw.shape(), num_channels, data_type, fixed_point_position)); - - return tensor; -} - template Array create_array(const std::vector &v) { diff --git a/tests/Utils.h b/tests/Utils.h index 3be046182a..8d5046da34 100644 --- a/tests/Utils.h +++ b/tests/Utils.h @@ -397,6 +397,24 @@ inline bool is_in_valid_region(const ValidRegion &valid_region, const Coordinate } return true; } + +/** Create and initialize a tensor of the given type. + * + * @param[in] shape Tensor shape. + * @param[in] data_type Data type. + * @param[in] num_channels (Optional) Number of channels. + * @param[in] fixed_point_position (Optional) Number of fractional bits. + * + * @return Initialized tensor of given type. + */ +template +inline T create_tensor(const TensorShape &shape, DataType data_type, int num_channels = 1, int fixed_point_position = 0) +{ + T tensor; + tensor.allocator()->init(TensorInfo(shape, num_channels, data_type, fixed_point_position)); + + return tensor; +} } // namespace test } // namespace arm_compute #endif diff --git a/tests/benchmark/CL/ActivationLayer.cpp b/tests/benchmark/CL/ActivationLayer.cpp index 5180d3d900..52a357b2a6 100644 --- a/tests/benchmark/CL/ActivationLayer.cpp +++ b/tests/benchmark/CL/ActivationLayer.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "CL/CLAccessor.h" -#include "CL/Helper.h" #include "Globals.h" #include "TensorLibrary.h" #include "benchmark/Datasets.h" diff --git a/tests/benchmark/CL/BitwiseAnd.cpp b/tests/benchmark/CL/BitwiseAnd.cpp index a3deb3eb5b..4858c73948 100644 --- a/tests/benchmark/CL/BitwiseAnd.cpp +++ b/tests/benchmark/CL/BitwiseAnd.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "CL/CLAccessor.h" -#include "CL/Helper.h" #include "Globals.h" #include "TensorLibrary.h" #include "benchmark/Datasets.h" @@ -59,11 +58,12 @@ public: profiler.add(std::make_shared()); const std::string image_name = *(DataSet().begin() + state.range(0)); + const RawTensor &raw = library->get(image_name); // Create tensors - src1 = create_tensor(image_name, DataType::U8); - src2 = create_tensor(image_name, DataType::U8); - dst = create_tensor(image_name, DataType::U8); + src1 = create_tensor(raw.shape(), DataType::U8); + src2 = create_tensor(raw.shape(), DataType::U8); + dst = create_tensor(raw.shape(), DataType::U8); // Create and configure function band.configure(&src1, &src2, &dst); diff --git a/tests/benchmark/CL/ConvolutionLayer.cpp b/tests/benchmark/CL/ConvolutionLayer.cpp index e1f4fabdc3..e790273f9c 100644 --- a/tests/benchmark/CL/ConvolutionLayer.cpp +++ b/tests/benchmark/CL/ConvolutionLayer.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "CL/CLAccessor.h" -#include "CL/Helper.h" #include "Globals.h" #include "TensorLibrary.h" #include "benchmark/Datasets.h" diff --git a/tests/benchmark/CL/FullyConnectedLayer.cpp b/tests/benchmark/CL/FullyConnectedLayer.cpp index 6e8c89fa0b..fb8e1bc09f 100644 --- a/tests/benchmark/CL/FullyConnectedLayer.cpp +++ b/tests/benchmark/CL/FullyConnectedLayer.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "CL/CLAccessor.h" -#include "CL/Helper.h" #include "Globals.h" #include "TensorLibrary.h" #include "benchmark/Datasets.h" diff --git a/tests/benchmark/CL/GEMM.cpp b/tests/benchmark/CL/GEMM.cpp index a10da09cbe..87dad05f30 100644 --- a/tests/benchmark/CL/GEMM.cpp +++ b/tests/benchmark/CL/GEMM.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "CL/CLAccessor.h" -#include "CL/Helper.h" #include "Globals.h" #include "TensorLibrary.h" #include "benchmark/Datasets.h" diff --git a/tests/benchmark/CL/GEMM.h b/tests/benchmark/CL/GEMM.h index 02a339609c..ca3d9ad594 100644 --- a/tests/benchmark/CL/GEMM.h +++ b/tests/benchmark/CL/GEMM.h @@ -59,10 +59,10 @@ public: TensorShape shape_d = gemm_obj.shape_d; // Create tensors - a = create_tensor(shape_a, data_type); - b = create_tensor(shape_b, data_type); - c = create_tensor(shape_c, data_type); - d = create_tensor(shape_d, data_type); + a = create_tensor(shape_a, data_type); + b = create_tensor(shape_b, data_type); + c = create_tensor(shape_c, data_type); + d = create_tensor(shape_d, data_type); // Create and configure function gemm_layer = std::unique_ptr(new Function()); diff --git a/tests/benchmark/CL/NormalizationLayer.cpp b/tests/benchmark/CL/NormalizationLayer.cpp index 81d3c65912..28f89dce1f 100644 --- a/tests/benchmark/CL/NormalizationLayer.cpp +++ b/tests/benchmark/CL/NormalizationLayer.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "CL/CLAccessor.h" -#include "CL/Helper.h" #include "Globals.h" #include "TensorLibrary.h" #include "benchmark/Datasets.h" diff --git a/tests/benchmark/CL/PoolingLayer.cpp b/tests/benchmark/CL/PoolingLayer.cpp index 5285f279e7..05764a412a 100644 --- a/tests/benchmark/CL/PoolingLayer.cpp +++ b/tests/benchmark/CL/PoolingLayer.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "CL/CLAccessor.h" -#include "CL/Helper.h" #include "Globals.h" #include "TensorLibrary.h" #include "benchmark/Datasets.h" diff --git a/tests/benchmark/NEON/ActivationLayer.cpp b/tests/benchmark/NEON/ActivationLayer.cpp index 8faed9f831..9ea675e515 100644 --- a/tests/benchmark/NEON/ActivationLayer.cpp +++ b/tests/benchmark/NEON/ActivationLayer.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "Globals.h" -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "TensorLibrary.h" #include "benchmark/Datasets.h" diff --git a/tests/benchmark/NEON/BitwiseAnd.cpp b/tests/benchmark/NEON/BitwiseAnd.cpp index dba3d1ebea..be68fd39e4 100644 --- a/tests/benchmark/NEON/BitwiseAnd.cpp +++ b/tests/benchmark/NEON/BitwiseAnd.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "Globals.h" -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "TensorLibrary.h" #include "benchmark/Datasets.h" @@ -56,11 +55,12 @@ public: profiler.add(std::make_shared()); const std::string image_name = *(DataSet().begin() + state.range(0)); + const RawTensor &raw = library->get(image_name); // Create tensors - src1 = create_tensor(image_name, DataType::U8); - src2 = create_tensor(image_name, DataType::U8); - dst = create_tensor(image_name, DataType::U8); + src1 = create_tensor(raw.shape(), DataType::U8); + src2 = create_tensor(raw.shape(), DataType::U8); + dst = create_tensor(raw.shape(), DataType::U8); // Create and configure function band.configure(&src1, &src2, &dst); diff --git a/tests/benchmark/NEON/ConvolutionLayer.cpp b/tests/benchmark/NEON/ConvolutionLayer.cpp index 0cfff8494b..a0b1236177 100644 --- a/tests/benchmark/NEON/ConvolutionLayer.cpp +++ b/tests/benchmark/NEON/ConvolutionLayer.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "Globals.h" -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "TensorLibrary.h" #include "benchmark/Datasets.h" diff --git a/tests/benchmark/NEON/ConvolutionLayerDirect.cpp b/tests/benchmark/NEON/ConvolutionLayerDirect.cpp index bc56e844d8..bbe5707e41 100644 --- a/tests/benchmark/NEON/ConvolutionLayerDirect.cpp +++ b/tests/benchmark/NEON/ConvolutionLayerDirect.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "Globals.h" -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "TensorLibrary.h" #include "benchmark/Datasets.h" diff --git a/tests/benchmark/NEON/FullyConnectedLayer.cpp b/tests/benchmark/NEON/FullyConnectedLayer.cpp index 85979203ac..15c2a407e6 100644 --- a/tests/benchmark/NEON/FullyConnectedLayer.cpp +++ b/tests/benchmark/NEON/FullyConnectedLayer.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "Globals.h" -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "TensorLibrary.h" #include "benchmark/Datasets.h" diff --git a/tests/benchmark/NEON/GEMM.cpp b/tests/benchmark/NEON/GEMM.cpp index 50131b4998..1655c32e2b 100644 --- a/tests/benchmark/NEON/GEMM.cpp +++ b/tests/benchmark/NEON/GEMM.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "Globals.h" -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "TensorLibrary.h" #include "benchmark/Datasets.h" diff --git a/tests/benchmark/NEON/GEMM.h b/tests/benchmark/NEON/GEMM.h index 24d196523f..4f0557d610 100644 --- a/tests/benchmark/NEON/GEMM.h +++ b/tests/benchmark/NEON/GEMM.h @@ -63,10 +63,10 @@ public: TensorShape shape_d = gemm_obj.shape_d; // Create tensors - a = create_tensor(shape_a, data_type, 1, 4); - b = create_tensor(shape_b, data_type, 1, 4); - c = create_tensor(shape_c, data_type, 1, 4); - d = create_tensor(shape_d, data_type, 1, 4); + a = create_tensor(shape_a, data_type, 1, 4); + b = create_tensor(shape_b, data_type, 1, 4); + c = create_tensor(shape_c, data_type, 1, 4); + d = create_tensor(shape_d, data_type, 1, 4); // Create and configure function gemm_layer = std::unique_ptr(new Function()); diff --git a/tests/benchmark/NEON/NormalizationLayer.cpp b/tests/benchmark/NEON/NormalizationLayer.cpp index 46dc56b84d..8ea8c95cda 100644 --- a/tests/benchmark/NEON/NormalizationLayer.cpp +++ b/tests/benchmark/NEON/NormalizationLayer.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "Globals.h" -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "TensorLibrary.h" #include "benchmark/Datasets.h" diff --git a/tests/benchmark/NEON/PoolingLayer.cpp b/tests/benchmark/NEON/PoolingLayer.cpp index 9b071317b4..dfa75497cd 100644 --- a/tests/benchmark/NEON/PoolingLayer.cpp +++ b/tests/benchmark/NEON/PoolingLayer.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "Globals.h" -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "TensorLibrary.h" #include "benchmark/Datasets.h" diff --git a/tests/benchmark/common/ActivationLayer.h b/tests/benchmark/common/ActivationLayer.h index 7edfb6ef3c..8e22281025 100644 --- a/tests/benchmark/common/ActivationLayer.h +++ b/tests/benchmark/common/ActivationLayer.h @@ -57,8 +57,8 @@ public: shape.set(shape.num_dimensions(), batches); // Create tensors - src = create_tensor(shape, dt, 1, fixed_point_position); - dst = create_tensor(shape, dt, 1, fixed_point_position); + src = create_tensor(shape, dt, 1, fixed_point_position); + dst = create_tensor(shape, dt, 1, fixed_point_position); // Create and configure function act_layer.configure(&src, &dst, act_obj.info); diff --git a/tests/benchmark/common/ConvolutionLayer.h b/tests/benchmark/common/ConvolutionLayer.h index 594c62c50e..a777a95bde 100644 --- a/tests/benchmark/common/ConvolutionLayer.h +++ b/tests/benchmark/common/ConvolutionLayer.h @@ -59,10 +59,10 @@ public: dst_shape.set(3 /* batch */, batches); // Create tensors - src = create_tensor(src_shape, dt, 1, fixed_point_position); - weights = create_tensor(conv_obj.weights_shape, dt, 1, fixed_point_position); - bias = create_tensor(conv_obj.bias_shape, dt, 1, fixed_point_position); - dst = create_tensor(dst_shape, dt, 1, fixed_point_position); + src = create_tensor(src_shape, dt, 1, fixed_point_position); + weights = create_tensor(conv_obj.weights_shape, dt, 1, fixed_point_position); + bias = create_tensor(conv_obj.bias_shape, dt, 1, fixed_point_position); + dst = create_tensor(dst_shape, dt, 1, fixed_point_position); // Create and configure function conv_layer = std::unique_ptr(new Function()); diff --git a/tests/benchmark/common/FullyConnectedLayer.h b/tests/benchmark/common/FullyConnectedLayer.h index 88adf83f2a..eeef1de28a 100644 --- a/tests/benchmark/common/FullyConnectedLayer.h +++ b/tests/benchmark/common/FullyConnectedLayer.h @@ -60,10 +60,10 @@ public: dst_shape.set(dst_shape.num_dimensions(), batches); // Create tensors - src = create_tensor(src_shape, dt, 1, fixed_point_position); - weights = create_tensor(fc_obj.weights_shape, dt, 1, fixed_point_position); - bias = create_tensor(fc_obj.bias_shape, dt, 1, fixed_point_position); - dst = create_tensor(dst_shape, dt, 1, fixed_point_position); + src = create_tensor(src_shape, dt, 1, fixed_point_position); + weights = create_tensor(fc_obj.weights_shape, dt, 1, fixed_point_position); + bias = create_tensor(fc_obj.bias_shape, dt, 1, fixed_point_position); + dst = create_tensor(dst_shape, dt, 1, fixed_point_position); // Create and configure function fc_layer = std::unique_ptr(new Function()); diff --git a/tests/benchmark/common/NormalizationLayer.h b/tests/benchmark/common/NormalizationLayer.h index 4593fb7df3..580dca6c48 100644 --- a/tests/benchmark/common/NormalizationLayer.h +++ b/tests/benchmark/common/NormalizationLayer.h @@ -58,8 +58,8 @@ public: shape.set(shape.num_dimensions(), batches); // Create tensors - src = create_tensor(shape, dt, 1, fixed_point_position); - dst = create_tensor(shape, dt, 1, fixed_point_position); + src = create_tensor(shape, dt, 1, fixed_point_position); + dst = create_tensor(shape, dt, 1, fixed_point_position); // Create and configure function norm_layer = std::unique_ptr(new Function()); diff --git a/tests/benchmark/common/PoolingLayer.h b/tests/benchmark/common/PoolingLayer.h index 5bb332fd6b..96ff905568 100644 --- a/tests/benchmark/common/PoolingLayer.h +++ b/tests/benchmark/common/PoolingLayer.h @@ -59,8 +59,8 @@ public: dst_shape.set(dst_shape.num_dimensions(), batches); // Create tensors - src = create_tensor(src_shape, dt, 1, fixed_point_position); - dst = create_tensor(dst_shape, dt, 1, fixed_point_position); + src = create_tensor(src_shape, dt, 1, fixed_point_position); + dst = create_tensor(dst_shape, dt, 1, fixed_point_position); // Create and configure function pool_layer.configure(&src, &dst, pool_obj.info); diff --git a/tests/benchmark/system_tests/CL/AlexNet.cpp b/tests/benchmark/system_tests/CL/AlexNet.cpp index fe0b9913de..04b65b8c39 100644 --- a/tests/benchmark/system_tests/CL/AlexNet.cpp +++ b/tests/benchmark/system_tests/CL/AlexNet.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "CL/CLAccessor.h" -#include "CL/Helper.h" #include "Globals.h" #include "TensorLibrary.h" #include "benchmark/Datasets.h" diff --git a/tests/benchmark/system_tests/CL/LeNet5.cpp b/tests/benchmark/system_tests/CL/LeNet5.cpp index d65a7dde6c..60bb37a35b 100644 --- a/tests/benchmark/system_tests/CL/LeNet5.cpp +++ b/tests/benchmark/system_tests/CL/LeNet5.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "CL/CLAccessor.h" -#include "CL/Helper.h" #include "Globals.h" #include "TensorLibrary.h" #include "benchmark/Datasets.h" diff --git a/tests/benchmark/system_tests/NEON/AlexNet.cpp b/tests/benchmark/system_tests/NEON/AlexNet.cpp index 2d222e7309..530c400ae3 100644 --- a/tests/benchmark/system_tests/NEON/AlexNet.cpp +++ b/tests/benchmark/system_tests/NEON/AlexNet.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "Globals.h" -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "TensorLibrary.h" #include "benchmark/Datasets.h" diff --git a/tests/benchmark/system_tests/NEON/LeNet5.cpp b/tests/benchmark/system_tests/NEON/LeNet5.cpp index 5170f05a70..8724d8ba3a 100644 --- a/tests/benchmark/system_tests/NEON/LeNet5.cpp +++ b/tests/benchmark/system_tests/NEON/LeNet5.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "Globals.h" -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "TensorLibrary.h" #include "benchmark/Datasets.h" diff --git a/tests/benchmark/system_tests/common/AlexNet.h b/tests/benchmark/system_tests/common/AlexNet.h index 9c93dc7228..46e26bf723 100644 --- a/tests/benchmark/system_tests/common/AlexNet.h +++ b/tests/benchmark/system_tests/common/AlexNet.h @@ -24,8 +24,8 @@ #ifndef __ARM_COMPUTE_TEST_BENCHMARK_ALEXNET_H__ #define __ARM_COMPUTE_TEST_BENCHMARK_ALEXNET_H__ -#include "TensorLibrary.h" -#include "Utils.h" +#include "tests/TensorLibrary.h" +#include "tests/Utils.h" #include "benchmark/Profiler.h" #include "benchmark/WallClockTimer.h" diff --git a/tests/benchmark/system_tests/common/LeNet5.h b/tests/benchmark/system_tests/common/LeNet5.h index db34f6813a..cca1bbf3f3 100644 --- a/tests/benchmark/system_tests/common/LeNet5.h +++ b/tests/benchmark/system_tests/common/LeNet5.h @@ -24,8 +24,8 @@ #ifndef __ARM_COMPUTE_TEST_BENCHMARK_LENET5_H__ #define __ARM_COMPUTE_TEST_BENCHMARK_LENET5_H__ -#include "TensorLibrary.h" -#include "Utils.h" +#include "tests/TensorLibrary.h" +#include "tests/Utils.h" #include "benchmark/Profiler.h" #include "benchmark/WallClockTimer.h" @@ -79,4 +79,4 @@ public: } // namespace benchmark } // namespace test } // namespace arm_compute -#endif //__ARM_COMPUTE_TEST_BENCHMARK_LENET5_H__ +#endif diff --git a/tests/model_objects/AlexNet.h b/tests/model_objects/AlexNet.h index 8443e9c97e..672942d365 100644 --- a/tests/model_objects/AlexNet.h +++ b/tests/model_objects/AlexNet.h @@ -24,8 +24,9 @@ #ifndef __ARM_COMPUTE_TEST_MODEL_OBJECTS_ALEXNET_H__ #define __ARM_COMPUTE_TEST_MODEL_OBJECTS_ALEXNET_H__ -#include "TensorLibrary.h" -#include "Utils.h" +#include "tests/Globals.h" +#include "tests/TensorLibrary.h" +#include "tests/Utils.h" #include diff --git a/tests/model_objects/LeNet5.h b/tests/model_objects/LeNet5.h index 7d5090f5d0..3a9046c205 100644 --- a/tests/model_objects/LeNet5.h +++ b/tests/model_objects/LeNet5.h @@ -24,8 +24,9 @@ #ifndef __ARM_COMPUTE_TEST_MODEL_OBJECTS_LENET5_H__ #define __ARM_COMPUTE_TEST_MODEL_OBJECTS_LENET5_H__ -#include "TensorLibrary.h" -#include "Utils.h" +#include "tests/Globals.h" +#include "tests/TensorLibrary.h" +#include "tests/Utils.h" #include diff --git a/tests/validation/CL/ActivationLayer.cpp b/tests/validation/CL/ActivationLayer.cpp index 793ab30942..5d266e60d2 100644 --- a/tests/validation/CL/ActivationLayer.cpp +++ b/tests/validation/CL/ActivationLayer.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "CL/CLAccessor.h" -#include "CL/Helper.h" #include "Globals.h" #include "PaddingCalculator.h" #include "TensorLibrary.h" @@ -87,8 +86,8 @@ float activation_layer_tolerance(ActivationLayerInfo::ActivationFunction activat CLTensor compute_activation_layer(bool in_place, const TensorShape &shape, DataType dt, ActivationLayerInfo act_info, int fixed_point_position = 0) { // Create tensors - CLTensor src = create_tensor(shape, dt, 1, fixed_point_position); - CLTensor dst = create_tensor(shape, dt, 1, fixed_point_position); + CLTensor src = create_tensor(shape, dt, 1, fixed_point_position); + CLTensor dst = create_tensor(shape, dt, 1, fixed_point_position); // Create and configure function CLActivationLayer act_layer; @@ -155,8 +154,8 @@ BOOST_DATA_TEST_CASE(Configuration, boost::unit_test::data::make({ false, true } const int fixed_point_position = (arm_compute::is_data_type_fixed_point(dt)) ? 3 : 0; // Create tensors - CLTensor src = create_tensor(shape, dt, 1, fixed_point_position); - CLTensor dst = create_tensor(shape, dt, 1, fixed_point_position); + CLTensor src = create_tensor(shape, dt, 1, fixed_point_position); + CLTensor dst = create_tensor(shape, dt, 1, fixed_point_position); BOOST_TEST(src.info()->is_resizable()); BOOST_TEST(dst.info()->is_resizable()); diff --git a/tests/validation/CL/BitwiseAnd.cpp b/tests/validation/CL/BitwiseAnd.cpp index 8b40affe60..c818fc5d98 100644 --- a/tests/validation/CL/BitwiseAnd.cpp +++ b/tests/validation/CL/BitwiseAnd.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "CL/CLAccessor.h" -#include "CL/Helper.h" #include "Globals.h" #include "PaddingCalculator.h" #include "TensorLibrary.h" @@ -60,9 +59,9 @@ namespace CLTensor compute_bitwise_and(const TensorShape &shape) { // Create tensors - CLTensor src1 = create_tensor(shape, DataType::U8); - CLTensor src2 = create_tensor(shape, DataType::U8); - CLTensor dst = create_tensor(shape, DataType::U8); + CLTensor src1 = create_tensor(shape, DataType::U8); + CLTensor src2 = create_tensor(shape, DataType::U8); + CLTensor dst = create_tensor(shape, DataType::U8); // Create and configure function CLBitwiseAnd band; @@ -96,9 +95,9 @@ CLTensor compute_bitwise_and(const TensorShape &shape) CLTensor compute_bitwise_and_subtensor(const TensorShape &shape) { // Create tensors - CLTensor src1 = create_tensor(shape, DataType::U8); - CLTensor src2 = create_tensor(shape, DataType::U8); - CLTensor dst = create_tensor(shape, DataType::U8); + CLTensor src1 = create_tensor(shape, DataType::U8); + CLTensor src2 = create_tensor(shape, DataType::U8); + CLTensor dst = create_tensor(shape, DataType::U8); // Create SubTensors int coord_z = shape.z() / 2; @@ -147,9 +146,9 @@ BOOST_TEST_DECORATOR(*boost::unit_test::label("precommit") * boost::unit_test::l BOOST_DATA_TEST_CASE(Configuration, SmallShapes() + LargeShapes(), shape) { // Create tensors - CLTensor src1 = create_tensor(shape, DataType::U8); - CLTensor src2 = create_tensor(shape, DataType::U8); - CLTensor dst = create_tensor(shape, DataType::U8); + CLTensor src1 = create_tensor(shape, DataType::U8); + CLTensor src2 = create_tensor(shape, DataType::U8); + CLTensor dst = create_tensor(shape, DataType::U8); BOOST_TEST(src1.info()->is_resizable()); BOOST_TEST(src2.info()->is_resizable()); diff --git a/tests/validation/CL/Box3x3.cpp b/tests/validation/CL/Box3x3.cpp index 9c3db9f2fe..96a0d09ea3 100644 --- a/tests/validation/CL/Box3x3.cpp +++ b/tests/validation/CL/Box3x3.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "CL/CLAccessor.h" -#include "CL/Helper.h" #include "Globals.h" #include "PaddingCalculator.h" #include "TensorLibrary.h" @@ -65,8 +64,8 @@ constexpr BorderSize border_size(filter_size / 2); /** Border size of the kern CLTensor compute_box3x3(const TensorShape &shape, BorderMode border_mode, uint8_t constant_border_value) { // Create tensors - CLTensor src = create_tensor(shape, DataType::U8); - CLTensor dst = create_tensor(shape, DataType::U8); + CLTensor src = create_tensor(shape, DataType::U8); + CLTensor dst = create_tensor(shape, DataType::U8); // Create and configure function CLBox3x3 box3x3; @@ -97,8 +96,8 @@ BOOST_TEST_DECORATOR(*boost::unit_test::label("precommit") * boost::unit_test::l BOOST_DATA_TEST_CASE(Configuration, (SmallShapes() + LargeShapes()) * BorderModes(), shape, border_mode) { // Create tensors - CLTensor src = create_tensor(shape, DataType::U8); - CLTensor dst = create_tensor(shape, DataType::U8); + CLTensor src = create_tensor(shape, DataType::U8); + CLTensor dst = create_tensor(shape, DataType::U8); BOOST_TEST(src.info()->is_resizable()); BOOST_TEST(dst.info()->is_resizable()); diff --git a/tests/validation/CL/CMakeLists.txt b/tests/validation/CL/CMakeLists.txt index d46cca7ac4..93547b1879 100644 --- a/tests/validation/CL/CMakeLists.txt +++ b/tests/validation/CL/CMakeLists.txt @@ -25,7 +25,6 @@ include_directories(${CMAKE_SOURCE_DIR}/../include) set(arm_compute_test_validation_OPENCL_SOURCE_FILES ${CMAKE_SOURCE_DIR}/CL/CLAccessor.h - ${CMAKE_SOURCE_DIR}/CL/Helper.h ${CMAKE_CURRENT_SOURCE_DIR}/CLFixture.h ${CMAKE_CURRENT_SOURCE_DIR}/CLFixture.cpp ${CMAKE_CURRENT_SOURCE_DIR}/BitwiseAnd.cpp diff --git a/tests/validation/CL/DepthConvert.cpp b/tests/validation/CL/DepthConvert.cpp index 0bca453cf2..87fe3814f7 100644 --- a/tests/validation/CL/DepthConvert.cpp +++ b/tests/validation/CL/DepthConvert.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "CL/CLAccessor.h" -#include "CL/Helper.h" #include "Globals.h" #include "PaddingCalculator.h" #include "TensorLibrary.h" @@ -63,8 +62,8 @@ namespace CLTensor compute_depth_convert(const TensorShape &shape, DataType dt_in, DataType dt_out, ConvertPolicy policy, uint32_t shift) { // Create tensors - CLTensor src = create_tensor(shape, dt_in); - CLTensor dst = create_tensor(shape, dt_out); + CLTensor src = create_tensor(shape, dt_in); + CLTensor dst = create_tensor(shape, dt_out); // Create and configure function CLDepthConvert depth_convert; @@ -97,8 +96,8 @@ CLTensor compute_depth_convert(const TensorShape &shape, DataType dt_in, DataTyp void compute_configure_validate(const TensorShape &shape, DataType dt_in, DataType dt_out, ConvertPolicy policy, uint32_t shift) { // Create tensors - CLTensor src = create_tensor(shape, dt_in); - CLTensor dst = create_tensor(shape, dt_out); + CLTensor src = create_tensor(shape, dt_in); + CLTensor dst = create_tensor(shape, dt_out); BOOST_TEST(src.info()->is_resizable()); BOOST_TEST(dst.info()->is_resizable()); diff --git a/tests/validation/CL/FillBorder.cpp b/tests/validation/CL/FillBorder.cpp index 42b9064982..f6930eed9a 100644 --- a/tests/validation/CL/FillBorder.cpp +++ b/tests/validation/CL/FillBorder.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "CL/CLAccessor.h" -#include "CL/Helper.h" #include "Globals.h" #include "TensorLibrary.h" #include "TypePrinter.h" @@ -58,7 +57,7 @@ BOOST_DATA_TEST_CASE(FillBorder, BorderModes() * boost::unit_test::data::make({ BorderSize border_size{ 5 }; // Create tensors - CLTensor src = create_tensor(TensorShape{ 10U, 10U, 2U }, DataType::U8); + CLTensor src = create_tensor(TensorShape{ 10U, 10U, 2U }, DataType::U8); src.info()->extend_padding(padding); diff --git a/tests/validation/CL/Gaussian3x3.cpp b/tests/validation/CL/Gaussian3x3.cpp index 2a526e8417..bf4684d068 100644 --- a/tests/validation/CL/Gaussian3x3.cpp +++ b/tests/validation/CL/Gaussian3x3.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "CL/CLAccessor.h" -#include "CL/Helper.h" #include "Globals.h" #include "PaddingCalculator.h" #include "TensorLibrary.h" @@ -65,8 +64,8 @@ constexpr BorderSize border_size(filter_size / 2); /** Border size of the kern CLTensor compute_gaussian3x3(const TensorShape &shape, BorderMode border_mode, uint8_t constant_border_value) { // Create tensors - CLTensor src = create_tensor(shape, DataType::U8); - CLTensor dst = create_tensor(shape, DataType::U8); + CLTensor src = create_tensor(shape, DataType::U8); + CLTensor dst = create_tensor(shape, DataType::U8); // Create and configure function CLGaussian3x3 gaussian3x3; @@ -97,8 +96,8 @@ BOOST_TEST_DECORATOR(*boost::unit_test::label("precommit") * boost::unit_test::l BOOST_DATA_TEST_CASE(Configuration, (SmallShapes() + LargeShapes()) * BorderModes(), shape, border_mode) { // Create tensors - CLTensor src = create_tensor(shape, DataType::U8); - CLTensor dst = create_tensor(shape, DataType::U8); + CLTensor src = create_tensor(shape, DataType::U8); + CLTensor dst = create_tensor(shape, DataType::U8); BOOST_TEST(src.info()->is_resizable()); BOOST_TEST(dst.info()->is_resizable()); diff --git a/tests/validation/CL/Gaussian5x5.cpp b/tests/validation/CL/Gaussian5x5.cpp index b6a692ce04..827dadd6a6 100644 --- a/tests/validation/CL/Gaussian5x5.cpp +++ b/tests/validation/CL/Gaussian5x5.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "CL/CLAccessor.h" -#include "CL/Helper.h" #include "Globals.h" #include "PaddingCalculator.h" #include "TensorLibrary.h" @@ -65,8 +64,8 @@ constexpr BorderSize border_size(filter_size / 2); /** Border size of the kern CLTensor compute_gaussian5x5(const TensorShape &shape, BorderMode border_mode, uint8_t constant_border_value) { // Create tensors - CLTensor src = create_tensor(shape, DataType::U8); - CLTensor dst = create_tensor(shape, DataType::U8); + CLTensor src = create_tensor(shape, DataType::U8); + CLTensor dst = create_tensor(shape, DataType::U8); // Create and configure function CLGaussian5x5 gaussian5x5; @@ -97,8 +96,8 @@ BOOST_TEST_DECORATOR(*boost::unit_test::label("precommit") * boost::unit_test::l BOOST_DATA_TEST_CASE(Configuration, (SmallShapes() + LargeShapes()) * BorderModes(), shape, border_mode) { // Create tensors - CLTensor src = create_tensor(shape, DataType::U8); - CLTensor dst = create_tensor(shape, DataType::U8); + CLTensor src = create_tensor(shape, DataType::U8); + CLTensor dst = create_tensor(shape, DataType::U8); BOOST_TEST(src.info()->is_resizable()); BOOST_TEST(dst.info()->is_resizable()); diff --git a/tests/validation/CL/IntegralImage.cpp b/tests/validation/CL/IntegralImage.cpp index 9ace8bd2e8..e46568e164 100644 --- a/tests/validation/CL/IntegralImage.cpp +++ b/tests/validation/CL/IntegralImage.cpp @@ -23,7 +23,6 @@ */ #include "CL/CLAccessor.h" -#include "CL/Helper.h" #include "Globals.h" #include "PaddingCalculator.h" #include "TensorLibrary.h" @@ -60,8 +59,8 @@ namespace CLTensor compute_integral_image(const TensorShape &shape) { // Create tensors - CLTensor src = create_tensor(shape, DataType::U8); - CLTensor dst = create_tensor(shape, DataType::U32); + CLTensor src = create_tensor(shape, DataType::U8); + CLTensor dst = create_tensor(shape, DataType::U32); // Create integral image configure function CLIntegralImage integral_image; @@ -92,8 +91,8 @@ BOOST_TEST_DECORATOR(*boost::unit_test::label("precommit") * boost::unit_test::l BOOST_DATA_TEST_CASE(Configuration, SmallShapes() + LargeShapes(), shape) { // Create tensors - CLTensor src = create_tensor(shape, DataType::U8); - CLTensor dst = create_tensor(shape, DataType::U32); + CLTensor src = create_tensor(shape, DataType::U8); + CLTensor dst = create_tensor(shape, DataType::U32); BOOST_TEST(src.info()->is_resizable()); BOOST_TEST(dst.info()->is_resizable()); diff --git a/tests/validation/CL/NonLinearFilter.cpp b/tests/validation/CL/NonLinearFilter.cpp index 4a487d6ed4..414a30812d 100644 --- a/tests/validation/CL/NonLinearFilter.cpp +++ b/tests/validation/CL/NonLinearFilter.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "CL/CLAccessor.h" -#include "CL/Helper.h" #include "Globals.h" #include "PaddingCalculator.h" #include "TensorLibrary.h" @@ -69,8 +68,8 @@ CLTensor compute_non_linear_filter(const TensorShape &shape, NonLinearFilterFunc uint8_t constant_border_value) { // Create tensors - CLTensor src = create_tensor(shape, DataType::U8); - CLTensor dst = create_tensor(shape, DataType::U8); + CLTensor src = create_tensor(shape, DataType::U8); + CLTensor dst = create_tensor(shape, DataType::U8); // Create and configure function CLNonLinearFilter filter; @@ -113,8 +112,8 @@ BOOST_DATA_TEST_CASE(Configuration, (SmallShapes() + LargeShapes()) const auto half_mask_size = static_cast(mask_size / 2); // Create tensors - CLTensor src = create_tensor(shape, DataType::U8); - CLTensor dst = create_tensor(shape, DataType::U8); + CLTensor src = create_tensor(shape, DataType::U8); + CLTensor dst = create_tensor(shape, DataType::U8); BOOST_TEST(src.info()->is_resizable()); BOOST_TEST(dst.info()->is_resizable()); diff --git a/tests/validation/CL/PoolingLayer.cpp b/tests/validation/CL/PoolingLayer.cpp index dabc21eaa8..5876e8bf23 100644 --- a/tests/validation/CL/PoolingLayer.cpp +++ b/tests/validation/CL/PoolingLayer.cpp @@ -22,9 +22,10 @@ * SOFTWARE. */ #include "CL/CLAccessor.h" -#include "CL/Helper.h" #include "TypePrinter.h" #include "arm_compute/runtime/CL/functions/CLPoolingLayer.h" +#include "tests/Globals.h" +#include "tests/Utils.h" #include "tests/dataset/PoolingLayerDataset.h" #include "validation/Datasets.h" #include "validation/Reference.h" @@ -52,8 +53,8 @@ const float tolerance_f = 1e-05; /**< Tolerance value for comparing reference's CLTensor compute_pooling_layer(const TensorShape &shape_in, const TensorShape &shape_out, DataType dt, PoolingLayerInfo pool_info) { // Create tensors - CLTensor src = create_tensor(shape_in, dt); - CLTensor dst = create_tensor(shape_out, dt); + CLTensor src = create_tensor(shape_in, dt); + CLTensor dst = create_tensor(shape_out, dt); // Create and configure function CLPoolingLayer pool; diff --git a/tests/validation/CL/Sobel3x3.cpp b/tests/validation/CL/Sobel3x3.cpp index fbd7185a48..59c21e7758 100644 --- a/tests/validation/CL/Sobel3x3.cpp +++ b/tests/validation/CL/Sobel3x3.cpp @@ -23,7 +23,6 @@ */ #include "CL/CLAccessor.h" -#include "CL/Helper.h" #include "Globals.h" #include "PaddingCalculator.h" #include "TensorLibrary.h" @@ -67,9 +66,9 @@ constexpr BorderSize border_size(filter_size / 2); /** Border size of the kern std::pair compute_sobel_3x3(const TensorShape &shape, BorderMode border_mode, uint8_t constant_border_value) { // Create tensors - CLTensor src = create_tensor(shape, DataType::U8); - CLTensor dst_x = create_tensor(shape, DataType::S16); - CLTensor dst_y = create_tensor(shape, DataType::S16); + CLTensor src = create_tensor(shape, DataType::U8); + CLTensor dst_x = create_tensor(shape, DataType::S16); + CLTensor dst_y = create_tensor(shape, DataType::S16); src.info()->set_format(Format::U8); dst_x.info()->set_format(Format::S16); @@ -106,9 +105,9 @@ BOOST_TEST_DECORATOR(*boost::unit_test::label("precommit") * boost::unit_test::l BOOST_DATA_TEST_CASE(Configuration, (SmallShapes() + LargeShapes()) * BorderModes(), shape, border_mode) { // Create tensors - CLTensor src = create_tensor(shape, DataType::U8); - CLTensor dst_x = create_tensor(shape, DataType::S16); - CLTensor dst_y = create_tensor(shape, DataType::S16); + CLTensor src = create_tensor(shape, DataType::U8); + CLTensor dst_x = create_tensor(shape, DataType::S16); + CLTensor dst_y = create_tensor(shape, DataType::S16); src.info()->set_format(Format::U8); dst_x.info()->set_format(Format::S16); diff --git a/tests/validation/CL/Sobel5x5.cpp b/tests/validation/CL/Sobel5x5.cpp index 263e57e43f..8beb795969 100644 --- a/tests/validation/CL/Sobel5x5.cpp +++ b/tests/validation/CL/Sobel5x5.cpp @@ -23,7 +23,6 @@ */ #include "CL/CLAccessor.h" -#include "CL/Helper.h" #include "Globals.h" #include "PaddingCalculator.h" #include "TensorLibrary.h" @@ -67,9 +66,9 @@ constexpr BorderSize border_size(filter_size / 2); /** Border size of the kern std::pair compute_sobel_5x5(const TensorShape &shape, BorderMode border_mode, uint8_t constant_border_value) { // Create tensors - CLTensor src = create_tensor(shape, DataType::U8); - CLTensor dst_x = create_tensor(shape, DataType::S16); - CLTensor dst_y = create_tensor(shape, DataType::S16); + CLTensor src = create_tensor(shape, DataType::U8); + CLTensor dst_x = create_tensor(shape, DataType::S16); + CLTensor dst_y = create_tensor(shape, DataType::S16); src.info()->set_format(Format::U8); dst_x.info()->set_format(Format::S16); @@ -106,9 +105,9 @@ BOOST_TEST_DECORATOR(*boost::unit_test::label("precommit") * boost::unit_test::l BOOST_DATA_TEST_CASE(Configuration, (SmallShapes() + LargeShapes()) * BorderModes(), shape, border_mode) { // Create tensors - CLTensor src = create_tensor(shape, DataType::U8); - CLTensor dst_x = create_tensor(shape, DataType::S16); - CLTensor dst_y = create_tensor(shape, DataType::S16); + CLTensor src = create_tensor(shape, DataType::U8); + CLTensor dst_x = create_tensor(shape, DataType::S16); + CLTensor dst_y = create_tensor(shape, DataType::S16); src.info()->set_format(Format::U8); dst_x.info()->set_format(Format::S16); diff --git a/tests/validation/CL/SoftmaxLayer.cpp b/tests/validation/CL/SoftmaxLayer.cpp index aa80e506ed..3f8f465504 100644 --- a/tests/validation/CL/SoftmaxLayer.cpp +++ b/tests/validation/CL/SoftmaxLayer.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "CL/CLAccessor.h" -#include "CL/Helper.h" #include "Globals.h" #include "PaddingCalculator.h" #include "TensorLibrary.h" @@ -66,8 +65,8 @@ const float tolerance_fixed_point = 2.f; CLTensor compute_softmax_layer(const TensorShape &shape, DataType dt, int fixed_point_position = 0) { // Create tensors - CLTensor src = create_tensor(shape, dt, 1, fixed_point_position); - CLTensor dst = create_tensor(shape, dt, 1, fixed_point_position); + CLTensor src = create_tensor(shape, dt, 1, fixed_point_position); + CLTensor dst = create_tensor(shape, dt, 1, fixed_point_position); // Create and configure function CLSoftmaxLayer smx_layer; @@ -111,8 +110,8 @@ BOOST_DATA_TEST_CASE(Configuration, (SmallShapes() + LargeShapes()) * CNNDataTyp int fixed_point_position = (arm_compute::is_data_type_fixed_point(dt)) ? 3 : 0; // Create tensors - CLTensor src = create_tensor(shape, dt, 1, fixed_point_position); - CLTensor dst = create_tensor(shape, dt, 1, fixed_point_position); + CLTensor src = create_tensor(shape, dt, 1, fixed_point_position); + CLTensor dst = create_tensor(shape, dt, 1, fixed_point_position); BOOST_TEST(src.info()->is_resizable()); BOOST_TEST(dst.info()->is_resizable()); diff --git a/tests/validation/CL/Threshold.cpp b/tests/validation/CL/Threshold.cpp index ff7b8f0694..4f9e420656 100644 --- a/tests/validation/CL/Threshold.cpp +++ b/tests/validation/CL/Threshold.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "CL/CLAccessor.h" -#include "CL/Helper.h" #include "Globals.h" #include "PaddingCalculator.h" #include "TensorLibrary.h" @@ -65,8 +64,8 @@ namespace CLTensor compute_threshold(const TensorShape &shape, uint8_t threshold, uint8_t false_value, uint8_t true_value, ThresholdType type, uint8_t upper) { // Create tensors - CLTensor src = create_tensor(shape, DataType::U8); - CLTensor dst = create_tensor(shape, DataType::U8); + CLTensor src = create_tensor(shape, DataType::U8); + CLTensor dst = create_tensor(shape, DataType::U8); // Create and configure function CLThreshold thrsh; @@ -99,8 +98,8 @@ BOOST_DATA_TEST_CASE(Configuration, shape, threshold_conf) { // Create tensors - CLTensor src = create_tensor(shape, DataType::U8); - CLTensor dst = create_tensor(shape, DataType::U8); + CLTensor src = create_tensor(shape, DataType::U8); + CLTensor dst = create_tensor(shape, DataType::U8); BOOST_TEST(src.info()->is_resizable()); BOOST_TEST(dst.info()->is_resizable()); diff --git a/tests/validation/NEON/AbsoluteDifference.cpp b/tests/validation/NEON/AbsoluteDifference.cpp index 334a842c66..779baa75e6 100644 --- a/tests/validation/NEON/AbsoluteDifference.cpp +++ b/tests/validation/NEON/AbsoluteDifference.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "Globals.h" -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "PaddingCalculator.h" #include "TensorLibrary.h" @@ -62,9 +61,9 @@ namespace Tensor compute_absolute_difference(const TensorShape &shape, DataType dt_in0, DataType dt_in1, DataType dt_out) { // Create tensors - Tensor src1 = create_tensor(shape, dt_in0); - Tensor src2 = create_tensor(shape, dt_in1); - Tensor dst = create_tensor(shape, dt_out); + Tensor src1 = create_tensor(shape, dt_in0); + Tensor src2 = create_tensor(shape, dt_in1); + Tensor dst = create_tensor(shape, dt_out); // Create and configure function NEAbsoluteDifference abs_d; @@ -123,9 +122,9 @@ BOOST_DATA_TEST_CASE(Configuration, (SmallShapes() + LargeShapes()), shape) { // Create tensors - Tensor src1 = create_tensor(shape, DataType::U8); - Tensor src2 = create_tensor(shape, DataType::U8); - Tensor dst = create_tensor(shape, DataType::U8); + Tensor src1 = create_tensor(shape, DataType::U8); + Tensor src2 = create_tensor(shape, DataType::U8); + Tensor dst = create_tensor(shape, DataType::U8); validate_configuration(src1, src2, dst, shape); } @@ -163,9 +162,9 @@ BOOST_DATA_TEST_CASE(Configuration, (SmallShapes() + LargeShapes()) * boost::uni shape, dt) { // Create tensors - Tensor src1 = create_tensor(shape, dt); - Tensor src2 = create_tensor(shape, DataType::S16); - Tensor dst = create_tensor(shape, DataType::S16); + Tensor src1 = create_tensor(shape, dt); + Tensor src2 = create_tensor(shape, DataType::S16); + Tensor dst = create_tensor(shape, DataType::S16); validate_configuration(src1, src2, dst, shape); } diff --git a/tests/validation/NEON/Accumulate.cpp b/tests/validation/NEON/Accumulate.cpp index 157c298d7e..f8cc5073a8 100644 --- a/tests/validation/NEON/Accumulate.cpp +++ b/tests/validation/NEON/Accumulate.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "Globals.h" -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "PaddingCalculator.h" #include "TensorLibrary.h" @@ -59,8 +58,8 @@ namespace Tensor compute_accumulate(const TensorShape &shape) { // Create tensors - Tensor src = create_tensor(shape, DataType::U8); - Tensor dst = create_tensor(shape, DataType::S16); + Tensor src = create_tensor(shape, DataType::U8); + Tensor dst = create_tensor(shape, DataType::S16); // Create and configure function NEAccumulate acc; @@ -93,8 +92,8 @@ BOOST_DATA_TEST_CASE(Configuration, (SmallShapes() + LargeShapes()), shape) { // Create tensors - Tensor src = create_tensor(shape, DataType::U8); - Tensor dst = create_tensor(shape, DataType::S16); + Tensor src = create_tensor(shape, DataType::U8); + Tensor dst = create_tensor(shape, DataType::S16); BOOST_TEST(src.info()->is_resizable()); BOOST_TEST(dst.info()->is_resizable()); diff --git a/tests/validation/NEON/AccumulateSquared.cpp b/tests/validation/NEON/AccumulateSquared.cpp index 3dbdeb2db1..093ccb49af 100644 --- a/tests/validation/NEON/AccumulateSquared.cpp +++ b/tests/validation/NEON/AccumulateSquared.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "Globals.h" -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "PaddingCalculator.h" #include "TensorLibrary.h" @@ -59,8 +58,8 @@ namespace Tensor compute_accumulate_squared(const TensorShape &shape, uint32_t shift) { // Create tensors - Tensor src = create_tensor(shape, DataType::U8); - Tensor dst = create_tensor(shape, DataType::S16); + Tensor src = create_tensor(shape, DataType::U8); + Tensor dst = create_tensor(shape, DataType::S16); // Create and configure function NEAccumulateSquared acc; @@ -94,8 +93,8 @@ BOOST_DATA_TEST_CASE(Configuration, (SmallShapes() + LargeShapes()) * boost::uni shape, shift) { // Create tensors - Tensor src = create_tensor(shape, DataType::U8); - Tensor dst = create_tensor(shape, DataType::S16); + Tensor src = create_tensor(shape, DataType::U8); + Tensor dst = create_tensor(shape, DataType::S16); BOOST_TEST(src.info()->is_resizable()); BOOST_TEST(dst.info()->is_resizable()); diff --git a/tests/validation/NEON/AccumulateWeighted.cpp b/tests/validation/NEON/AccumulateWeighted.cpp index cf1f74689f..8c54076f1b 100644 --- a/tests/validation/NEON/AccumulateWeighted.cpp +++ b/tests/validation/NEON/AccumulateWeighted.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "Globals.h" -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "PaddingCalculator.h" #include "TensorLibrary.h" @@ -59,8 +58,8 @@ namespace Tensor compute_accumulate_weighted(const TensorShape &shape, float alpha) { // Create tensors - Tensor src = create_tensor(shape, DataType::U8); - Tensor dst = create_tensor(shape, DataType::U8); + Tensor src = create_tensor(shape, DataType::U8); + Tensor dst = create_tensor(shape, DataType::U8); // Create and configure function NEAccumulateWeighted acc; @@ -93,8 +92,8 @@ BOOST_DATA_TEST_CASE(Configuration, (SmallShapes() + LargeShapes()) * boost::uni shape, alpha) { // Create tensors - Tensor src = create_tensor(shape, DataType::U8); - Tensor dst = create_tensor(shape, DataType::U8); + Tensor src = create_tensor(shape, DataType::U8); + Tensor dst = create_tensor(shape, DataType::U8); BOOST_TEST(src.info()->is_resizable()); BOOST_TEST(dst.info()->is_resizable()); diff --git a/tests/validation/NEON/ActivationLayer.cpp b/tests/validation/NEON/ActivationLayer.cpp index 11ac6696b1..6a84a5367f 100644 --- a/tests/validation/NEON/ActivationLayer.cpp +++ b/tests/validation/NEON/ActivationLayer.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "Globals.h" -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "PaddingCalculator.h" #include "TensorLibrary.h" @@ -87,8 +86,8 @@ float activation_layer_tolerance(ActivationLayerInfo::ActivationFunction activat Tensor compute_activation_layer(bool in_place, const TensorShape &shape, DataType dt, ActivationLayerInfo act_info, int fixed_point_position = 0) { // Create tensors - Tensor src = create_tensor(shape, dt, 1, fixed_point_position); - Tensor dst = create_tensor(shape, dt, 1, fixed_point_position); + Tensor src = create_tensor(shape, dt, 1, fixed_point_position); + Tensor dst = create_tensor(shape, dt, 1, fixed_point_position); // Create and configure function NEActivationLayer act_layer; @@ -155,8 +154,8 @@ BOOST_DATA_TEST_CASE(Configuration, boost::unit_test::data::make({ false, true } const int fixed_point_position = (arm_compute::is_data_type_fixed_point(dt)) ? 3 : 0; // Create tensors - Tensor src = create_tensor(shape, dt, 1, fixed_point_position); - Tensor dst = create_tensor(shape, dt, 1, fixed_point_position); + Tensor src = create_tensor(shape, dt, 1, fixed_point_position); + Tensor dst = create_tensor(shape, dt, 1, fixed_point_position); BOOST_TEST(src.info()->is_resizable()); BOOST_TEST(dst.info()->is_resizable()); diff --git a/tests/validation/NEON/ArithmeticAddition.cpp b/tests/validation/NEON/ArithmeticAddition.cpp index d58d0cea1a..fe998299b8 100644 --- a/tests/validation/NEON/ArithmeticAddition.cpp +++ b/tests/validation/NEON/ArithmeticAddition.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "Globals.h" -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "PaddingCalculator.h" #include "TensorLibrary.h" @@ -63,9 +62,9 @@ namespace Tensor compute_arithmetic_addition(const TensorShape &shape, DataType dt_in0, DataType dt_in1, DataType dt_out, ConvertPolicy policy) { // Create tensors - Tensor src1 = create_tensor(shape, dt_in0); - Tensor src2 = create_tensor(shape, dt_in1); - Tensor dst = create_tensor(shape, dt_out); + Tensor src1 = create_tensor(shape, dt_in0); + Tensor src2 = create_tensor(shape, dt_in1); + Tensor dst = create_tensor(shape, dt_out); // Create and configure function NEArithmeticAddition add; @@ -124,9 +123,9 @@ BOOST_DATA_TEST_CASE(Configuration, (SmallShapes() + LargeShapes()) * boost::uni shape, policy) { // Create tensors - Tensor src1 = create_tensor(shape, DataType::U8); - Tensor src2 = create_tensor(shape, DataType::U8); - Tensor dst = create_tensor(shape, DataType::U8); + Tensor src1 = create_tensor(shape, DataType::U8); + Tensor src2 = create_tensor(shape, DataType::U8); + Tensor dst = create_tensor(shape, DataType::U8); validate_configuration(src1, src2, dst, shape, policy); } @@ -151,9 +150,9 @@ BOOST_DATA_TEST_CASE(Configuration, (SmallShapes() + LargeShapes()) * boost::uni shape, dt, policy) { // Create tensors - Tensor src1 = create_tensor(shape, dt); - Tensor src2 = create_tensor(shape, DataType::S16); - Tensor dst = create_tensor(shape, DataType::S16); + Tensor src1 = create_tensor(shape, dt); + Tensor src2 = create_tensor(shape, DataType::S16); + Tensor dst = create_tensor(shape, DataType::S16); validate_configuration(src1, src2, dst, shape, policy); } @@ -191,9 +190,9 @@ BOOST_DATA_TEST_CASE(Configuration, (SmallShapes() + LargeShapes()) * boost::uni shape, policy) { // Create tensors - Tensor src1 = create_tensor(shape, DataType::F32); - Tensor src2 = create_tensor(shape, DataType::F32); - Tensor dst = create_tensor(shape, DataType::F32); + Tensor src1 = create_tensor(shape, DataType::F32); + Tensor src2 = create_tensor(shape, DataType::F32); + Tensor dst = create_tensor(shape, DataType::F32); validate_configuration(src1, src2, dst, shape, policy); } diff --git a/tests/validation/NEON/ArithmeticSubtraction.cpp b/tests/validation/NEON/ArithmeticSubtraction.cpp index ade473abff..35c29638a5 100644 --- a/tests/validation/NEON/ArithmeticSubtraction.cpp +++ b/tests/validation/NEON/ArithmeticSubtraction.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "Globals.h" -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "PaddingCalculator.h" #include "TensorLibrary.h" @@ -63,9 +62,9 @@ namespace Tensor compute_arithmetic_subtraction(const TensorShape &shape, DataType dt_in0, DataType dt_in1, DataType dt_out, ConvertPolicy policy) { // Create tensors - Tensor src1 = create_tensor(shape, dt_in0); - Tensor src2 = create_tensor(shape, dt_in1); - Tensor dst = create_tensor(shape, dt_out); + Tensor src1 = create_tensor(shape, dt_in0); + Tensor src2 = create_tensor(shape, dt_in1); + Tensor dst = create_tensor(shape, dt_out); // Create and configure function NEArithmeticSubtraction sub; @@ -124,9 +123,9 @@ BOOST_DATA_TEST_CASE(Configuration, (SmallShapes() + LargeShapes()) * boost::uni shape, policy) { // Create tensors - Tensor src1 = create_tensor(shape, DataType::U8); - Tensor src2 = create_tensor(shape, DataType::U8); - Tensor dst = create_tensor(shape, DataType::U8); + Tensor src1 = create_tensor(shape, DataType::U8); + Tensor src2 = create_tensor(shape, DataType::U8); + Tensor dst = create_tensor(shape, DataType::U8); validate_configuration(src1, src2, dst, shape, policy); } @@ -151,9 +150,9 @@ BOOST_DATA_TEST_CASE(Configuration, (SmallShapes() + LargeShapes()) * boost::uni shape, dt, policy) { // Create tensors - Tensor src1 = create_tensor(shape, dt); - Tensor src2 = create_tensor(shape, DataType::S16); - Tensor dst = create_tensor(shape, DataType::S16); + Tensor src1 = create_tensor(shape, dt); + Tensor src2 = create_tensor(shape, DataType::S16); + Tensor dst = create_tensor(shape, DataType::S16); validate_configuration(src1, src2, dst, shape, policy); } @@ -191,9 +190,9 @@ BOOST_DATA_TEST_CASE(Configuration, (SmallShapes() + LargeShapes()) * boost::uni shape, policy) { // Create tensors - Tensor src1 = create_tensor(shape, DataType::F32); - Tensor src2 = create_tensor(shape, DataType::F32); - Tensor dst = create_tensor(shape, DataType::F32); + Tensor src1 = create_tensor(shape, DataType::F32); + Tensor src2 = create_tensor(shape, DataType::F32); + Tensor dst = create_tensor(shape, DataType::F32); validate_configuration(src1, src2, dst, shape, policy); } diff --git a/tests/validation/NEON/BatchNormalizationLayer.cpp b/tests/validation/NEON/BatchNormalizationLayer.cpp index 7656b2f392..3206b3965d 100644 --- a/tests/validation/NEON/BatchNormalizationLayer.cpp +++ b/tests/validation/NEON/BatchNormalizationLayer.cpp @@ -21,10 +21,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "TypePrinter.h" #include "dataset/BatchNormalizationLayerDataset.h" +#include "tests/Globals.h" +#include "tests/Utils.h" #include "tests/validation/Helpers.h" #include "validation/Datasets.h" #include "validation/Reference.h" @@ -55,12 +56,12 @@ const float tolerance_q = 3; /**< Tolerance value for comparing reference's Tensor compute_reference_batch_normalization_layer(const TensorShape &shape0, const TensorShape &shape1, DataType dt, float epsilon, int fixed_point_position = 0) { // Create tensors - Tensor src = create_tensor(shape0, dt, 1, fixed_point_position); - Tensor dst = create_tensor(shape0, dt, 1, fixed_point_position); - Tensor mean = create_tensor(shape1, dt, 1, fixed_point_position); - Tensor var = create_tensor(shape1, dt, 1, fixed_point_position); - Tensor beta = create_tensor(shape1, dt, 1, fixed_point_position); - Tensor gamma = create_tensor(shape1, dt, 1, fixed_point_position); + Tensor src = create_tensor(shape0, dt, 1, fixed_point_position); + Tensor dst = create_tensor(shape0, dt, 1, fixed_point_position); + Tensor mean = create_tensor(shape1, dt, 1, fixed_point_position); + Tensor var = create_tensor(shape1, dt, 1, fixed_point_position); + Tensor beta = create_tensor(shape1, dt, 1, fixed_point_position); + Tensor gamma = create_tensor(shape1, dt, 1, fixed_point_position); // Create and configure function NEBatchNormalizationLayer norm; @@ -127,12 +128,12 @@ BOOST_DATA_TEST_CASE(Configuration, RandomBatchNormalizationLayerDataset() * (bo int fixed_point_position = (arm_compute::is_data_type_fixed_point(dt)) ? 3 : 0; // Create tensors - Tensor src = create_tensor(obj.shape0, dt, 1, fixed_point_position); - Tensor dst = create_tensor(obj.shape0, dt, 1, fixed_point_position); - Tensor mean = create_tensor(obj.shape1, dt, 1, fixed_point_position); - Tensor var = create_tensor(obj.shape1, dt, 1, fixed_point_position); - Tensor beta = create_tensor(obj.shape1, dt, 1, fixed_point_position); - Tensor gamma = create_tensor(obj.shape1, dt, 1, fixed_point_position); + Tensor src = create_tensor(obj.shape0, dt, 1, fixed_point_position); + Tensor dst = create_tensor(obj.shape0, dt, 1, fixed_point_position); + Tensor mean = create_tensor(obj.shape1, dt, 1, fixed_point_position); + Tensor var = create_tensor(obj.shape1, dt, 1, fixed_point_position); + Tensor beta = create_tensor(obj.shape1, dt, 1, fixed_point_position); + Tensor gamma = create_tensor(obj.shape1, dt, 1, fixed_point_position); BOOST_TEST(src.info()->is_resizable()); BOOST_TEST(dst.info()->is_resizable()); diff --git a/tests/validation/NEON/BitwiseAnd.cpp b/tests/validation/NEON/BitwiseAnd.cpp index 3dcad6fff7..44d0bd9870 100644 --- a/tests/validation/NEON/BitwiseAnd.cpp +++ b/tests/validation/NEON/BitwiseAnd.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "Globals.h" -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "PaddingCalculator.h" #include "TensorLibrary.h" @@ -60,9 +59,9 @@ namespace Tensor compute_bitwise_and(const TensorShape &shape) { // Create tensors - Tensor src1 = create_tensor(shape, DataType::U8); - Tensor src2 = create_tensor(shape, DataType::U8); - Tensor dst = create_tensor(shape, DataType::U8); + Tensor src1 = create_tensor(shape, DataType::U8); + Tensor src2 = create_tensor(shape, DataType::U8); + Tensor dst = create_tensor(shape, DataType::U8); // Create and configure function NEBitwiseAnd band; @@ -96,9 +95,9 @@ Tensor compute_bitwise_and(const TensorShape &shape) Tensor compute_bitwise_and_subtensor(const TensorShape &shape) { // Create tensors - Tensor src1 = create_tensor(shape, DataType::U8); - Tensor src2 = create_tensor(shape, DataType::U8); - Tensor dst = create_tensor(shape, DataType::U8); + Tensor src1 = create_tensor(shape, DataType::U8); + Tensor src2 = create_tensor(shape, DataType::U8); + Tensor dst = create_tensor(shape, DataType::U8); // Create SubTensors int coord_z = shape.z() / 2; @@ -147,9 +146,9 @@ BOOST_TEST_DECORATOR(*boost::unit_test::label("precommit") * boost::unit_test::l BOOST_DATA_TEST_CASE(Configuration, SmallShapes() + LargeShapes(), shape) { // Create tensors - Tensor src1 = create_tensor(shape, DataType::U8); - Tensor src2 = create_tensor(shape, DataType::U8); - Tensor dst = create_tensor(shape, DataType::U8); + Tensor src1 = create_tensor(shape, DataType::U8); + Tensor src2 = create_tensor(shape, DataType::U8); + Tensor dst = create_tensor(shape, DataType::U8); BOOST_TEST(src1.info()->is_resizable()); BOOST_TEST(src2.info()->is_resizable()); diff --git a/tests/validation/NEON/BitwiseNot.cpp b/tests/validation/NEON/BitwiseNot.cpp index de58f550b2..d30339e785 100644 --- a/tests/validation/NEON/BitwiseNot.cpp +++ b/tests/validation/NEON/BitwiseNot.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "Globals.h" -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "PaddingCalculator.h" #include "TensorLibrary.h" @@ -59,8 +58,8 @@ namespace Tensor compute_bitwise_not(const TensorShape &shape) { // Create tensors - Tensor src = create_tensor(shape, DataType::U8); - Tensor dst = create_tensor(shape, DataType::U8); + Tensor src = create_tensor(shape, DataType::U8); + Tensor dst = create_tensor(shape, DataType::U8); // Create not configure function NEBitwiseNot bnot; @@ -91,8 +90,8 @@ BOOST_TEST_DECORATOR(*boost::unit_test::label("precommit") * boost::unit_test::l BOOST_DATA_TEST_CASE(Configuration, SmallShapes() + LargeShapes(), shape) { // Create tensors - Tensor src = create_tensor(shape, DataType::U8); - Tensor dst = create_tensor(shape, DataType::U8); + Tensor src = create_tensor(shape, DataType::U8); + Tensor dst = create_tensor(shape, DataType::U8); BOOST_TEST(src.info()->is_resizable()); BOOST_TEST(dst.info()->is_resizable()); diff --git a/tests/validation/NEON/BitwiseOr.cpp b/tests/validation/NEON/BitwiseOr.cpp index 95f77ee924..9b47f79bad 100644 --- a/tests/validation/NEON/BitwiseOr.cpp +++ b/tests/validation/NEON/BitwiseOr.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "Globals.h" -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "PaddingCalculator.h" #include "TensorLibrary.h" @@ -59,9 +58,9 @@ namespace Tensor compute_bitwise_or(const TensorShape &shape) { // Create tensors - Tensor src1 = create_tensor(shape, DataType::U8); - Tensor src2 = create_tensor(shape, DataType::U8); - Tensor dst = create_tensor(shape, DataType::U8); + Tensor src1 = create_tensor(shape, DataType::U8); + Tensor src2 = create_tensor(shape, DataType::U8); + Tensor dst = create_tensor(shape, DataType::U8); // Create and configure function NEBitwiseOr bor; @@ -95,9 +94,9 @@ BOOST_TEST_DECORATOR(*boost::unit_test::label("precommit") * boost::unit_test::l BOOST_DATA_TEST_CASE(Configuration, SmallShapes() + LargeShapes(), shape) { // Create tensors - Tensor src1 = create_tensor(shape, DataType::U8); - Tensor src2 = create_tensor(shape, DataType::U8); - Tensor dst = create_tensor(shape, DataType::U8); + Tensor src1 = create_tensor(shape, DataType::U8); + Tensor src2 = create_tensor(shape, DataType::U8); + Tensor dst = create_tensor(shape, DataType::U8); BOOST_TEST(src1.info()->is_resizable()); BOOST_TEST(src2.info()->is_resizable()); diff --git a/tests/validation/NEON/BitwiseXor.cpp b/tests/validation/NEON/BitwiseXor.cpp index a9225e6afa..7ab6448e36 100644 --- a/tests/validation/NEON/BitwiseXor.cpp +++ b/tests/validation/NEON/BitwiseXor.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "Globals.h" -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "PaddingCalculator.h" #include "TensorLibrary.h" @@ -59,9 +58,9 @@ namespace Tensor compute_bitwise_xor(const TensorShape &shape) { // Create tensors - Tensor src1 = create_tensor(shape, DataType::U8); - Tensor src2 = create_tensor(shape, DataType::U8); - Tensor dst = create_tensor(shape, DataType::U8); + Tensor src1 = create_tensor(shape, DataType::U8); + Tensor src2 = create_tensor(shape, DataType::U8); + Tensor dst = create_tensor(shape, DataType::U8); // Create xor configure function NEBitwiseXor bxor; @@ -95,9 +94,9 @@ BOOST_TEST_DECORATOR(*boost::unit_test::label("precommit") * boost::unit_test::l BOOST_DATA_TEST_CASE(Configuration, SmallShapes() + LargeShapes(), shape) { // Create tensors - Tensor src1 = create_tensor(shape, DataType::U8); - Tensor src2 = create_tensor(shape, DataType::U8); - Tensor dst = create_tensor(shape, DataType::U8); + Tensor src1 = create_tensor(shape, DataType::U8); + Tensor src2 = create_tensor(shape, DataType::U8); + Tensor dst = create_tensor(shape, DataType::U8); BOOST_TEST(src1.info()->is_resizable()); BOOST_TEST(src2.info()->is_resizable()); diff --git a/tests/validation/NEON/Box3x3.cpp b/tests/validation/NEON/Box3x3.cpp index c673ff1be3..0b9c2f082f 100644 --- a/tests/validation/NEON/Box3x3.cpp +++ b/tests/validation/NEON/Box3x3.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "Globals.h" -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "PaddingCalculator.h" #include "TensorLibrary.h" @@ -66,8 +65,8 @@ constexpr BorderSize border_size(filter_size / 2); /** Border size of the kern Tensor compute_box3x3(const TensorShape &shape, BorderMode border_mode, uint8_t constant_border_value) { // Create tensors - Tensor src = create_tensor(shape, DataType::U8); - Tensor dst = create_tensor(shape, DataType::U8); + Tensor src = create_tensor(shape, DataType::U8); + Tensor dst = create_tensor(shape, DataType::U8); // Create and configure function NEBox3x3 box3x3; @@ -98,8 +97,8 @@ BOOST_TEST_DECORATOR(*boost::unit_test::label("precommit") * boost::unit_test::l BOOST_DATA_TEST_CASE(Configuration, (SmallShapes() + LargeShapes()) * BorderModes(), shape, border_mode) { // Create tensors - Tensor src = create_tensor(shape, DataType::U8); - Tensor dst = create_tensor(shape, DataType::U8); + Tensor src = create_tensor(shape, DataType::U8); + Tensor dst = create_tensor(shape, DataType::U8); BOOST_TEST(src.info()->is_resizable()); BOOST_TEST(dst.info()->is_resizable()); diff --git a/tests/validation/NEON/CMakeLists.txt b/tests/validation/NEON/CMakeLists.txt index 824e0d8ce7..4e15b8e3ee 100644 --- a/tests/validation/NEON/CMakeLists.txt +++ b/tests/validation/NEON/CMakeLists.txt @@ -22,7 +22,6 @@ cmake_minimum_required (VERSION 3.1) set(arm_compute_test_validation_NEON_SOURCE_FILES - ${CMAKE_SOURCE_DIR}/NEON/Helper.h ${CMAKE_SOURCE_DIR}/NEON/NEAccessor.h ${CMAKE_CURRENT_SOURCE_DIR}/AbsoluteDifference.cpp ${CMAKE_CURRENT_SOURCE_DIR}/Accumulate.cpp diff --git a/tests/validation/NEON/ConvolutionLayer.cpp b/tests/validation/NEON/ConvolutionLayer.cpp index d81834bd57..da35442530 100644 --- a/tests/validation/NEON/ConvolutionLayer.cpp +++ b/tests/validation/NEON/ConvolutionLayer.cpp @@ -21,10 +21,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "TypePrinter.h" #include "dataset/ConvolutionLayerDataset.h" +#include "tests/Globals.h" +#include "tests/Utils.h" #include "validation/Datasets.h" #include "validation/Reference.h" #include "validation/Validation.h" @@ -51,10 +52,10 @@ Tensor compute_convolution_layer(const TensorShape &input_shape, const TensorSha const PadStrideInfo &conv_info, int fixed_point_position) { // Create tensors - Tensor src = create_tensor(input_shape, dt, 1, fixed_point_position); - Tensor weights = create_tensor(weights_shape, dt, 1, fixed_point_position); - Tensor bias = create_tensor(bias_shape, dt, 1, fixed_point_position); - Tensor dst = create_tensor(output_shape, dt, 1, fixed_point_position); + Tensor src = create_tensor(input_shape, dt, 1, fixed_point_position); + Tensor weights = create_tensor(weights_shape, dt, 1, fixed_point_position); + Tensor bias = create_tensor(bias_shape, dt, 1, fixed_point_position); + Tensor dst = create_tensor(output_shape, dt, 1, fixed_point_position); // Create and configure function NEConvolutionLayer conv; @@ -107,10 +108,10 @@ BOOST_DATA_TEST_CASE(Configuration, int fixed_point_position = (dt == DataType::F32) ? 0 : 3; // Create tensors - Tensor src = create_tensor(conv_set.src_shape, dt, 1, fixed_point_position); - Tensor weights = create_tensor(conv_set.weights_shape, dt, 1, fixed_point_position); - Tensor bias = create_tensor(conv_set.bias_shape, dt, 1, fixed_point_position); - Tensor dst = create_tensor(conv_set.dst_shape, dt, 1, fixed_point_position); + Tensor src = create_tensor(conv_set.src_shape, dt, 1, fixed_point_position); + Tensor weights = create_tensor(conv_set.weights_shape, dt, 1, fixed_point_position); + Tensor bias = create_tensor(conv_set.bias_shape, dt, 1, fixed_point_position); + Tensor dst = create_tensor(conv_set.dst_shape, dt, 1, fixed_point_position); BOOST_TEST(src.info()->is_resizable()); BOOST_TEST(weights.info()->is_resizable()); diff --git a/tests/validation/NEON/ConvolutionLayerDirect.cpp b/tests/validation/NEON/ConvolutionLayerDirect.cpp index 3ddb010e74..0f5cee6d6d 100644 --- a/tests/validation/NEON/ConvolutionLayerDirect.cpp +++ b/tests/validation/NEON/ConvolutionLayerDirect.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "Globals.h" -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "TensorLibrary.h" #include "TypePrinter.h" @@ -69,10 +68,10 @@ Tensor compute_convolution_layer(const TensorShape &src_shape, const TensorShape DataType dt, PadStrideInfo conv_info, int fixed_point_position = 0) { // Create tensors - Tensor src = create_tensor(src_shape, dt, 1, fixed_point_position); - Tensor weights = create_tensor(weights_shape, dt, 1, fixed_point_position); - Tensor bias = create_tensor(bias_shape, dt, 1, fixed_point_position); - Tensor dst = create_tensor(dst_shape, dt, 1, fixed_point_position); + Tensor src = create_tensor(src_shape, dt, 1, fixed_point_position); + Tensor weights = create_tensor(weights_shape, dt, 1, fixed_point_position); + Tensor bias = create_tensor(bias_shape, dt, 1, fixed_point_position); + Tensor dst = create_tensor(dst_shape, dt, 1, fixed_point_position); // Create and configure function NEDirectConvolutionLayer conv_layer; diff --git a/tests/validation/NEON/DepthConvert.cpp b/tests/validation/NEON/DepthConvert.cpp index f6ae1f1e78..1aed9dddf5 100644 --- a/tests/validation/NEON/DepthConvert.cpp +++ b/tests/validation/NEON/DepthConvert.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "Globals.h" -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "PaddingCalculator.h" #include "TensorLibrary.h" @@ -64,8 +63,8 @@ namespace Tensor compute_depth_convert(const TensorShape &shape, DataType dt_in, DataType dt_out, ConvertPolicy policy, uint32_t shift, uint32_t fixed_point_position) { // Create tensors - Tensor src = create_tensor(shape, dt_in, 1, fixed_point_position); - Tensor dst = create_tensor(shape, dt_out, 1, fixed_point_position); + Tensor src = create_tensor(shape, dt_in, 1, fixed_point_position); + Tensor dst = create_tensor(shape, dt_out, 1, fixed_point_position); // Create and configure function NEDepthConvert depth_convert; @@ -100,8 +99,8 @@ Tensor compute_depth_convert(const TensorShape &shape, DataType dt_in, DataType void compute_configure_validate(const TensorShape &shape, DataType dt_in, DataType dt_out, ConvertPolicy policy, uint32_t shift, uint32_t fixed_point_position) { // Create tensors - Tensor src = create_tensor(shape, dt_in, 1, fixed_point_position); - Tensor dst = create_tensor(shape, dt_out, 1, fixed_point_position); + Tensor src = create_tensor(shape, dt_in, 1, fixed_point_position); + Tensor dst = create_tensor(shape, dt_out, 1, fixed_point_position); BOOST_TEST(src.info()->is_resizable()); BOOST_TEST(dst.info()->is_resizable()); diff --git a/tests/validation/NEON/FillBorder.cpp b/tests/validation/NEON/FillBorder.cpp index 9fbeb998f5..54710923c1 100644 --- a/tests/validation/NEON/FillBorder.cpp +++ b/tests/validation/NEON/FillBorder.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "Globals.h" -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "TensorLibrary.h" #include "TypePrinter.h" @@ -57,7 +56,7 @@ BOOST_DATA_TEST_CASE(FillBorder, BorderModes() * boost::unit_test::data::make({ BorderSize border_size{ 5 }; // Create tensors - Tensor src = create_tensor(TensorShape{ 10U, 10U, 2U }, DataType::U8); + Tensor src = create_tensor(TensorShape{ 10U, 10U, 2U }, DataType::U8); src.info()->extend_padding(padding); diff --git a/tests/validation/NEON/Fixedpoint/Exp_QS16.cpp b/tests/validation/NEON/Fixedpoint/Exp_QS16.cpp index e6d7d860cb..bb8961af73 100644 --- a/tests/validation/NEON/Fixedpoint/Exp_QS16.cpp +++ b/tests/validation/NEON/Fixedpoint/Exp_QS16.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "Globals.h" -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "TensorLibrary.h" #include "TypePrinter.h" @@ -60,8 +59,8 @@ const float tolerance = 1.0f; /**< Tolerance value for comparing reference's out Tensor compute_exp_qs16(const TensorShape &shape, int fixed_point_position) { // Create tensors - Tensor src = create_tensor(shape, DataType::QS16, 1, fixed_point_position); - Tensor dst = create_tensor(shape, DataType::QS16, 1, fixed_point_position); + Tensor src = create_tensor(shape, DataType::QS16, 1, fixed_point_position); + Tensor dst = create_tensor(shape, DataType::QS16, 1, fixed_point_position); constexpr unsigned int num_elems_processed_per_iteration = 8; Window window = calculate_max_window(*src.info(), Steps(num_elems_processed_per_iteration)); diff --git a/tests/validation/NEON/Fixedpoint/Exp_QS8.cpp b/tests/validation/NEON/Fixedpoint/Exp_QS8.cpp index f8fc0c2ea3..e901f60986 100644 --- a/tests/validation/NEON/Fixedpoint/Exp_QS8.cpp +++ b/tests/validation/NEON/Fixedpoint/Exp_QS8.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "Globals.h" -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "TensorLibrary.h" #include "TypePrinter.h" @@ -60,8 +59,8 @@ const float tolerance = 0.0f; /**< Tolerance value for comparing reference's out Tensor compute_exp_qs8(const TensorShape &shape, int fixed_point_position) { // Create tensors - Tensor src = create_tensor(shape, DataType::QS8, 1, fixed_point_position); - Tensor dst = create_tensor(shape, DataType::QS8, 1, fixed_point_position); + Tensor src = create_tensor(shape, DataType::QS8, 1, fixed_point_position); + Tensor dst = create_tensor(shape, DataType::QS8, 1, fixed_point_position); constexpr unsigned int num_elems_processed_per_iteration = 16; Window window = calculate_max_window(*src.info(), Steps(num_elems_processed_per_iteration)); diff --git a/tests/validation/NEON/Fixedpoint/Invsqrt_QS16.cpp b/tests/validation/NEON/Fixedpoint/Invsqrt_QS16.cpp index 9211ccfe50..6b674860d8 100644 --- a/tests/validation/NEON/Fixedpoint/Invsqrt_QS16.cpp +++ b/tests/validation/NEON/Fixedpoint/Invsqrt_QS16.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "Globals.h" -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "TensorLibrary.h" #include "TypePrinter.h" @@ -60,8 +59,8 @@ const float tolerance = 5.0f; /**< Tolerance value for comparing reference's out Tensor compute_invsqrt_qs16(const TensorShape &shape, int fixed_point_position) { // Create tensors - Tensor src = create_tensor(shape, DataType::QS16, 1, fixed_point_position); - Tensor dst = create_tensor(shape, DataType::QS16, 1, fixed_point_position); + Tensor src = create_tensor(shape, DataType::QS16, 1, fixed_point_position); + Tensor dst = create_tensor(shape, DataType::QS16, 1, fixed_point_position); constexpr unsigned int num_elems_processed_per_iteration = 8; Window window = calculate_max_window(*src.info(), Steps(num_elems_processed_per_iteration)); diff --git a/tests/validation/NEON/Fixedpoint/Invsqrt_QS8.cpp b/tests/validation/NEON/Fixedpoint/Invsqrt_QS8.cpp index ab63cbe76f..78719d1290 100644 --- a/tests/validation/NEON/Fixedpoint/Invsqrt_QS8.cpp +++ b/tests/validation/NEON/Fixedpoint/Invsqrt_QS8.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "Globals.h" -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "TensorLibrary.h" #include "TypePrinter.h" @@ -60,8 +59,8 @@ const float tolerance = 4.0f; /**< Tolerance value for comparing reference's out Tensor compute_invsqrt_qs8(const TensorShape &shape, int fixed_point_position) { // Create tensors - Tensor src = create_tensor(shape, DataType::QS8, 1, fixed_point_position); - Tensor dst = create_tensor(shape, DataType::QS8, 1, fixed_point_position); + Tensor src = create_tensor(shape, DataType::QS8, 1, fixed_point_position); + Tensor dst = create_tensor(shape, DataType::QS8, 1, fixed_point_position); constexpr unsigned int num_elems_processed_per_iteration = 16; Window window = calculate_max_window(*src.info(), Steps(num_elems_processed_per_iteration)); diff --git a/tests/validation/NEON/Fixedpoint/Log_QS16.cpp b/tests/validation/NEON/Fixedpoint/Log_QS16.cpp index c23d12725b..f7a9bc8ccc 100644 --- a/tests/validation/NEON/Fixedpoint/Log_QS16.cpp +++ b/tests/validation/NEON/Fixedpoint/Log_QS16.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "Globals.h" -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "TensorLibrary.h" #include "TypePrinter.h" @@ -60,8 +59,8 @@ const float tolerance = 7.0f; /**< Tolerance value for comparing reference's out Tensor compute_log_qs16(const TensorShape &shape, int fixed_point_position) { // Create tensors - Tensor src = create_tensor(shape, DataType::QS16, 1, fixed_point_position); - Tensor dst = create_tensor(shape, DataType::QS16, 1, fixed_point_position); + Tensor src = create_tensor(shape, DataType::QS16, 1, fixed_point_position); + Tensor dst = create_tensor(shape, DataType::QS16, 1, fixed_point_position); constexpr unsigned int num_elems_processed_per_iteration = 8; Window window = calculate_max_window(*src.info(), Steps(num_elems_processed_per_iteration)); diff --git a/tests/validation/NEON/Fixedpoint/Log_QS8.cpp b/tests/validation/NEON/Fixedpoint/Log_QS8.cpp index 6789ec7264..8cdbd30867 100644 --- a/tests/validation/NEON/Fixedpoint/Log_QS8.cpp +++ b/tests/validation/NEON/Fixedpoint/Log_QS8.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "Globals.h" -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "TensorLibrary.h" #include "TypePrinter.h" @@ -60,8 +59,8 @@ const float tolerance = 5; /**< Tolerance value for comparing reference's output Tensor compute_log_qs8(const TensorShape &shape, int fixed_point_position) { // Create tensors - Tensor src = create_tensor(shape, DataType::QS8, 1, fixed_point_position); - Tensor dst = create_tensor(shape, DataType::QS8, 1, fixed_point_position); + Tensor src = create_tensor(shape, DataType::QS8, 1, fixed_point_position); + Tensor dst = create_tensor(shape, DataType::QS8, 1, fixed_point_position); constexpr unsigned int num_elems_processed_per_iteration = 16; Window window = calculate_max_window(*src.info(), Steps(num_elems_processed_per_iteration)); diff --git a/tests/validation/NEON/Fixedpoint/Reciprocal_QS16.cpp b/tests/validation/NEON/Fixedpoint/Reciprocal_QS16.cpp index c66cf0e6e6..1ef73e2847 100644 --- a/tests/validation/NEON/Fixedpoint/Reciprocal_QS16.cpp +++ b/tests/validation/NEON/Fixedpoint/Reciprocal_QS16.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "Globals.h" -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "TensorLibrary.h" #include "TypePrinter.h" @@ -60,8 +59,8 @@ const float tolerance = 9.0f; /**< Tolerance value for comparing reference's out Tensor compute_reciprocal_qs16(const TensorShape &shape, int fixed_point_position) { // Create tensors - Tensor src = create_tensor(shape, DataType::QS16, 1, fixed_point_position); - Tensor dst = create_tensor(shape, DataType::QS16, 1, fixed_point_position); + Tensor src = create_tensor(shape, DataType::QS16, 1, fixed_point_position); + Tensor dst = create_tensor(shape, DataType::QS16, 1, fixed_point_position); constexpr unsigned int num_elems_processed_per_iteration = 8; Window window = calculate_max_window(*src.info(), Steps(num_elems_processed_per_iteration)); diff --git a/tests/validation/NEON/Fixedpoint/Reciprocal_QS8.cpp b/tests/validation/NEON/Fixedpoint/Reciprocal_QS8.cpp index f1f130a9cb..9c33a9ebcb 100644 --- a/tests/validation/NEON/Fixedpoint/Reciprocal_QS8.cpp +++ b/tests/validation/NEON/Fixedpoint/Reciprocal_QS8.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "Globals.h" -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "TensorLibrary.h" #include "TypePrinter.h" @@ -60,8 +59,8 @@ const float tolerance = 3; /**< Tolerance value for comparing reference's output Tensor compute_reciprocal_qs8(const TensorShape &shape, int fixed_point_position) { // Create tensors - Tensor src = create_tensor(shape, DataType::QS8, 1, fixed_point_position); - Tensor dst = create_tensor(shape, DataType::QS8, 1, fixed_point_position); + Tensor src = create_tensor(shape, DataType::QS8, 1, fixed_point_position); + Tensor dst = create_tensor(shape, DataType::QS8, 1, fixed_point_position); constexpr unsigned int num_elems_processed_per_iteration = 16; Window window = calculate_max_window(*src.info(), Steps(num_elems_processed_per_iteration)); diff --git a/tests/validation/NEON/FullyConnectedLayer.cpp b/tests/validation/NEON/FullyConnectedLayer.cpp index bda235bd55..69ff663193 100644 --- a/tests/validation/NEON/FullyConnectedLayer.cpp +++ b/tests/validation/NEON/FullyConnectedLayer.cpp @@ -21,10 +21,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "TypePrinter.h" #include "dataset/FullyConnectedLayerDataset.h" +#include "tests/Globals.h" +#include "tests/Utils.h" #include "validation/Datasets.h" #include "validation/Reference.h" #include "validation/Validation.h" @@ -49,9 +50,9 @@ Tensor compute_fully_connected_layer(const TensorShape &input_shape, const Tenso bool transpose_weights, int fixed_point_position) { // Create tensors - Tensor src = create_tensor(input_shape, dt, 1, fixed_point_position); - Tensor bias = create_tensor(bias_shape, dt, 1, fixed_point_position); - Tensor dst = create_tensor(output_shape, dt, 1, fixed_point_position); + Tensor src = create_tensor(input_shape, dt, 1, fixed_point_position); + Tensor bias = create_tensor(bias_shape, dt, 1, fixed_point_position); + Tensor dst = create_tensor(output_shape, dt, 1, fixed_point_position); // Swap the first and second dimension of weights' shape if transpose_weights is true TensorShape ws = weights_shape; @@ -62,7 +63,7 @@ Tensor compute_fully_connected_layer(const TensorShape &input_shape, const Tenso ws.set(1, dimx); } - Tensor weights = create_tensor(ws, dt, 1, fixed_point_position); + Tensor weights = create_tensor(ws, dt, 1, fixed_point_position); // Create and configure function. // Note: We pass the weights already transposed @@ -115,9 +116,9 @@ BOOST_DATA_TEST_CASE(Configuration, int fixed_point_position = (dt == DataType::F32) ? 0 : 3; // Create tensors - Tensor src = create_tensor(fc_set.src_shape, dt, 1, fixed_point_position); - Tensor bias = create_tensor(fc_set.bias_shape, dt, 1, fixed_point_position); - Tensor dst = create_tensor(fc_set.dst_shape, dt, 1, fixed_point_position); + Tensor src = create_tensor(fc_set.src_shape, dt, 1, fixed_point_position); + Tensor bias = create_tensor(fc_set.bias_shape, dt, 1, fixed_point_position); + Tensor dst = create_tensor(fc_set.dst_shape, dt, 1, fixed_point_position); // Swap the first and second dimension of weights' shape if transpose_weights is true TensorShape ws = fc_set.weights_shape; @@ -128,7 +129,7 @@ BOOST_DATA_TEST_CASE(Configuration, ws.set(1, dimx); } - Tensor weights = create_tensor(ws, dt, 1, fixed_point_position); + Tensor weights = create_tensor(ws, dt, 1, fixed_point_position); BOOST_TEST(src.info()->is_resizable()); BOOST_TEST(weights.info()->is_resizable()); diff --git a/tests/validation/NEON/GEMM.cpp b/tests/validation/NEON/GEMM.cpp index 0172ddeb76..35f65c8fe2 100644 --- a/tests/validation/NEON/GEMM.cpp +++ b/tests/validation/NEON/GEMM.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "Globals.h" -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "TensorLibrary.h" #include "TypePrinter.h" @@ -57,10 +56,10 @@ Tensor compute_gemm(const TensorShape &src_shape1, const TensorShape &src_shape2 const TensorShape &out_shape, float alpha, float beta, DataType dt, int fixed_point_position = 0) { // Create tensors - Tensor src1 = create_tensor(src_shape1, dt, 1, fixed_point_position); - Tensor src2 = create_tensor(src_shape2, dt, 1, fixed_point_position); - Tensor src3 = create_tensor(src_shape3, dt, 1, fixed_point_position); - Tensor dst = create_tensor(out_shape, dt, 1, fixed_point_position); + Tensor src1 = create_tensor(src_shape1, dt, 1, fixed_point_position); + Tensor src2 = create_tensor(src_shape2, dt, 1, fixed_point_position); + Tensor src3 = create_tensor(src_shape3, dt, 1, fixed_point_position); + Tensor dst = create_tensor(out_shape, dt, 1, fixed_point_position); // Create and configure function NEGEMM gemm; @@ -112,10 +111,10 @@ BOOST_DATA_TEST_CASE(Configuration, int fixed_point_position = (dt == DataType::F32) ? 0 : 3; // Create tensors - Tensor src1 = create_tensor(gemm_set.shape_a, dt, 1, fixed_point_position); - Tensor src2 = create_tensor(gemm_set.shape_b, dt, 1, fixed_point_position); - Tensor src3 = create_tensor(gemm_set.shape_c, dt, 1, fixed_point_position); - Tensor dst = create_tensor(gemm_set.shape_d, dt, 1, fixed_point_position); + Tensor src1 = create_tensor(gemm_set.shape_a, dt, 1, fixed_point_position); + Tensor src2 = create_tensor(gemm_set.shape_b, dt, 1, fixed_point_position); + Tensor src3 = create_tensor(gemm_set.shape_c, dt, 1, fixed_point_position); + Tensor dst = create_tensor(gemm_set.shape_d, dt, 1, fixed_point_position); BOOST_TEST(src1.info()->is_resizable()); BOOST_TEST(src2.info()->is_resizable()); diff --git a/tests/validation/NEON/Gaussian3x3.cpp b/tests/validation/NEON/Gaussian3x3.cpp index b69df9ac24..40ccfe070c 100644 --- a/tests/validation/NEON/Gaussian3x3.cpp +++ b/tests/validation/NEON/Gaussian3x3.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "Globals.h" -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "PaddingCalculator.h" #include "TensorLibrary.h" @@ -66,8 +65,8 @@ constexpr BorderSize border_size(filter_size / 2); /** Border size of the kern Tensor compute_gaussian3x3(const TensorShape &shape, BorderMode border_mode, uint8_t constant_border_value) { // Create tensors - Tensor src = create_tensor(shape, DataType::U8); - Tensor dst = create_tensor(shape, DataType::U8); + Tensor src = create_tensor(shape, DataType::U8); + Tensor dst = create_tensor(shape, DataType::U8); // Create and configure function NEGaussian3x3 gaussian3x3; @@ -98,8 +97,8 @@ BOOST_TEST_DECORATOR(*boost::unit_test::label("precommit") * boost::unit_test::l BOOST_DATA_TEST_CASE(Configuration, (SmallShapes() + LargeShapes()) * BorderModes(), shape, border_mode) { // Create tensors - Tensor src = create_tensor(shape, DataType::U8); - Tensor dst = create_tensor(shape, DataType::U8); + Tensor src = create_tensor(shape, DataType::U8); + Tensor dst = create_tensor(shape, DataType::U8); BOOST_TEST(src.info()->is_resizable()); BOOST_TEST(dst.info()->is_resizable()); diff --git a/tests/validation/NEON/Gaussian5x5.cpp b/tests/validation/NEON/Gaussian5x5.cpp index bb48961652..f8771fb1a4 100644 --- a/tests/validation/NEON/Gaussian5x5.cpp +++ b/tests/validation/NEON/Gaussian5x5.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "Globals.h" -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "PaddingCalculator.h" #include "TensorLibrary.h" @@ -68,8 +67,8 @@ constexpr BorderSize border_size(filter_size / 2); /** Border size of the kern Tensor compute_gaussian5x5(const TensorShape &shape, BorderMode border_mode, uint8_t constant_border_value) { // Create tensors - Tensor src = create_tensor(shape, DataType::U8); - Tensor dst = create_tensor(shape, DataType::U8); + Tensor src = create_tensor(shape, DataType::U8); + Tensor dst = create_tensor(shape, DataType::U8); // Create and configure function NEGaussian5x5 gaussian5x5; @@ -100,8 +99,8 @@ BOOST_TEST_DECORATOR(*boost::unit_test::label("precommit") * boost::unit_test::l BOOST_DATA_TEST_CASE(Configuration, (SmallShapes() + LargeShapes()) * BorderModes(), shape, border_mode) { // Create tensors - Tensor src = create_tensor(shape, DataType::U8); - Tensor dst = create_tensor(shape, DataType::U8); + Tensor src = create_tensor(shape, DataType::U8); + Tensor dst = create_tensor(shape, DataType::U8); BOOST_TEST(src.info()->is_resizable()); BOOST_TEST(dst.info()->is_resizable()); diff --git a/tests/validation/NEON/IntegralImage.cpp b/tests/validation/NEON/IntegralImage.cpp index 8789e464f5..e20eba6e70 100644 --- a/tests/validation/NEON/IntegralImage.cpp +++ b/tests/validation/NEON/IntegralImage.cpp @@ -23,7 +23,6 @@ */ #include "Globals.h" -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "PaddingCalculator.h" #include "TensorLibrary.h" @@ -60,8 +59,8 @@ namespace Tensor compute_integral_image(const TensorShape &shape) { // Create tensors - Tensor src = create_tensor(shape, DataType::U8); - Tensor dst = create_tensor(shape, DataType::U32); + Tensor src = create_tensor(shape, DataType::U8); + Tensor dst = create_tensor(shape, DataType::U32); // Create integral image configure function NEIntegralImage integral_image; @@ -92,8 +91,8 @@ BOOST_TEST_DECORATOR(*boost::unit_test::label("precommit") * boost::unit_test::l BOOST_DATA_TEST_CASE(Configuration, SmallShapes() + LargeShapes(), shape) { // Create tensors - Tensor src = create_tensor(shape, DataType::U8); - Tensor dst = create_tensor(shape, DataType::U32); + Tensor src = create_tensor(shape, DataType::U8); + Tensor dst = create_tensor(shape, DataType::U32); BOOST_TEST(src.info()->is_resizable()); BOOST_TEST(dst.info()->is_resizable()); diff --git a/tests/validation/NEON/MeanStdDev.cpp b/tests/validation/NEON/MeanStdDev.cpp index 7087749bc3..91de5b6175 100644 --- a/tests/validation/NEON/MeanStdDev.cpp +++ b/tests/validation/NEON/MeanStdDev.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "Globals.h" -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "PaddingCalculator.h" #include "TensorLibrary.h" @@ -59,7 +58,7 @@ namespace std::pair compute_mean_and_standard_deviation(const TensorShape &shape) { // Create tensor - Tensor src = create_tensor(shape, DataType::U8); + Tensor src = create_tensor(shape, DataType::U8); // Create output variables float mean = 0.f; @@ -92,7 +91,7 @@ BOOST_TEST_DECORATOR(*boost::unit_test::label("precommit") * boost::unit_test::l BOOST_DATA_TEST_CASE(Configuration, Small2DShapes() + Large2DShapes(), shape) { // Create tensor - Tensor src = create_tensor(shape, DataType::U8); + Tensor src = create_tensor(shape, DataType::U8); // Create output variables float mean = 0.f; diff --git a/tests/validation/NEON/NonLinearFilter.cpp b/tests/validation/NEON/NonLinearFilter.cpp index c5d5087d39..5da7812a34 100644 --- a/tests/validation/NEON/NonLinearFilter.cpp +++ b/tests/validation/NEON/NonLinearFilter.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "Globals.h" -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "PaddingCalculator.h" #include "TensorLibrary.h" @@ -69,8 +68,8 @@ Tensor compute_non_linear_filter(const TensorShape &shape, NonLinearFilterFuncti uint8_t constant_border_value) { // Create tensors - Tensor src = create_tensor(shape, DataType::U8); - Tensor dst = create_tensor(shape, DataType::U8); + Tensor src = create_tensor(shape, DataType::U8); + Tensor dst = create_tensor(shape, DataType::U8); // Create and configure function NENonLinearFilter filter; @@ -113,8 +112,8 @@ BOOST_DATA_TEST_CASE(Configuration, (SmallShapes() + LargeShapes()) const auto half_mask_size = static_cast(mask_size / 2); // Create tensors - Tensor src = create_tensor(shape, DataType::U8); - Tensor dst = create_tensor(shape, DataType::U8); + Tensor src = create_tensor(shape, DataType::U8); + Tensor dst = create_tensor(shape, DataType::U8); BOOST_TEST(src.info()->is_resizable()); BOOST_TEST(dst.info()->is_resizable()); diff --git a/tests/validation/NEON/NormalizationLayer.cpp b/tests/validation/NEON/NormalizationLayer.cpp index ff791effa0..65adaf5a3f 100644 --- a/tests/validation/NEON/NormalizationLayer.cpp +++ b/tests/validation/NEON/NormalizationLayer.cpp @@ -21,9 +21,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "TypePrinter.h" +#include "tests/Globals.h" +#include "tests/Utils.h" #include "validation/Datasets.h" #include "validation/Reference.h" #include "validation/Validation.h" @@ -70,8 +71,8 @@ float normalization_layer_tolerance(DataType dt) Tensor compute_normalization_layer(const TensorShape &shape, DataType dt, NormalizationLayerInfo norm_info, int fixed_point_position = 0) { // Create tensors - Tensor src = create_tensor(shape, dt, 1, fixed_point_position); - Tensor dst = create_tensor(shape, dt, 1, fixed_point_position); + Tensor src = create_tensor(shape, dt, 1, fixed_point_position); + Tensor dst = create_tensor(shape, dt, 1, fixed_point_position); // Create and configure function NENormalizationLayer norm; diff --git a/tests/validation/NEON/PixelWiseMultiplication.cpp b/tests/validation/NEON/PixelWiseMultiplication.cpp index fd61c72f22..83525170c7 100644 --- a/tests/validation/NEON/PixelWiseMultiplication.cpp +++ b/tests/validation/NEON/PixelWiseMultiplication.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "Globals.h" -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "PaddingCalculator.h" #include "TensorLibrary.h" @@ -67,9 +66,9 @@ Tensor compute_pixel_wise_multiplication(const TensorShape &shape, DataType dt_i int fixed_point_position = 0) { // Create tensors - Tensor src1 = create_tensor(shape, dt_in0, 1, fixed_point_position); - Tensor src2 = create_tensor(shape, dt_in1, 1, fixed_point_position); - Tensor dst = create_tensor(shape, dt_out, 1, fixed_point_position); + Tensor src1 = create_tensor(shape, dt_in0, 1, fixed_point_position); + Tensor src2 = create_tensor(shape, dt_in1, 1, fixed_point_position); + Tensor dst = create_tensor(shape, dt_out, 1, fixed_point_position); // Create and configure function NEPixelWiseMultiplication multiply; @@ -131,9 +130,9 @@ BOOST_DATA_TEST_CASE(Configuration, (SmallShapes() + LargeShapes()) * (1.f / 255 shape, scale, convert_policy, rounding_policy) { // Create tensors - Tensor src1 = create_tensor(shape, DataType::U8); - Tensor src2 = create_tensor(shape, DataType::U8); - Tensor dst = create_tensor(shape, DataType::U8); + Tensor src1 = create_tensor(shape, DataType::U8); + Tensor src2 = create_tensor(shape, DataType::U8); + Tensor dst = create_tensor(shape, DataType::U8); validate_configuration(src1, src2, dst, shape, scale, convert_policy, rounding_policy); } @@ -180,9 +179,9 @@ BOOST_DATA_TEST_CASE(Configuration, (SmallShapes() + LargeShapes()) * boost::uni shape, scale, convert_policy, rounding_policy) { // Create tensors - Tensor src1 = create_tensor(shape, DataType::U8); - Tensor src2 = create_tensor(shape, DataType::U8); - Tensor dst = create_tensor(shape, DataType::U8); + Tensor src1 = create_tensor(shape, DataType::U8); + Tensor src2 = create_tensor(shape, DataType::U8); + Tensor dst = create_tensor(shape, DataType::U8); validate_configuration(src1, src2, dst, shape, scale, convert_policy, rounding_policy); } @@ -230,9 +229,9 @@ BOOST_DATA_TEST_CASE(Configuration, (SmallShapes() + LargeShapes()) * boost::uni shape, dt, scale, convert_policy, rounding_policy) { // Create tensors - Tensor src1 = create_tensor(shape, dt); - Tensor src2 = create_tensor(shape, DataType::S16); - Tensor dst = create_tensor(shape, DataType::S16); + Tensor src1 = create_tensor(shape, dt); + Tensor src2 = create_tensor(shape, DataType::S16); + Tensor dst = create_tensor(shape, DataType::S16); validate_configuration(src1, src2, dst, shape, scale, convert_policy, rounding_policy); } @@ -277,9 +276,9 @@ BOOST_DATA_TEST_CASE(Configuration, (SmallShapes() + LargeShapes()) * boost::uni shape, dt, scale, convert_policy, rounding_policy) { // Create tensors - Tensor src1 = create_tensor(shape, dt); - Tensor src2 = create_tensor(shape, DataType::S16); - Tensor dst = create_tensor(shape, DataType::S16); + Tensor src1 = create_tensor(shape, dt); + Tensor src2 = create_tensor(shape, DataType::S16); + Tensor dst = create_tensor(shape, DataType::S16); validate_configuration(src1, src2, dst, shape, scale, convert_policy, rounding_policy); } @@ -323,9 +322,9 @@ BOOST_DATA_TEST_CASE(Configuration, (SmallShapes() + LargeShapes()) * (1.f / 255 shape, scale, convert_policy, rounding_policy) { // Create tensors - Tensor src1 = create_tensor(shape, DataType::F32); - Tensor src2 = create_tensor(shape, DataType::F32); - Tensor dst = create_tensor(shape, DataType::F32); + Tensor src1 = create_tensor(shape, DataType::F32); + Tensor src2 = create_tensor(shape, DataType::F32); + Tensor dst = create_tensor(shape, DataType::F32); validate_configuration(src1, src2, dst, shape, scale, convert_policy, rounding_policy); } @@ -370,9 +369,9 @@ BOOST_DATA_TEST_CASE(Configuration, (SmallShapes() + LargeShapes()) * boost::uni shape, scale, convert_policy, rounding_policy) { // Create tensors - Tensor src1 = create_tensor(shape, DataType::F32); - Tensor src2 = create_tensor(shape, DataType::F32); - Tensor dst = create_tensor(shape, DataType::F32); + Tensor src1 = create_tensor(shape, DataType::F32); + Tensor src2 = create_tensor(shape, DataType::F32); + Tensor dst = create_tensor(shape, DataType::F32); validate_configuration(src1, src2, dst, shape, scale, convert_policy, rounding_policy); } diff --git a/tests/validation/NEON/PoolingLayer.cpp b/tests/validation/NEON/PoolingLayer.cpp index b29cd3e2e8..9991437a2f 100644 --- a/tests/validation/NEON/PoolingLayer.cpp +++ b/tests/validation/NEON/PoolingLayer.cpp @@ -21,16 +21,16 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "TypePrinter.h" #include "arm_compute/runtime/NEON/functions/NEPoolingLayer.h" +#include "tests/Globals.h" +#include "tests/Utils.h" #include "tests/dataset/PoolingLayerDataset.h" #include "validation/Datasets.h" #include "validation/Reference.h" #include "validation/Validation.h" -#include #include using namespace arm_compute; @@ -54,8 +54,8 @@ const float tolerance_f = 1e-05; /**< Tolerance value for comparing reference's Tensor compute_pooling_layer(const TensorShape &shape_in, const TensorShape &shape_out, DataType dt, PoolingLayerInfo pool_info, int fixed_point_position = 0) { // Create tensors - Tensor src = create_tensor(shape_in, dt, 1, fixed_point_position); - Tensor dst = create_tensor(shape_out, dt, 1, fixed_point_position); + Tensor src = create_tensor(shape_in, dt, 1, fixed_point_position); + Tensor dst = create_tensor(shape_out, dt, 1, fixed_point_position); // Create and configure function NEPoolingLayer pool; diff --git a/tests/validation/NEON/ROIPoolingLayer.cpp b/tests/validation/NEON/ROIPoolingLayer.cpp index a1d4803d8d..08b051e9c9 100644 --- a/tests/validation/NEON/ROIPoolingLayer.cpp +++ b/tests/validation/NEON/ROIPoolingLayer.cpp @@ -25,6 +25,8 @@ #include "NEON/NEAccessor.h" #include "TypePrinter.h" #include "arm_compute/runtime/NEON/functions/NEROIPoolingLayer.h" +#include "tests/Globals.h" +#include "tests/Utils.h" #include "validation/Datasets.h" #include "validation/Helpers.h" #include "validation/Reference.h" @@ -50,8 +52,8 @@ Tensor compute_roi_pooling_layer(const TensorShape &shape, DataType dt, const st shape_dst.set(3, rois.size()); // Create tensors - Tensor src = create_tensor(shape, dt); - Tensor dst = create_tensor(shape_dst, dt); + Tensor src = create_tensor(shape, dt); + Tensor dst = create_tensor(shape_dst, dt); Array rois_array = create_array(rois); // Create and configure function diff --git a/tests/validation/NEON/Sobel3x3.cpp b/tests/validation/NEON/Sobel3x3.cpp index c6c58f1a37..3b69b2b898 100644 --- a/tests/validation/NEON/Sobel3x3.cpp +++ b/tests/validation/NEON/Sobel3x3.cpp @@ -23,7 +23,6 @@ */ #include "Globals.h" -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "TensorLibrary.h" #include "TypePrinter.h" @@ -66,9 +65,9 @@ constexpr BorderSize border_size(filter_size / 2); /** Border size of the kern std::pair compute_sobel_3x3(const TensorShape &shape, BorderMode border_mode, uint8_t constant_border_value) { // Create tensors - Tensor src = create_tensor(shape, DataType::U8); - Tensor dst_x = create_tensor(shape, DataType::S16); - Tensor dst_y = create_tensor(shape, DataType::S16); + Tensor src = create_tensor(shape, DataType::U8); + Tensor dst_x = create_tensor(shape, DataType::S16); + Tensor dst_y = create_tensor(shape, DataType::S16); src.info()->set_format(Format::U8); dst_x.info()->set_format(Format::S16); @@ -105,9 +104,9 @@ BOOST_TEST_DECORATOR(*boost::unit_test::label("precommit") * boost::unit_test::l BOOST_DATA_TEST_CASE(Configuration, (SmallShapes() + LargeShapes()) * BorderModes(), shape, border_mode) { // Create tensors - Tensor src = create_tensor(shape, DataType::U8); - Tensor dst_x = create_tensor(shape, DataType::S16); - Tensor dst_y = create_tensor(shape, DataType::S16); + Tensor src = create_tensor(shape, DataType::U8); + Tensor dst_x = create_tensor(shape, DataType::S16); + Tensor dst_y = create_tensor(shape, DataType::S16); src.info()->set_format(Format::U8); dst_x.info()->set_format(Format::S16); diff --git a/tests/validation/NEON/Sobel5x5.cpp b/tests/validation/NEON/Sobel5x5.cpp index 195afa6922..456e675643 100644 --- a/tests/validation/NEON/Sobel5x5.cpp +++ b/tests/validation/NEON/Sobel5x5.cpp @@ -23,7 +23,6 @@ */ #include "Globals.h" -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "PaddingCalculator.h" #include "TensorLibrary.h" @@ -66,9 +65,9 @@ constexpr BorderSize border_size(filter_size / 2); /** Border size of the kern std::pair compute_sobel_5x5(const TensorShape &shape, BorderMode border_mode, uint8_t constant_border_value) { // Create tensors - Tensor src = create_tensor(shape, DataType::U8); - Tensor dst_x = create_tensor(shape, DataType::S16); - Tensor dst_y = create_tensor(shape, DataType::S16); + Tensor src = create_tensor(shape, DataType::U8); + Tensor dst_x = create_tensor(shape, DataType::S16); + Tensor dst_y = create_tensor(shape, DataType::S16); src.info()->set_format(Format::U8); dst_x.info()->set_format(Format::S16); @@ -105,9 +104,9 @@ BOOST_TEST_DECORATOR(*boost::unit_test::label("precommit") * boost::unit_test::l BOOST_DATA_TEST_CASE(Configuration, (SmallShapes() + LargeShapes()) * BorderModes(), shape, border_mode) { // Create tensors - Tensor src = create_tensor(shape, DataType::U8); - Tensor dst_x = create_tensor(shape, DataType::S16); - Tensor dst_y = create_tensor(shape, DataType::S16); + Tensor src = create_tensor(shape, DataType::U8); + Tensor dst_x = create_tensor(shape, DataType::S16); + Tensor dst_y = create_tensor(shape, DataType::S16); src.info()->set_format(Format::U8); dst_x.info()->set_format(Format::S16); diff --git a/tests/validation/NEON/SoftmaxLayer.cpp b/tests/validation/NEON/SoftmaxLayer.cpp index 66a9e03ace..389d44814d 100644 --- a/tests/validation/NEON/SoftmaxLayer.cpp +++ b/tests/validation/NEON/SoftmaxLayer.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "Globals.h" -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "PaddingCalculator.h" #include "TensorLibrary.h" @@ -66,8 +65,8 @@ const float tolerance_fixed_point = 2.f; Tensor compute_softmax_layer(const TensorShape &shape, DataType dt, int fixed_point_position = 0) { // Create tensors - Tensor src = create_tensor(shape, dt, 1, fixed_point_position); - Tensor dst = create_tensor(shape, dt, 1, fixed_point_position); + Tensor src = create_tensor(shape, dt, 1, fixed_point_position); + Tensor dst = create_tensor(shape, dt, 1, fixed_point_position); // Create and configure function NESoftmaxLayer smx_layer; @@ -111,8 +110,8 @@ BOOST_DATA_TEST_CASE(Configuration, (SmallShapes() + LargeShapes()) * CNNDataTyp int fixed_point_position = (arm_compute::is_data_type_fixed_point(dt)) ? 3 : 0; // Create tensors - Tensor src = create_tensor(shape, dt, 1, fixed_point_position); - Tensor dst = create_tensor(shape, dt, 1, fixed_point_position); + Tensor src = create_tensor(shape, dt, 1, fixed_point_position); + Tensor dst = create_tensor(shape, dt, 1, fixed_point_position); BOOST_TEST(src.info()->is_resizable()); BOOST_TEST(dst.info()->is_resizable()); diff --git a/tests/validation/NEON/Threshold.cpp b/tests/validation/NEON/Threshold.cpp index 55f7889af3..923245ed45 100644 --- a/tests/validation/NEON/Threshold.cpp +++ b/tests/validation/NEON/Threshold.cpp @@ -22,7 +22,6 @@ * SOFTWARE. */ #include "Globals.h" -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "PaddingCalculator.h" #include "TensorLibrary.h" @@ -65,8 +64,8 @@ namespace Tensor compute_threshold(const TensorShape &shape, uint8_t threshold, uint8_t false_value, uint8_t true_value, ThresholdType type, uint8_t upper) { // Create tensors - Tensor src1 = create_tensor(shape, DataType::U8); - Tensor dst = create_tensor(shape, DataType::U8); + Tensor src1 = create_tensor(shape, DataType::U8); + Tensor dst = create_tensor(shape, DataType::U8); // Create and configure function NEThreshold thrsh; @@ -99,8 +98,8 @@ BOOST_DATA_TEST_CASE(Configuration, shape, thrshConf) { // Create tensors - Tensor src = create_tensor(shape, DataType::U8); - Tensor dst = create_tensor(shape, DataType::U8); + Tensor src = create_tensor(shape, DataType::U8); + Tensor dst = create_tensor(shape, DataType::U8); BOOST_TEST(src.info()->is_resizable()); BOOST_TEST(dst.info()->is_resizable()); diff --git a/tests/validation/system_tests/CL/AlexNet.cpp b/tests/validation/system_tests/CL/AlexNet.cpp index f7a88207c4..bbbe4cde6e 100644 --- a/tests/validation/system_tests/CL/AlexNet.cpp +++ b/tests/validation/system_tests/CL/AlexNet.cpp @@ -23,7 +23,6 @@ * SOFTWARE. */ #include "CL/CLAccessor.h" -#include "CL/Helper.h" #include "validation/Validation.h" #include "arm_compute/runtime/CL/CLSubTensor.h" diff --git a/tests/validation/system_tests/CL/LeNet5.cpp b/tests/validation/system_tests/CL/LeNet5.cpp index 8b83cfa3a6..c05690d62a 100644 --- a/tests/validation/system_tests/CL/LeNet5.cpp +++ b/tests/validation/system_tests/CL/LeNet5.cpp @@ -23,7 +23,6 @@ * SOFTWARE. */ #include "CL/CLAccessor.h" -#include "CL/Helper.h" #include "validation/Validation.h" #include "arm_compute/runtime/CL/functions/CLActivationLayer.h" diff --git a/tests/validation/system_tests/NEON/AlexNet.cpp b/tests/validation/system_tests/NEON/AlexNet.cpp index e56110d8de..1bb17d4c9b 100644 --- a/tests/validation/system_tests/NEON/AlexNet.cpp +++ b/tests/validation/system_tests/NEON/AlexNet.cpp @@ -22,7 +22,6 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "validation/Validation.h" diff --git a/tests/validation/system_tests/NEON/LeNet5.cpp b/tests/validation/system_tests/NEON/LeNet5.cpp index a82b84a997..5a311ef6dd 100644 --- a/tests/validation/system_tests/NEON/LeNet5.cpp +++ b/tests/validation/system_tests/NEON/LeNet5.cpp @@ -22,7 +22,6 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "validation/Validation.h" -- cgit v1.2.1