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/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 ++--- 41 files changed, 216 insertions(+), 245 deletions(-) (limited to 'tests/validation/NEON') 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()); -- cgit v1.2.1