aboutsummaryrefslogtreecommitdiff
path: root/tests/fixtures_new
diff options
context:
space:
mode:
authorMoritz Pflanzer <moritz.pflanzer@arm.com>2017-09-01 20:41:12 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:35:24 +0000
commita09de0c8b2ed0f1481502d3b023375609362d9e3 (patch)
treee34b56d9ca69b025d7d9b943cc4df59cd458f6cb /tests/fixtures_new
parent5280071b336d53aff94ca3a6c70ebbe6bf03f4c3 (diff)
downloadComputeLibrary-a09de0c8b2ed0f1481502d3b023375609362d9e3.tar.gz
COMPMID-415: Rename and move tests
The boost validation is now "standalone" in validation_old and builds as arm_compute_validation_old. The new validation builds now as arm_compute_validation. Change-Id: Ib93ba848a25680ac60afb92b461d574a0757150d Reviewed-on: http://mpd-gerrit.cambridge.arm.com/86187 Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com> Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'tests/fixtures_new')
-rw-r--r--tests/fixtures_new/ActivationLayerFixture.h82
-rw-r--r--tests/fixtures_new/AlexNetFixture.h89
-rw-r--r--tests/fixtures_new/BatchNormalizationLayerFixture.h102
-rw-r--r--tests/fixtures_new/ConvolutionLayerFixture.h93
-rw-r--r--tests/fixtures_new/DepthwiseConvolutionFixture.h88
-rw-r--r--tests/fixtures_new/DepthwiseSeparableConvolutionLayerFixture.h103
-rw-r--r--tests/fixtures_new/FloorFixture.h78
-rw-r--r--tests/fixtures_new/FullyConnectedLayerFixture.h93
-rw-r--r--tests/fixtures_new/GEMMFixture.h89
-rw-r--r--tests/fixtures_new/LeNet5Fixture.h77
-rw-r--r--tests/fixtures_new/NormalizationLayerFixture.h82
-rw-r--r--tests/fixtures_new/PoolingLayerFixture.h83
-rw-r--r--tests/fixtures_new/ROIPoolingLayerFixture.h95
13 files changed, 0 insertions, 1154 deletions
diff --git a/tests/fixtures_new/ActivationLayerFixture.h b/tests/fixtures_new/ActivationLayerFixture.h
deleted file mode 100644
index 5066810c79..0000000000
--- a/tests/fixtures_new/ActivationLayerFixture.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 2017 ARM Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_TEST_ACTIVATIONLAYERFIXTURE
-#define ARM_COMPUTE_TEST_ACTIVATIONLAYERFIXTURE
-
-#include "arm_compute/core/TensorShape.h"
-#include "arm_compute/core/Types.h"
-#include "framework/Fixture.h"
-#include "tests/Globals.h"
-#include "tests/Utils.h"
-
-namespace arm_compute
-{
-namespace test
-{
-/** Fixture that can be used for NEON and CL */
-template <typename TensorType, typename Function, typename Accessor>
-class ActivationLayerFixture : public framework::Fixture
-{
-public:
- template <typename...>
- void setup(TensorShape shape, ActivationLayerInfo info, DataType data_type, int batches)
- {
- // Set batched in source and destination shapes
- shape.set(shape.num_dimensions(), batches);
-
- // Create tensors
- const int fixed_point_position = 4;
- src = create_tensor<TensorType>(shape, data_type, 1, fixed_point_position);
- dst = create_tensor<TensorType>(shape, data_type, 1, fixed_point_position);
-
- // Create and configure function
- act_layer.configure(&src, &dst, info);
-
- // Allocate tensors
- src.allocator()->allocate();
- dst.allocator()->allocate();
-
- // Fill tensors
- library->fill_tensor_uniform(Accessor(src), 0);
- }
-
- void run()
- {
- act_layer.run();
- }
-
- void teardown()
- {
- src.allocator()->free();
- dst.allocator()->free();
- }
-
-private:
- TensorType src{};
- TensorType dst{};
- Function act_layer{};
-};
-} // namespace test
-} // namespace arm_compute
-#endif /* ARM_COMPUTE_TEST_ACTIVATIONLAYERFIXTURE */
diff --git a/tests/fixtures_new/AlexNetFixture.h b/tests/fixtures_new/AlexNetFixture.h
deleted file mode 100644
index 0fbc1b77e3..0000000000
--- a/tests/fixtures_new/AlexNetFixture.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (c) 2017 ARM Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_TEST_ALEXNETFIXTURE
-#define ARM_COMPUTE_TEST_ALEXNETFIXTURE
-
-#include "framework/Fixture.h"
-#include "networks_new/AlexNetNetwork.h"
-#include "tests/AssetsLibrary.h"
-#include "tests/Utils.h"
-
-namespace arm_compute
-{
-namespace test
-{
-template <typename ITensorType,
- typename TensorType,
- typename SubTensorType,
- typename Accessor,
- typename ActivationLayerFunction,
- typename ConvolutionLayerFunction,
- typename DirectConvolutionLayerFunction,
- typename FullyConnectedLayerFunction,
- typename NormalizationLayerFunction,
- typename PoolingLayerFunction,
- typename SoftmaxLayerFunction>
-
-class AlexNetFixture : public framework::Fixture
-{
-public:
- template <typename...>
- void setup(DataType data_type, int batches)
- {
- constexpr bool weights_reshaped = true;
- constexpr int fixed_point_position = 4;
-
- network.init(data_type, fixed_point_position, batches, weights_reshaped);
- network.build();
- network.allocate();
- network.fill_random();
- }
-
- void run()
- {
- network.run();
- }
-
- void teardown()
- {
- network.clear();
- }
-
-private:
- networks::AlexNetNetwork<ITensorType,
- TensorType,
- SubTensorType,
- Accessor,
- ActivationLayerFunction,
- ConvolutionLayerFunction,
- DirectConvolutionLayerFunction,
- FullyConnectedLayerFunction,
- NormalizationLayerFunction,
- PoolingLayerFunction,
- SoftmaxLayerFunction>
- network{};
-};
-} // namespace test
-} // namespace arm_compute
-#endif /* ARM_COMPUTE_TEST_ALEXNETFIXTURE */
diff --git a/tests/fixtures_new/BatchNormalizationLayerFixture.h b/tests/fixtures_new/BatchNormalizationLayerFixture.h
deleted file mode 100644
index 39c80e5405..0000000000
--- a/tests/fixtures_new/BatchNormalizationLayerFixture.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (c) 2017 ARM Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_TEST_BATCHNORMALIZATIONLAYERFIXTURE
-#define ARM_COMPUTE_TEST_BATCHNORMALIZATIONLAYERFIXTURE
-
-#include "arm_compute/core/TensorShape.h"
-#include "arm_compute/core/Types.h"
-#include "framework/Fixture.h"
-#include "tests/Globals.h"
-#include "tests/Utils.h"
-
-namespace arm_compute
-{
-namespace test
-{
-/** Fixture that can be used for NEON and CL */
-template <typename TensorType, typename Function, typename Accessor>
-class BatchNormalizationLayerFixture : public framework::Fixture
-{
-public:
- template <typename...>
- void setup(TensorShape tensor_shape, TensorShape param_shape, float epsilon, DataType data_type, int batches)
- {
- // Set batched in source and destination shapes
- const unsigned int fixed_point_position = 4;
- tensor_shape.set(tensor_shape.num_dimensions(), batches);
-
- // Create tensors
- src = create_tensor<TensorType>(tensor_shape, data_type, 1, fixed_point_position);
- dst = create_tensor<TensorType>(tensor_shape, data_type, 1, fixed_point_position);
- mean = create_tensor<TensorType>(param_shape, data_type, 1, fixed_point_position);
- variance = create_tensor<TensorType>(param_shape, data_type, 1, fixed_point_position);
- beta = create_tensor<TensorType>(param_shape, data_type, 1, fixed_point_position);
- gamma = create_tensor<TensorType>(param_shape, data_type, 1, fixed_point_position);
-
- // Create and configure function
- batch_norm_layer.configure(&src, &dst, &mean, &variance, &beta, &gamma, epsilon);
-
- // Allocate tensors
- src.allocator()->allocate();
- dst.allocator()->allocate();
- mean.allocator()->allocate();
- variance.allocator()->allocate();
- beta.allocator()->allocate();
- gamma.allocator()->allocate();
-
- // Fill tensors
- library->fill_tensor_uniform(Accessor(src), 0);
- library->fill_tensor_uniform(Accessor(mean), 1);
- library->fill_tensor_uniform(Accessor(variance), 2);
- library->fill_tensor_uniform(Accessor(beta), 3);
- library->fill_tensor_uniform(Accessor(gamma), 4);
- }
-
- void run()
- {
- batch_norm_layer.run();
- }
-
- void teardown()
- {
- src.allocator()->free();
- dst.allocator()->free();
- mean.allocator()->free();
- variance.allocator()->free();
- beta.allocator()->free();
- gamma.allocator()->free();
- }
-
-private:
- TensorType src{};
- TensorType dst{};
- TensorType mean{};
- TensorType variance{};
- TensorType beta{};
- TensorType gamma{};
- Function batch_norm_layer{};
-};
-} // namespace test
-} // namespace arm_compute
-#endif /* ARM_COMPUTE_TEST_BATCHNORMALIZATIONLAYERFIXTURE */
diff --git a/tests/fixtures_new/ConvolutionLayerFixture.h b/tests/fixtures_new/ConvolutionLayerFixture.h
deleted file mode 100644
index f41cd1d25e..0000000000
--- a/tests/fixtures_new/ConvolutionLayerFixture.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright (c) 2017 ARM Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_TEST_CONVOLUTIONLAYERFIXTURE
-#define ARM_COMPUTE_TEST_CONVOLUTIONLAYERFIXTURE
-
-#include "arm_compute/core/TensorShape.h"
-#include "arm_compute/core/Types.h"
-#include "framework/Fixture.h"
-#include "tests/Globals.h"
-#include "tests/Utils.h"
-
-namespace arm_compute
-{
-namespace test
-{
-/** Fixture that can be used for NEON and CL */
-template <typename TensorType, typename Function, typename Accessor>
-class ConvolutionLayerFixture : public framework::Fixture
-{
-public:
- template <typename...>
- void setup(TensorShape src_shape, TensorShape weights_shape, TensorShape biases_shape, TensorShape dst_shape, PadStrideInfo info, DataType data_type, int batches)
- {
- // Set batched in source and destination shapes
- const unsigned int fixed_point_position = 4;
- src_shape.set(3 /* batch */, batches);
- dst_shape.set(3 /* batch */, batches);
-
- // Create tensors
- src = create_tensor<TensorType>(src_shape, data_type, 1, fixed_point_position);
- weights = create_tensor<TensorType>(weights_shape, data_type, 1, fixed_point_position);
- biases = create_tensor<TensorType>(biases_shape, data_type, 1, fixed_point_position);
- dst = create_tensor<TensorType>(dst_shape, data_type, 1, fixed_point_position);
-
- // Create and configure function
- conv_layer.configure(&src, &weights, &biases, &dst, info);
-
- // Allocate tensors
- src.allocator()->allocate();
- weights.allocator()->allocate();
- biases.allocator()->allocate();
- dst.allocator()->allocate();
-
- // Fill tensors
- library->fill_tensor_uniform(Accessor(src), 0);
- library->fill_tensor_uniform(Accessor(weights), 1);
- library->fill_tensor_uniform(Accessor(biases), 2);
- }
-
- void run()
- {
- conv_layer.run();
- }
-
- void teardown()
- {
- src.allocator()->free();
- weights.allocator()->free();
- biases.allocator()->free();
- dst.allocator()->free();
- }
-
-private:
- TensorType src{};
- TensorType weights{};
- TensorType biases{};
- TensorType dst{};
- Function conv_layer{};
-};
-} // namespace test
-} // namespace arm_compute
-#endif /* ARM_COMPUTE_TEST_CONVOLUTIONLAYERFIXTURE */
diff --git a/tests/fixtures_new/DepthwiseConvolutionFixture.h b/tests/fixtures_new/DepthwiseConvolutionFixture.h
deleted file mode 100644
index 8223c210d4..0000000000
--- a/tests/fixtures_new/DepthwiseConvolutionFixture.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 2017 ARM Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_TEST_DEPTHWISECONVOLUTIONFIXTURE
-#define ARM_COMPUTE_TEST_DEPTHWISECONVOLUTIONFIXTURE
-
-#include "arm_compute/core/TensorShape.h"
-#include "arm_compute/core/Types.h"
-#include "framework/Fixture.h"
-#include "tests/Globals.h"
-#include "tests/Utils.h"
-
-namespace arm_compute
-{
-namespace test
-{
-/** Fixture that can be used for NEON and CL */
-template <typename TensorType, typename Function, typename Accessor>
-class DepthwiseConvolutionFixture : public framework::Fixture
-{
-public:
- template <typename...>
- void setup(TensorShape src_shape, TensorShape weights_shape, TensorShape dst_shape, PadStrideInfo info, DataType data_type, int batches)
- {
- // Set batched in source and destination shapes
- const unsigned int fixed_point_position = 4;
- src_shape.set(3 /* batch */, batches);
- dst_shape.set(3 /* batch */, batches);
-
- // Create tensors
- src = create_tensor<TensorType>(src_shape, data_type, 1, fixed_point_position);
- weights = create_tensor<TensorType>(weights_shape, data_type, 1, fixed_point_position);
- dst = create_tensor<TensorType>(dst_shape, data_type, 1, fixed_point_position);
-
- // Create and configure function
- depth_conv.configure(&src, &dst, &weights, info);
-
- // Allocate tensors
- src.allocator()->allocate();
- weights.allocator()->allocate();
- dst.allocator()->allocate();
-
- // Fill tensors
- library->fill_tensor_uniform(Accessor(src), 0);
- library->fill_tensor_uniform(Accessor(weights), 1);
- }
-
- void run()
- {
- depth_conv.run();
- }
-
- void teardown()
- {
- src.allocator()->free();
- weights.allocator()->free();
- dst.allocator()->free();
- }
-
-private:
- TensorType src{};
- TensorType weights{};
- TensorType dst{};
- Function depth_conv{};
-};
-} // namespace test
-} // namespace arm_compute
-#endif /* ARM_COMPUTE_TEST_DEPTHWISECONVOLUTIONFIXTURE */
diff --git a/tests/fixtures_new/DepthwiseSeparableConvolutionLayerFixture.h b/tests/fixtures_new/DepthwiseSeparableConvolutionLayerFixture.h
deleted file mode 100644
index c4ace2ba1c..0000000000
--- a/tests/fixtures_new/DepthwiseSeparableConvolutionLayerFixture.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright (c) 2017 ARM Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_TEST_DEPTHWISESEPARABLECONVOLUTIONLAYERFIXTURE
-#define ARM_COMPUTE_TEST_DEPTHWISESEPARABLECONVOLUTIONLAYERFIXTURE
-
-#include "arm_compute/core/TensorShape.h"
-#include "arm_compute/core/Types.h"
-#include "framework/Fixture.h"
-#include "tests/Globals.h"
-#include "tests/Utils.h"
-
-namespace arm_compute
-{
-namespace test
-{
-/** Fixture that can be used for NEON and CL */
-template <typename TensorType, typename Function, typename Accessor>
-class DepthwiseSeparableConvolutionLayerFixture : public framework::Fixture
-{
-public:
- template <typename...>
- void setup(TensorShape src_shape, TensorShape depthwise_weights_shape, TensorShape depthwise_out_shape, TensorShape pointwise_weights_shape, TensorShape biases_shape, TensorShape dst_shape,
- PadStrideInfo pad_stride_depthwise_info, PadStrideInfo pad_stride_pointwise_info, DataType data_type, int batches)
- {
- // Set batched in source and destination shapes
- const unsigned int fixed_point_position = 4;
- src_shape.set(3 /* batch */, batches);
- depthwise_out_shape.set(3 /* batch */, batches);
- dst_shape.set(3 /* batch */, batches);
-
- src = create_tensor<TensorType>(src_shape, data_type, 1, fixed_point_position);
- depthwise_weights = create_tensor<TensorType>(depthwise_weights_shape, data_type, 1, fixed_point_position);
- depthwise_out = create_tensor<TensorType>(depthwise_out_shape, data_type, 1, fixed_point_position);
- pointwise_weights = create_tensor<TensorType>(pointwise_weights_shape, data_type, 1, fixed_point_position);
- biases = create_tensor<TensorType>(biases_shape, data_type, 1, fixed_point_position);
- dst = create_tensor<TensorType>(dst_shape, data_type, 1, fixed_point_position);
-
- // Create and configure function
- depth_sep_conv_layer.configure(&src, &depthwise_weights, &depthwise_out, &pointwise_weights, &biases, &dst, pad_stride_depthwise_info, pad_stride_pointwise_info);
-
- // Allocate tensors
- src.allocator()->allocate();
- depthwise_weights.allocator()->allocate();
- depthwise_out.allocator()->allocate();
- pointwise_weights.allocator()->allocate();
- biases.allocator()->allocate();
- dst.allocator()->allocate();
-
- // Fill tensors
- library->fill_tensor_uniform(Accessor(src), 0);
- library->fill_tensor_uniform(Accessor(depthwise_weights), 1);
- library->fill_tensor_uniform(Accessor(pointwise_weights), 2);
- library->fill_tensor_uniform(Accessor(biases), 3);
- }
-
- void run()
- {
- depth_sep_conv_layer.run();
- }
-
- void teardown()
- {
- src.allocator()->free();
- depthwise_weights.allocator()->free();
- depthwise_out.allocator()->free();
- pointwise_weights.allocator()->free();
- biases.allocator()->free();
- dst.allocator()->free();
- }
-
-private:
- TensorType src{};
- TensorType depthwise_weights{};
- TensorType depthwise_out{};
- TensorType pointwise_weights{};
- TensorType biases{};
- TensorType dst{};
- Function depth_sep_conv_layer{};
-};
-} // namespace test
-} // namespace arm_compute
-#endif /* ARM_COMPUTE_TEST_DEPTHWISESEPARABLECONVOLUTIONLAYERFIXTURE */
diff --git a/tests/fixtures_new/FloorFixture.h b/tests/fixtures_new/FloorFixture.h
deleted file mode 100644
index 145b623bdb..0000000000
--- a/tests/fixtures_new/FloorFixture.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) 2017 ARM Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_TEST_FLOORFIXTURE
-#define ARM_COMPUTE_TEST_FLOORFIXTURE
-
-#include "arm_compute/core/TensorShape.h"
-#include "arm_compute/core/Types.h"
-#include "framework/Fixture.h"
-#include "tests/Globals.h"
-#include "tests/Utils.h"
-
-namespace arm_compute
-{
-namespace test
-{
-/** Fixture that can be used for NEON and CL */
-template <typename TensorType, typename Function, typename Accessor>
-class FloorFixture : public framework::Fixture
-{
-public:
- template <typename...>
- void setup(TensorShape shape, DataType data_type)
- {
- // Create tensors
- src = create_tensor<TensorType>(shape, data_type);
- dst = create_tensor<TensorType>(shape, data_type);
-
- // Create and configure function
- floor_func.configure(&src, &dst);
-
- // Allocate tensors
- src.allocator()->allocate();
- dst.allocator()->allocate();
-
- // Fill tensors
- library->fill_tensor_uniform(Accessor(src), 0);
- }
-
- void run()
- {
- floor_func.run();
- }
-
- void teardown()
- {
- src.allocator()->free();
- dst.allocator()->free();
- }
-
-private:
- TensorType src{};
- TensorType dst{};
- Function floor_func{};
-};
-} // namespace test
-} // namespace arm_compute
-#endif /* ARM_COMPUTE_TEST_FLOORFIXTURE */
diff --git a/tests/fixtures_new/FullyConnectedLayerFixture.h b/tests/fixtures_new/FullyConnectedLayerFixture.h
deleted file mode 100644
index 82ecb39b9c..0000000000
--- a/tests/fixtures_new/FullyConnectedLayerFixture.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright (c) 2017 ARM Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_TEST_FULLYCONNECTEDLAYERFIXTURE
-#define ARM_COMPUTE_TEST_FULLYCONNECTEDLAYERFIXTURE
-
-#include "arm_compute/core/TensorShape.h"
-#include "arm_compute/core/Types.h"
-#include "framework/Fixture.h"
-#include "tests/Globals.h"
-#include "tests/Utils.h"
-
-namespace arm_compute
-{
-namespace test
-{
-/** Fixture that can be used for NEON and CL */
-template <typename TensorType, typename Function, typename Accessor>
-class FullyConnectedLayerFixture : public framework::Fixture
-{
-public:
- template <typename...>
- void setup(TensorShape src_shape, TensorShape weights_shape, TensorShape biases_shape, TensorShape dst_shape, DataType data_type, int batches)
- {
- // Set batched in source and destination shapes
- const unsigned int fixed_point_position = 4;
- src_shape.set(src_shape.num_dimensions() /* batch */, batches);
- dst_shape.set(dst_shape.num_dimensions() /* batch */, batches);
-
- // Create tensors
- src = create_tensor<TensorType>(src_shape, data_type, 1, fixed_point_position);
- weights = create_tensor<TensorType>(weights_shape, data_type, 1, fixed_point_position);
- biases = create_tensor<TensorType>(biases_shape, data_type, 1, fixed_point_position);
- dst = create_tensor<TensorType>(dst_shape, data_type, 1, fixed_point_position);
-
- // Create and configure function
- fc_layer.configure(&src, &weights, &biases, &dst);
-
- // Allocate tensors
- src.allocator()->allocate();
- weights.allocator()->allocate();
- biases.allocator()->allocate();
- dst.allocator()->allocate();
-
- // Fill tensors
- library->fill_tensor_uniform(Accessor(src), 0);
- library->fill_tensor_uniform(Accessor(weights), 1);
- library->fill_tensor_uniform(Accessor(biases), 2);
- }
-
- void run()
- {
- fc_layer.run();
- }
-
- void teardown()
- {
- src.allocator()->free();
- weights.allocator()->free();
- biases.allocator()->free();
- dst.allocator()->free();
- }
-
-private:
- TensorType src{};
- TensorType weights{};
- TensorType biases{};
- TensorType dst{};
- Function fc_layer{};
-};
-} // namespace test
-} // namespace arm_compute
-#endif /* ARM_COMPUTE_TEST_FULLYCONNECTEDLAYERFIXTURE */
diff --git a/tests/fixtures_new/GEMMFixture.h b/tests/fixtures_new/GEMMFixture.h
deleted file mode 100644
index 669a91f0cb..0000000000
--- a/tests/fixtures_new/GEMMFixture.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (c) 2017 ARM Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_TEST_GEMMFIXTURE
-#define ARM_COMPUTE_TEST_GEMMFIXTURE
-
-#include "arm_compute/core/TensorShape.h"
-#include "arm_compute/core/Types.h"
-#include "framework/Fixture.h"
-#include "tests/Globals.h"
-#include "tests/Utils.h"
-
-namespace arm_compute
-{
-namespace test
-{
-/** Fixture that can be used for NEON and CL */
-template <typename TensorType, typename Function, typename Accessor>
-class GEMMFixture : public framework::Fixture
-{
-public:
- template <typename...>
- void setup(TensorShape shape_a, TensorShape shape_b, TensorShape shape_c, TensorShape shape_dst, float alpha, float beta, DataType data_type)
- {
- constexpr int fixed_point_position = 4;
-
- // Create tensors
- a = create_tensor<TensorType>(shape_a, data_type, 1, fixed_point_position);
- b = create_tensor<TensorType>(shape_b, data_type, 1, fixed_point_position);
- c = create_tensor<TensorType>(shape_c, data_type, 1, fixed_point_position);
- dst = create_tensor<TensorType>(shape_dst, data_type, 1, fixed_point_position);
-
- // Create and configure function
- gemm.configure(&a, &b, &c, &dst, alpha, beta);
-
- // Allocate tensors
- a.allocator()->allocate();
- b.allocator()->allocate();
- c.allocator()->allocate();
- dst.allocator()->allocate();
-
- library->fill_tensor_uniform(Accessor(a), 0);
- library->fill_tensor_uniform(Accessor(b), 1);
- library->fill_tensor_uniform(Accessor(c), 2);
- }
-
- void run()
- {
- gemm.run();
- }
-
- void teardown()
- {
- a.allocator()->free();
- b.allocator()->free();
- c.allocator()->free();
- dst.allocator()->free();
- }
-
-private:
- TensorType a{};
- TensorType b{};
- TensorType c{};
- TensorType dst{};
- Function gemm{};
-};
-} // namespace test
-} // namespace arm_compute
-#endif /* ARM_COMPUTE_TEST_GEMMFIXTURE */
diff --git a/tests/fixtures_new/LeNet5Fixture.h b/tests/fixtures_new/LeNet5Fixture.h
deleted file mode 100644
index 9a2590b39b..0000000000
--- a/tests/fixtures_new/LeNet5Fixture.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 2017 ARM Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_TEST_LENET5FIXTURE
-#define ARM_COMPUTE_TEST_LENET5FIXTURE
-
-#include "framework/Fixture.h"
-#include "networks_new/LeNet5Network.h"
-#include "tests/AssetsLibrary.h"
-#include "tests/Utils.h"
-
-namespace arm_compute
-{
-namespace test
-{
-template <typename TensorType,
- typename Accessor,
- typename ActivationLayerFunction,
- typename ConvolutionLayerFunction,
- typename FullyConnectedLayerFunction,
- typename PoolingLayerFunction,
- typename SoftmaxLayerFunction>
-class LeNet5Fixture : public framework::Fixture
-{
-public:
- template <typename...>
- void setup(int batches)
- {
- network.init(batches);
- network.build();
- network.allocate();
- network.fill_random();
- }
-
- void run()
- {
- network.run();
- }
-
- void teardown()
- {
- network.clear();
- }
-
-private:
- networks::LeNet5Network<TensorType,
- Accessor,
- ActivationLayerFunction,
- ConvolutionLayerFunction,
- FullyConnectedLayerFunction,
- PoolingLayerFunction,
- SoftmaxLayerFunction>
- network{};
-};
-} // namespace test
-} // namespace arm_compute
-#endif /* ARM_COMPUTE_TEST_LENET5FIXTURE */
diff --git a/tests/fixtures_new/NormalizationLayerFixture.h b/tests/fixtures_new/NormalizationLayerFixture.h
deleted file mode 100644
index 999eed6cff..0000000000
--- a/tests/fixtures_new/NormalizationLayerFixture.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 2017 ARM Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_TEST_NORMALIZATIONLAYERFIXTURE
-#define ARM_COMPUTE_TEST_NORMALIZATIONLAYERFIXTURE
-
-#include "arm_compute/core/TensorShape.h"
-#include "arm_compute/core/Types.h"
-#include "framework/Fixture.h"
-#include "tests/Globals.h"
-#include "tests/Utils.h"
-
-namespace arm_compute
-{
-namespace test
-{
-/** Fixture that can be used for NEON and CL */
-template <typename TensorType, typename Function, typename Accessor>
-class NormalizationLayerFixture : public framework::Fixture
-{
-public:
- template <typename...>
- void setup(TensorShape shape, NormalizationLayerInfo info, DataType data_type, int batches)
- {
- // Set batched in source and destination shapes
- const unsigned int fixed_point_position = 4;
- shape.set(shape.num_dimensions(), batches);
-
- // Create tensors
- src = create_tensor<TensorType>(shape, data_type, 1, fixed_point_position);
- dst = create_tensor<TensorType>(shape, data_type, 1, fixed_point_position);
-
- // Create and configure function
- norm_layer.configure(&src, &dst, info);
-
- // Allocate tensors
- src.allocator()->allocate();
- dst.allocator()->allocate();
-
- // Fill tensors
- library->fill_tensor_uniform(Accessor(src), 0);
- }
-
- void run()
- {
- norm_layer.run();
- }
-
- void teardown()
- {
- src.allocator()->free();
- dst.allocator()->free();
- }
-
-private:
- TensorType src{};
- TensorType dst{};
- Function norm_layer{};
-};
-} // namespace test
-} // namespace arm_compute
-#endif /* ARM_COMPUTE_TEST_NORMALIZATIONLAYERFIXTURE */
diff --git a/tests/fixtures_new/PoolingLayerFixture.h b/tests/fixtures_new/PoolingLayerFixture.h
deleted file mode 100644
index fc9c90ae3c..0000000000
--- a/tests/fixtures_new/PoolingLayerFixture.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 2017 ARM Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_TEST_POOLINGLAYERFIXTURE
-#define ARM_COMPUTE_TEST_POOLINGLAYERFIXTURE
-
-#include "arm_compute/core/TensorShape.h"
-#include "arm_compute/core/Types.h"
-#include "framework/Fixture.h"
-#include "tests/Globals.h"
-#include "tests/Utils.h"
-
-namespace arm_compute
-{
-namespace test
-{
-/** Fixture that can be used for NEON and CL */
-template <typename TensorType, typename Function, typename Accessor>
-class PoolingLayerFixture : public framework::Fixture
-{
-public:
- template <typename...>
- void setup(TensorShape src_shape, TensorShape dst_shape, PoolingLayerInfo info, DataType data_type, int batches)
- {
- // Set batched in source and destination shapes
- const unsigned int fixed_point_position = 4;
- src_shape.set(src_shape.num_dimensions(), batches);
- dst_shape.set(dst_shape.num_dimensions(), batches);
-
- // Create tensors
- src = create_tensor<TensorType>(src_shape, data_type, 1, fixed_point_position);
- dst = create_tensor<TensorType>(dst_shape, data_type, 1, fixed_point_position);
-
- // Create and configure function
- pool_layer.configure(&src, &dst, info);
-
- // Allocate tensors
- src.allocator()->allocate();
- dst.allocator()->allocate();
-
- // Fill tensors
- library->fill_tensor_uniform(Accessor(src), 0);
- }
-
- void run()
- {
- pool_layer.run();
- }
-
- void teardown()
- {
- src.allocator()->free();
- dst.allocator()->free();
- }
-
-private:
- TensorType src{};
- TensorType dst{};
- Function pool_layer{};
-};
-} // namespace test
-} // namespace arm_compute
-#endif /* ARM_COMPUTE_TEST_POOLINGLAYERFIXTURE */
diff --git a/tests/fixtures_new/ROIPoolingLayerFixture.h b/tests/fixtures_new/ROIPoolingLayerFixture.h
deleted file mode 100644
index 54dac51ee4..0000000000
--- a/tests/fixtures_new/ROIPoolingLayerFixture.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright (c) 2017 ARM Limited.
- *
- * SPDX-License-Identifier: MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-#ifndef ARM_COMPUTE_TEST_ROIPOOLINGLAYERFIXTURE
-#define ARM_COMPUTE_TEST_ROIPOOLINGLAYERFIXTURE
-
-#include "arm_compute/core/TensorShape.h"
-#include "arm_compute/core/Types.h"
-#include "framework/Fixture.h"
-#include "tests/Globals.h"
-#include "tests/Utils.h"
-
-#include <vector>
-
-namespace arm_compute
-{
-namespace test
-{
-/** Fixture that can be used for NEON and CL */
-template <typename TensorType, typename Function, typename Accessor, typename Array_T, typename ArrayAccessor>
-class ROIPoolingLayerFixture : public framework::Fixture
-{
-public:
- template <typename...>
- void setup(TensorShape shape, const ROIPoolingLayerInfo pool_info, unsigned int num_rois, DataType data_type, int batches)
- {
- // Set batched in source and destination shapes
- const unsigned int fixed_point_position = 4;
- TensorShape shape_dst;
- shape.set(shape.num_dimensions(), batches);
- shape_dst.set(0, pool_info.pooled_width());
- shape_dst.set(1, pool_info.pooled_height());
- shape_dst.set(2, shape.z());
- shape_dst.set(3, num_rois);
-
- // Create tensors
- src = create_tensor<TensorType>(shape, data_type, 1, fixed_point_position);
- dst = create_tensor<TensorType>(shape_dst, data_type, 1, fixed_point_position);
-
- // Create random ROIs
- std::vector<ROI> rois = generate_random_rois(shape, pool_info, num_rois, 0U);
- rois_array = arm_compute::support::cpp14::make_unique<Array_T>(num_rois);
- fill_array(ArrayAccessor(*rois_array), rois);
-
- // Create and configure function
- roi_pool.configure(&src, rois_array.get(), &dst, pool_info);
-
- // Allocate tensors
- src.allocator()->allocate();
- dst.allocator()->allocate();
-
- // Fill tensors
- library->fill_tensor_uniform(Accessor(src), 0);
- }
-
- void run()
- {
- roi_pool.run();
- }
-
- void teardown()
- {
- src.allocator()->free();
- dst.allocator()->free();
- }
-
-private:
- TensorType src{};
- TensorType dst{};
- std::unique_ptr<Array_T> rois_array{};
- Function roi_pool{};
-};
-} // namespace test
-} // namespace arm_compute
-#endif /* ARM_COMPUTE_TEST_ROIPOOLINGLAYERFIXTURE */