diff options
author | Moritz Pflanzer <moritz.pflanzer@arm.com> | 2017-06-30 12:48:43 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-09-17 14:15:39 +0100 |
commit | 94450f1fc91a89778354c2e1c07a328ba86d9cfc (patch) | |
tree | 9a84b1b86f5361027492b6698ea946d2e321baba /tests/validation | |
parent | d4f8c27f08c968f608a9e0e9b88df1871f62cdd3 (diff) | |
download | ComputeLibrary-94450f1fc91a89778354c2e1c07a328ba86d9cfc.tar.gz |
COMPMID-417: Use a common create_tensor function
Change-Id: I6b0511484a5b433ebec3fd62d778e64dcb4f89b5
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/79362
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Diffstat (limited to 'tests/validation')
60 files changed, 278 insertions, 324 deletions
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<CLTensor>(shape, dt, 1, fixed_point_position); + CLTensor dst = create_tensor<CLTensor>(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<CLTensor>(shape, dt, 1, fixed_point_position); + CLTensor dst = create_tensor<CLTensor>(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<CLTensor>(shape, DataType::U8); + CLTensor src2 = create_tensor<CLTensor>(shape, DataType::U8); + CLTensor dst = create_tensor<CLTensor>(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<CLTensor>(shape, DataType::U8); + CLTensor src2 = create_tensor<CLTensor>(shape, DataType::U8); + CLTensor dst = create_tensor<CLTensor>(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<CLTensor>(shape, DataType::U8); + CLTensor src2 = create_tensor<CLTensor>(shape, DataType::U8); + CLTensor dst = create_tensor<CLTensor>(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<CLTensor>(shape, DataType::U8); + CLTensor dst = create_tensor<CLTensor>(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<CLTensor>(shape, DataType::U8); + CLTensor dst = create_tensor<CLTensor>(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<CLTensor>(shape, dt_in); + CLTensor dst = create_tensor<CLTensor>(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<CLTensor>(shape, dt_in); + CLTensor dst = create_tensor<CLTensor>(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<CLTensor>(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<CLTensor>(shape, DataType::U8); + CLTensor dst = create_tensor<CLTensor>(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<CLTensor>(shape, DataType::U8); + CLTensor dst = create_tensor<CLTensor>(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<CLTensor>(shape, DataType::U8); + CLTensor dst = create_tensor<CLTensor>(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<CLTensor>(shape, DataType::U8); + CLTensor dst = create_tensor<CLTensor>(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<CLTensor>(shape, DataType::U8); + CLTensor dst = create_tensor<CLTensor>(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<CLTensor>(shape, DataType::U8); + CLTensor dst = create_tensor<CLTensor>(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<CLTensor>(shape, DataType::U8); + CLTensor dst = create_tensor<CLTensor>(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<int>(mask_size / 2); // Create tensors - CLTensor src = create_tensor(shape, DataType::U8); - CLTensor dst = create_tensor(shape, DataType::U8); + CLTensor src = create_tensor<CLTensor>(shape, DataType::U8); + CLTensor dst = create_tensor<CLTensor>(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<CLTensor>(shape_in, dt); + CLTensor dst = create_tensor<CLTensor>(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<CLTensor, CLTensor> 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<CLTensor>(shape, DataType::U8); + CLTensor dst_x = create_tensor<CLTensor>(shape, DataType::S16); + CLTensor dst_y = create_tensor<CLTensor>(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<CLTensor>(shape, DataType::U8); + CLTensor dst_x = create_tensor<CLTensor>(shape, DataType::S16); + CLTensor dst_y = create_tensor<CLTensor>(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<CLTensor, CLTensor> 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<CLTensor>(shape, DataType::U8); + CLTensor dst_x = create_tensor<CLTensor>(shape, DataType::S16); + CLTensor dst_y = create_tensor<CLTensor>(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<CLTensor>(shape, DataType::U8); + CLTensor dst_x = create_tensor<CLTensor>(shape, DataType::S16); + CLTensor dst_y = create_tensor<CLTensor>(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<CLTensor>(shape, dt, 1, fixed_point_position); + CLTensor dst = create_tensor<CLTensor>(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<CLTensor>(shape, dt, 1, fixed_point_position); + CLTensor dst = create_tensor<CLTensor>(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<CLTensor>(shape, DataType::U8); + CLTensor dst = create_tensor<CLTensor>(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<CLTensor>(shape, DataType::U8); + CLTensor dst = create_tensor<CLTensor>(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<Tensor>(shape, dt_in0); + Tensor src2 = create_tensor<Tensor>(shape, dt_in1); + Tensor dst = create_tensor<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<Tensor>(shape, DataType::U8); + Tensor src2 = create_tensor<Tensor>(shape, DataType::U8); + Tensor dst = create_tensor<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<Tensor>(shape, dt); + Tensor src2 = create_tensor<Tensor>(shape, DataType::S16); + Tensor dst = create_tensor<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<Tensor>(shape, DataType::U8); + Tensor dst = create_tensor<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<Tensor>(shape, DataType::U8); + Tensor dst = create_tensor<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<Tensor>(shape, DataType::U8); + Tensor dst = create_tensor<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<Tensor>(shape, DataType::U8); + Tensor dst = create_tensor<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<Tensor>(shape, DataType::U8); + Tensor dst = create_tensor<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<Tensor>(shape, DataType::U8); + Tensor dst = create_tensor<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<Tensor>(shape, dt, 1, fixed_point_position); + Tensor dst = create_tensor<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<Tensor>(shape, dt, 1, fixed_point_position); + Tensor dst = create_tensor<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<Tensor>(shape, dt_in0); + Tensor src2 = create_tensor<Tensor>(shape, dt_in1); + Tensor dst = create_tensor<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<Tensor>(shape, DataType::U8); + Tensor src2 = create_tensor<Tensor>(shape, DataType::U8); + Tensor dst = create_tensor<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<Tensor>(shape, dt); + Tensor src2 = create_tensor<Tensor>(shape, DataType::S16); + Tensor dst = create_tensor<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<Tensor>(shape, DataType::F32); + Tensor src2 = create_tensor<Tensor>(shape, DataType::F32); + Tensor dst = create_tensor<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<Tensor>(shape, dt_in0); + Tensor src2 = create_tensor<Tensor>(shape, dt_in1); + Tensor dst = create_tensor<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<Tensor>(shape, DataType::U8); + Tensor src2 = create_tensor<Tensor>(shape, DataType::U8); + Tensor dst = create_tensor<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<Tensor>(shape, dt); + Tensor src2 = create_tensor<Tensor>(shape, DataType::S16); + Tensor dst = create_tensor<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<Tensor>(shape, DataType::F32); + Tensor src2 = create_tensor<Tensor>(shape, DataType::F32); + Tensor dst = create_tensor<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<Tensor>(shape0, dt, 1, fixed_point_position); + Tensor dst = create_tensor<Tensor>(shape0, dt, 1, fixed_point_position); + Tensor mean = create_tensor<Tensor>(shape1, dt, 1, fixed_point_position); + Tensor var = create_tensor<Tensor>(shape1, dt, 1, fixed_point_position); + Tensor beta = create_tensor<Tensor>(shape1, dt, 1, fixed_point_position); + Tensor gamma = create_tensor<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<Tensor>(obj.shape0, dt, 1, fixed_point_position); + Tensor dst = create_tensor<Tensor>(obj.shape0, dt, 1, fixed_point_position); + Tensor mean = create_tensor<Tensor>(obj.shape1, dt, 1, fixed_point_position); + Tensor var = create_tensor<Tensor>(obj.shape1, dt, 1, fixed_point_position); + Tensor beta = create_tensor<Tensor>(obj.shape1, dt, 1, fixed_point_position); + Tensor gamma = create_tensor<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<Tensor>(shape, DataType::U8); + Tensor src2 = create_tensor<Tensor>(shape, DataType::U8); + Tensor dst = create_tensor<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<Tensor>(shape, DataType::U8); + Tensor src2 = create_tensor<Tensor>(shape, DataType::U8); + Tensor dst = create_tensor<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<Tensor>(shape, DataType::U8); + Tensor src2 = create_tensor<Tensor>(shape, DataType::U8); + Tensor dst = create_tensor<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<Tensor>(shape, DataType::U8); + Tensor dst = create_tensor<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<Tensor>(shape, DataType::U8); + Tensor dst = create_tensor<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<Tensor>(shape, DataType::U8); + Tensor src2 = create_tensor<Tensor>(shape, DataType::U8); + Tensor dst = create_tensor<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<Tensor>(shape, DataType::U8); + Tensor src2 = create_tensor<Tensor>(shape, DataType::U8); + Tensor dst = create_tensor<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<Tensor>(shape, DataType::U8); + Tensor src2 = create_tensor<Tensor>(shape, DataType::U8); + Tensor dst = create_tensor<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<Tensor>(shape, DataType::U8); + Tensor src2 = create_tensor<Tensor>(shape, DataType::U8); + Tensor dst = create_tensor<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<Tensor>(shape, DataType::U8); + Tensor dst = create_tensor<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<Tensor>(shape, DataType::U8); + Tensor dst = create_tensor<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<Tensor>(input_shape, dt, 1, fixed_point_position); + Tensor weights = create_tensor<Tensor>(weights_shape, dt, 1, fixed_point_position); + Tensor bias = create_tensor<Tensor>(bias_shape, dt, 1, fixed_point_position); + Tensor dst = create_tensor<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<Tensor>(conv_set.src_shape, dt, 1, fixed_point_position); + Tensor weights = create_tensor<Tensor>(conv_set.weights_shape, dt, 1, fixed_point_position); + Tensor bias = create_tensor<Tensor>(conv_set.bias_shape, dt, 1, fixed_point_position); + Tensor dst = create_tensor<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<Tensor>(src_shape, dt, 1, fixed_point_position); + Tensor weights = create_tensor<Tensor>(weights_shape, dt, 1, fixed_point_position); + Tensor bias = create_tensor<Tensor>(bias_shape, dt, 1, fixed_point_position); + Tensor dst = create_tensor<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<Tensor>(shape, dt_in, 1, fixed_point_position); + Tensor dst = create_tensor<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<Tensor>(shape, dt_in, 1, fixed_point_position); + Tensor dst = create_tensor<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<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<Tensor>(shape, DataType::QS16, 1, fixed_point_position); + Tensor dst = create_tensor<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<Tensor>(shape, DataType::QS8, 1, fixed_point_position); + Tensor dst = create_tensor<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<Tensor>(shape, DataType::QS16, 1, fixed_point_position); + Tensor dst = create_tensor<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<Tensor>(shape, DataType::QS8, 1, fixed_point_position); + Tensor dst = create_tensor<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<Tensor>(shape, DataType::QS16, 1, fixed_point_position); + Tensor dst = create_tensor<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<Tensor>(shape, DataType::QS8, 1, fixed_point_position); + Tensor dst = create_tensor<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<Tensor>(shape, DataType::QS16, 1, fixed_point_position); + Tensor dst = create_tensor<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<Tensor>(shape, DataType::QS8, 1, fixed_point_position); + Tensor dst = create_tensor<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<Tensor>(input_shape, dt, 1, fixed_point_position); + Tensor bias = create_tensor<Tensor>(bias_shape, dt, 1, fixed_point_position); + Tensor dst = create_tensor<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<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<Tensor>(fc_set.src_shape, dt, 1, fixed_point_position); + Tensor bias = create_tensor<Tensor>(fc_set.bias_shape, dt, 1, fixed_point_position); + Tensor dst = create_tensor<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<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<Tensor>(src_shape1, dt, 1, fixed_point_position); + Tensor src2 = create_tensor<Tensor>(src_shape2, dt, 1, fixed_point_position); + Tensor src3 = create_tensor<Tensor>(src_shape3, dt, 1, fixed_point_position); + Tensor dst = create_tensor<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<Tensor>(gemm_set.shape_a, dt, 1, fixed_point_position); + Tensor src2 = create_tensor<Tensor>(gemm_set.shape_b, dt, 1, fixed_point_position); + Tensor src3 = create_tensor<Tensor>(gemm_set.shape_c, dt, 1, fixed_point_position); + Tensor dst = create_tensor<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<Tensor>(shape, DataType::U8); + Tensor dst = create_tensor<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<Tensor>(shape, DataType::U8); + Tensor dst = create_tensor<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<Tensor>(shape, DataType::U8); + Tensor dst = create_tensor<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<Tensor>(shape, DataType::U8); + Tensor dst = create_tensor<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<Tensor>(shape, DataType::U8); + Tensor dst = create_tensor<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<Tensor>(shape, DataType::U8); + Tensor dst = create_tensor<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<float, float> compute_mean_and_standard_deviation(const TensorShape &shape) { // Create tensor - Tensor src = create_tensor(shape, DataType::U8); + Tensor src = create_tensor<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<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<Tensor>(shape, DataType::U8); + Tensor dst = create_tensor<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<int>(mask_size / 2); // Create tensors - Tensor src = create_tensor(shape, DataType::U8); - Tensor dst = create_tensor(shape, DataType::U8); + Tensor src = create_tensor<Tensor>(shape, DataType::U8); + Tensor dst = create_tensor<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<Tensor>(shape, dt, 1, fixed_point_position); + Tensor dst = create_tensor<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<Tensor>(shape, dt_in0, 1, fixed_point_position); + Tensor src2 = create_tensor<Tensor>(shape, dt_in1, 1, fixed_point_position); + Tensor dst = create_tensor<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<Tensor>(shape, DataType::U8); + Tensor src2 = create_tensor<Tensor>(shape, DataType::U8); + Tensor dst = create_tensor<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<Tensor>(shape, DataType::U8); + Tensor src2 = create_tensor<Tensor>(shape, DataType::U8); + Tensor dst = create_tensor<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<Tensor>(shape, dt); + Tensor src2 = create_tensor<Tensor>(shape, DataType::S16); + Tensor dst = create_tensor<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<Tensor>(shape, dt); + Tensor src2 = create_tensor<Tensor>(shape, DataType::S16); + Tensor dst = create_tensor<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<Tensor>(shape, DataType::F32); + Tensor src2 = create_tensor<Tensor>(shape, DataType::F32); + Tensor dst = create_tensor<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<Tensor>(shape, DataType::F32); + Tensor src2 = create_tensor<Tensor>(shape, DataType::F32); + Tensor dst = create_tensor<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 <iostream> #include <random> 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<Tensor>(shape_in, dt, 1, fixed_point_position); + Tensor dst = create_tensor<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<Tensor>(shape, dt); + Tensor dst = create_tensor<Tensor>(shape_dst, dt); Array<ROI> 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<Tensor, Tensor> 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<Tensor>(shape, DataType::U8); + Tensor dst_x = create_tensor<Tensor>(shape, DataType::S16); + Tensor dst_y = create_tensor<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<Tensor>(shape, DataType::U8); + Tensor dst_x = create_tensor<Tensor>(shape, DataType::S16); + Tensor dst_y = create_tensor<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<Tensor, Tensor> 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<Tensor>(shape, DataType::U8); + Tensor dst_x = create_tensor<Tensor>(shape, DataType::S16); + Tensor dst_y = create_tensor<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<Tensor>(shape, DataType::U8); + Tensor dst_x = create_tensor<Tensor>(shape, DataType::S16); + Tensor dst_y = create_tensor<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<Tensor>(shape, dt, 1, fixed_point_position); + Tensor dst = create_tensor<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<Tensor>(shape, dt, 1, fixed_point_position); + Tensor dst = create_tensor<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<Tensor>(shape, DataType::U8); + Tensor dst = create_tensor<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<Tensor>(shape, DataType::U8); + Tensor dst = create_tensor<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" |