From d0bbf0351e560bfd35f248ac6137ce88fff23c30 Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Mon, 16 Dec 2019 17:00:49 +0000 Subject: COMPMID-2932: Clear untracked benchmarks - Removes untracked benchmarks - Leaves a couple per backend for public show-case Signed-off-by: Georgios Pinitas Change-Id: I5fac2aec8617b03131ec0f3d64ed40fbbd4a63c2 Reviewed-on: https://review.mlplatform.org/c/2492 Tested-by: Arm Jenkins Reviewed-by: Giuseppe Rossini Reviewed-by: Michalis Spyrou Comments-Addressed: Michalis Spyrou Comments-Addressed: Arm Jenkins --- tests/benchmark/CL/ActivationLayer.cpp | 143 -------------- tests/benchmark/CL/BatchNormalizationLayer.cpp | 86 --------- tests/benchmark/CL/CannyEdge.cpp | 73 ------- tests/benchmark/CL/ColorConvert.cpp | 134 ------------- tests/benchmark/CL/Convolution.cpp | 206 -------------------- tests/benchmark/CL/ConvolutionLayer.cpp | 200 ------------------- tests/benchmark/CL/DepthConcatenateLayer.cpp | 59 ------ tests/benchmark/CL/DepthwiseConvolutionLayer.cpp | 54 ------ tests/benchmark/CL/DequantizationLayer.cpp | 59 ------ tests/benchmark/CL/DirectConvolutionLayer.cpp | 119 ------------ tests/benchmark/CL/EqualizeHistogram.cpp | 63 ------ tests/benchmark/CL/FFT.cpp | 60 ------ tests/benchmark/CL/FastCorners.cpp | 77 -------- tests/benchmark/CL/FlattenLayer.cpp | 56 ------ tests/benchmark/CL/Floor.cpp | 57 ------ tests/benchmark/CL/FullyConnectedLayer.cpp | 109 ----------- tests/benchmark/CL/GEMM.cpp | 70 ------- tests/benchmark/CL/GEMMLowp.cpp | 57 ------ tests/benchmark/CL/GaussianPyramid.cpp | 66 ------- tests/benchmark/CL/HOGDescriptor.cpp | 66 ------- tests/benchmark/CL/HOGDetector.cpp | 78 -------- tests/benchmark/CL/HOGMultiDetection.cpp | 77 -------- tests/benchmark/CL/HarrisCorners.cpp | 79 -------- tests/benchmark/CL/Histogram.cpp | 64 ------- tests/benchmark/CL/IntegralImage.cpp | 52 ----- tests/benchmark/CL/L2NormalizeLayer.cpp | 60 ------ tests/benchmark/CL/LaplacianPyramid.cpp | 76 -------- tests/benchmark/CL/LaplacianReconstruct.cpp | 82 -------- tests/benchmark/CL/LocallyConnectedLayer.cpp | 72 ------- tests/benchmark/CL/Magnitude.cpp | 58 ------ tests/benchmark/CL/MeanStdDev.cpp | 65 ------- tests/benchmark/CL/Median3x3.cpp | 56 ------ tests/benchmark/CL/MinMaxLocation.cpp | 63 ------ tests/benchmark/CL/NormalizationLayer.cpp | 76 -------- tests/benchmark/CL/OpticalFlow.cpp | 70 ------- tests/benchmark/CL/Phase.cpp | 69 ------- tests/benchmark/CL/PoolingLayer.cpp | 146 -------------- tests/benchmark/CL/QuantizationLayer.cpp | 56 ------ tests/benchmark/CL/ROIPoolingLayer.cpp | 60 ------ tests/benchmark/CL/Remap.cpp | 66 ------- tests/benchmark/CL/ReshapeLayer.cpp | 57 ------ tests/benchmark/CL/Scale.cpp | 7 +- tests/benchmark/CL/Sobel.cpp | 109 ----------- tests/benchmark/CL/SoftmaxLayer.cpp | 60 ------ tests/benchmark/CL/Transpose.cpp | 62 ------ tests/benchmark/CL/WarpAffine.cpp | 74 ------- tests/benchmark/GLES_COMPUTE/ActivationLayer.cpp | 143 -------------- .../GLES_COMPUTE/BatchNormalizationLayer.cpp | 112 ----------- tests/benchmark/GLES_COMPUTE/ConvolutionLayer.cpp | 131 ------------- .../GLES_COMPUTE/DepthwiseConvolutionLayer.cpp | 54 ------ .../GLES_COMPUTE/DirectConvolutionLayer.cpp | 120 ------------ .../benchmark/GLES_COMPUTE/FullyConnectedLayer.cpp | 109 ----------- tests/benchmark/GLES_COMPUTE/GEMM.cpp | 67 ------- .../GLES_COMPUTE/NormalizePlanarYUVLayer.cpp | 59 ------ tests/benchmark/GLES_COMPUTE/PoolingLayer.cpp | 146 -------------- tests/benchmark/GLES_COMPUTE/Scale.cpp | 8 +- tests/benchmark/GLES_COMPUTE/SoftmaxLayer.cpp | 63 ------ tests/benchmark/GLES_COMPUTE/Transpose.cpp | 62 ------ tests/benchmark/NEON/ActivationLayer.cpp | 132 ------------- tests/benchmark/NEON/BatchNormalizationLayer.cpp | 114 ----------- tests/benchmark/NEON/CannyEdge.cpp | 73 ------- tests/benchmark/NEON/ColorConvert.cpp | 134 ------------- tests/benchmark/NEON/Convolution.cpp | 206 -------------------- tests/benchmark/NEON/ConvolutionLayer.cpp | 213 --------------------- tests/benchmark/NEON/DepthConcatenateLayer.cpp | 59 ------ tests/benchmark/NEON/DequantizationLayer.cpp | 63 ------ tests/benchmark/NEON/DirectConvolutionLayer.cpp | 127 ------------ tests/benchmark/NEON/ElementwiseSin.cpp | 73 ------- tests/benchmark/NEON/EqualizeHistogram.cpp | 63 ------ tests/benchmark/NEON/FFT.cpp | 60 ------ tests/benchmark/NEON/FastCorners.cpp | 77 -------- tests/benchmark/NEON/FlattenLayer.cpp | 56 ------ tests/benchmark/NEON/Floor.cpp | 57 ------ tests/benchmark/NEON/FullyConnectedLayer.cpp | 113 ----------- tests/benchmark/NEON/GEMM.cpp | 74 ------- tests/benchmark/NEON/GEMMLowp.cpp | 55 ------ tests/benchmark/NEON/GaussianPyramid.cpp | 66 ------- tests/benchmark/NEON/HOGDescriptor.cpp | 65 ------- tests/benchmark/NEON/HOGDetector.cpp | 77 -------- tests/benchmark/NEON/HOGMultiDetection.cpp | 77 -------- tests/benchmark/NEON/HarrisCorners.cpp | 78 -------- tests/benchmark/NEON/Histogram.cpp | 63 ------ tests/benchmark/NEON/IntegralImage.cpp | 52 ----- tests/benchmark/NEON/L2NormalizeLayer.cpp | 60 ------ tests/benchmark/NEON/LaplacianPyramid.cpp | 76 -------- tests/benchmark/NEON/LaplacianReconstruct.cpp | 82 -------- tests/benchmark/NEON/LocallyConnectedLayer.cpp | 72 ------- tests/benchmark/NEON/Magnitude.cpp | 60 ------ tests/benchmark/NEON/MeanStdDev.cpp | 65 ------- tests/benchmark/NEON/Median3x3.cpp | 56 ------ tests/benchmark/NEON/MinMaxLocation.cpp | 63 ------ tests/benchmark/NEON/NormalizationLayer.cpp | 79 -------- tests/benchmark/NEON/OpticalFlow.cpp | 70 ------- tests/benchmark/NEON/PadLayer.cpp | 87 --------- tests/benchmark/NEON/Phase.cpp | 70 ------- tests/benchmark/NEON/PoolingLayer.cpp | 112 ----------- tests/benchmark/NEON/QuantizationLayer.cpp | 56 ------ tests/benchmark/NEON/ROIPoolingLayer.cpp | 57 ------ tests/benchmark/NEON/Remap.cpp | 66 ------- tests/benchmark/NEON/ReshapeLayer.cpp | 57 ------ tests/benchmark/NEON/Scale.cpp | 7 +- tests/benchmark/NEON/Sobel.cpp | 109 ----------- tests/benchmark/NEON/SoftmaxLayer.cpp | 60 ------ tests/benchmark/NEON/Transpose.cpp | 62 ------ tests/benchmark/NEON/WarpAffine.cpp | 74 ------- tests/benchmark/fixtures/ActivationLayerFixture.h | 93 --------- .../fixtures/BatchNormalizationLayerFixture.h | 110 ----------- tests/benchmark/fixtures/CannyEdgeFixture.h | 87 --------- tests/benchmark/fixtures/ColorConvertFixture.h | 143 -------------- tests/benchmark/fixtures/ConvolutionFixture.h | 173 ----------------- tests/benchmark/fixtures/ConvolutionLayerFixture.h | 99 ---------- .../fixtures/DepthConcatenateLayerFixture.h | 130 ------------- .../fixtures/DepthwiseConvolutionLayerFixture.h | 111 ----------- .../fixtures/DequantizationLayerFixture.h | 86 --------- .../fixtures/DirectConvolutionLayerFixture.h | 102 ---------- tests/benchmark/fixtures/ElementWiseUnaryFixture.h | 144 -------------- .../benchmark/fixtures/EqualizeHistogramFixture.h | 83 -------- .../fixtures/FFTConvolutionLayerFixture.h | 100 ---------- tests/benchmark/fixtures/FFTFixture.h | 83 -------- tests/benchmark/fixtures/FastCornersFixture.h | 105 ---------- tests/benchmark/fixtures/FlattenLayerFixture.h | 86 --------- tests/benchmark/fixtures/FloorFixture.h | 84 -------- .../fixtures/FullyConnectedLayerFixture.h | 97 ---------- tests/benchmark/fixtures/GEMMFixture.h | 92 --------- tests/benchmark/fixtures/GEMMLowpFixture.h | 96 ---------- tests/benchmark/fixtures/GaussianPyramidFixture.h | 82 -------- tests/benchmark/fixtures/HOGDescriptorFixture.h | 95 --------- tests/benchmark/fixtures/HOGDetectorFixture.h | 101 ---------- .../benchmark/fixtures/HOGMultiDetectionFixture.h | 148 -------------- tests/benchmark/fixtures/HarrisCornersFixture.h | 86 --------- tests/benchmark/fixtures/HistogramFixture.h | 79 -------- tests/benchmark/fixtures/IntegralImageFixture.h | 83 -------- tests/benchmark/fixtures/L2NormalizeLayerFixture.h | 84 -------- tests/benchmark/fixtures/LaplacianPyramidFixture.h | 100 ---------- .../fixtures/LaplacianReconstructFixture.h | 80 -------- .../fixtures/LocallyConnectedLayerFixture.h | 90 --------- tests/benchmark/fixtures/MagnitudeFixture.h | 87 --------- tests/benchmark/fixtures/MeanStdDevFixture.h | 80 -------- tests/benchmark/fixtures/Median3x3Fixture.h | 87 --------- tests/benchmark/fixtures/MinMaxLocationFixture.h | 83 -------- .../benchmark/fixtures/NormalizationLayerFixture.h | 88 --------- .../fixtures/NormalizePlanarYUVLayerFixture.h | 92 --------- tests/benchmark/fixtures/OpticalFlowFixture.h | 148 -------------- tests/benchmark/fixtures/PadLayerFixture.h | 109 ----------- tests/benchmark/fixtures/PhaseFixture.h | 87 --------- tests/benchmark/fixtures/PoolingLayerFixture.h | 103 ---------- .../benchmark/fixtures/QuantizationLayerFixture.h | 85 -------- tests/benchmark/fixtures/ROIPoolingLayerFixture.h | 145 -------------- tests/benchmark/fixtures/RemapFixture.h | 108 ----------- tests/benchmark/fixtures/ReshapeLayerFixture.h | 84 -------- tests/benchmark/fixtures/SobelFixture.h | 158 --------------- tests/benchmark/fixtures/SoftmaxLayerFixture.h | 88 --------- tests/benchmark/fixtures/TransposeFixture.h | 87 --------- tests/benchmark/fixtures/WarpAffineFixture.h | 90 --------- .../fixtures/WinogradConvolutionLayerFixture.h | 105 ---------- 155 files changed, 3 insertions(+), 13452 deletions(-) delete mode 100644 tests/benchmark/CL/ActivationLayer.cpp delete mode 100644 tests/benchmark/CL/BatchNormalizationLayer.cpp delete mode 100644 tests/benchmark/CL/CannyEdge.cpp delete mode 100644 tests/benchmark/CL/ColorConvert.cpp delete mode 100644 tests/benchmark/CL/Convolution.cpp delete mode 100644 tests/benchmark/CL/ConvolutionLayer.cpp delete mode 100644 tests/benchmark/CL/DepthConcatenateLayer.cpp delete mode 100644 tests/benchmark/CL/DepthwiseConvolutionLayer.cpp delete mode 100644 tests/benchmark/CL/DequantizationLayer.cpp delete mode 100644 tests/benchmark/CL/DirectConvolutionLayer.cpp delete mode 100644 tests/benchmark/CL/EqualizeHistogram.cpp delete mode 100644 tests/benchmark/CL/FFT.cpp delete mode 100644 tests/benchmark/CL/FastCorners.cpp delete mode 100644 tests/benchmark/CL/FlattenLayer.cpp delete mode 100644 tests/benchmark/CL/Floor.cpp delete mode 100644 tests/benchmark/CL/FullyConnectedLayer.cpp delete mode 100644 tests/benchmark/CL/GEMM.cpp delete mode 100644 tests/benchmark/CL/GEMMLowp.cpp delete mode 100644 tests/benchmark/CL/GaussianPyramid.cpp delete mode 100644 tests/benchmark/CL/HOGDescriptor.cpp delete mode 100644 tests/benchmark/CL/HOGDetector.cpp delete mode 100644 tests/benchmark/CL/HOGMultiDetection.cpp delete mode 100644 tests/benchmark/CL/HarrisCorners.cpp delete mode 100644 tests/benchmark/CL/Histogram.cpp delete mode 100644 tests/benchmark/CL/IntegralImage.cpp delete mode 100644 tests/benchmark/CL/L2NormalizeLayer.cpp delete mode 100644 tests/benchmark/CL/LaplacianPyramid.cpp delete mode 100644 tests/benchmark/CL/LaplacianReconstruct.cpp delete mode 100644 tests/benchmark/CL/LocallyConnectedLayer.cpp delete mode 100644 tests/benchmark/CL/Magnitude.cpp delete mode 100644 tests/benchmark/CL/MeanStdDev.cpp delete mode 100644 tests/benchmark/CL/Median3x3.cpp delete mode 100644 tests/benchmark/CL/MinMaxLocation.cpp delete mode 100644 tests/benchmark/CL/NormalizationLayer.cpp delete mode 100644 tests/benchmark/CL/OpticalFlow.cpp delete mode 100644 tests/benchmark/CL/Phase.cpp delete mode 100644 tests/benchmark/CL/PoolingLayer.cpp delete mode 100644 tests/benchmark/CL/QuantizationLayer.cpp delete mode 100644 tests/benchmark/CL/ROIPoolingLayer.cpp delete mode 100644 tests/benchmark/CL/Remap.cpp delete mode 100644 tests/benchmark/CL/ReshapeLayer.cpp delete mode 100644 tests/benchmark/CL/Sobel.cpp delete mode 100644 tests/benchmark/CL/SoftmaxLayer.cpp delete mode 100644 tests/benchmark/CL/Transpose.cpp delete mode 100644 tests/benchmark/CL/WarpAffine.cpp delete mode 100644 tests/benchmark/GLES_COMPUTE/ActivationLayer.cpp delete mode 100644 tests/benchmark/GLES_COMPUTE/BatchNormalizationLayer.cpp delete mode 100644 tests/benchmark/GLES_COMPUTE/ConvolutionLayer.cpp delete mode 100644 tests/benchmark/GLES_COMPUTE/DepthwiseConvolutionLayer.cpp delete mode 100644 tests/benchmark/GLES_COMPUTE/DirectConvolutionLayer.cpp delete mode 100644 tests/benchmark/GLES_COMPUTE/FullyConnectedLayer.cpp delete mode 100644 tests/benchmark/GLES_COMPUTE/GEMM.cpp delete mode 100644 tests/benchmark/GLES_COMPUTE/NormalizePlanarYUVLayer.cpp delete mode 100644 tests/benchmark/GLES_COMPUTE/PoolingLayer.cpp delete mode 100644 tests/benchmark/GLES_COMPUTE/SoftmaxLayer.cpp delete mode 100644 tests/benchmark/GLES_COMPUTE/Transpose.cpp delete mode 100644 tests/benchmark/NEON/ActivationLayer.cpp delete mode 100644 tests/benchmark/NEON/BatchNormalizationLayer.cpp delete mode 100644 tests/benchmark/NEON/CannyEdge.cpp delete mode 100644 tests/benchmark/NEON/ColorConvert.cpp delete mode 100644 tests/benchmark/NEON/Convolution.cpp delete mode 100644 tests/benchmark/NEON/ConvolutionLayer.cpp delete mode 100644 tests/benchmark/NEON/DepthConcatenateLayer.cpp delete mode 100644 tests/benchmark/NEON/DequantizationLayer.cpp delete mode 100644 tests/benchmark/NEON/DirectConvolutionLayer.cpp delete mode 100644 tests/benchmark/NEON/ElementwiseSin.cpp delete mode 100644 tests/benchmark/NEON/EqualizeHistogram.cpp delete mode 100644 tests/benchmark/NEON/FFT.cpp delete mode 100644 tests/benchmark/NEON/FastCorners.cpp delete mode 100644 tests/benchmark/NEON/FlattenLayer.cpp delete mode 100644 tests/benchmark/NEON/Floor.cpp delete mode 100644 tests/benchmark/NEON/FullyConnectedLayer.cpp delete mode 100644 tests/benchmark/NEON/GEMM.cpp delete mode 100644 tests/benchmark/NEON/GEMMLowp.cpp delete mode 100644 tests/benchmark/NEON/GaussianPyramid.cpp delete mode 100644 tests/benchmark/NEON/HOGDescriptor.cpp delete mode 100644 tests/benchmark/NEON/HOGDetector.cpp delete mode 100644 tests/benchmark/NEON/HOGMultiDetection.cpp delete mode 100644 tests/benchmark/NEON/HarrisCorners.cpp delete mode 100644 tests/benchmark/NEON/Histogram.cpp delete mode 100644 tests/benchmark/NEON/IntegralImage.cpp delete mode 100644 tests/benchmark/NEON/L2NormalizeLayer.cpp delete mode 100644 tests/benchmark/NEON/LaplacianPyramid.cpp delete mode 100644 tests/benchmark/NEON/LaplacianReconstruct.cpp delete mode 100644 tests/benchmark/NEON/LocallyConnectedLayer.cpp delete mode 100644 tests/benchmark/NEON/Magnitude.cpp delete mode 100644 tests/benchmark/NEON/MeanStdDev.cpp delete mode 100644 tests/benchmark/NEON/Median3x3.cpp delete mode 100644 tests/benchmark/NEON/MinMaxLocation.cpp delete mode 100644 tests/benchmark/NEON/NormalizationLayer.cpp delete mode 100644 tests/benchmark/NEON/OpticalFlow.cpp delete mode 100644 tests/benchmark/NEON/PadLayer.cpp delete mode 100644 tests/benchmark/NEON/Phase.cpp delete mode 100644 tests/benchmark/NEON/PoolingLayer.cpp delete mode 100644 tests/benchmark/NEON/QuantizationLayer.cpp delete mode 100644 tests/benchmark/NEON/ROIPoolingLayer.cpp delete mode 100644 tests/benchmark/NEON/Remap.cpp delete mode 100644 tests/benchmark/NEON/ReshapeLayer.cpp delete mode 100644 tests/benchmark/NEON/Sobel.cpp delete mode 100644 tests/benchmark/NEON/SoftmaxLayer.cpp delete mode 100644 tests/benchmark/NEON/Transpose.cpp delete mode 100644 tests/benchmark/NEON/WarpAffine.cpp delete mode 100644 tests/benchmark/fixtures/ActivationLayerFixture.h delete mode 100644 tests/benchmark/fixtures/BatchNormalizationLayerFixture.h delete mode 100644 tests/benchmark/fixtures/CannyEdgeFixture.h delete mode 100644 tests/benchmark/fixtures/ColorConvertFixture.h delete mode 100644 tests/benchmark/fixtures/ConvolutionFixture.h delete mode 100644 tests/benchmark/fixtures/ConvolutionLayerFixture.h delete mode 100644 tests/benchmark/fixtures/DepthConcatenateLayerFixture.h delete mode 100644 tests/benchmark/fixtures/DepthwiseConvolutionLayerFixture.h delete mode 100644 tests/benchmark/fixtures/DequantizationLayerFixture.h delete mode 100644 tests/benchmark/fixtures/DirectConvolutionLayerFixture.h delete mode 100644 tests/benchmark/fixtures/ElementWiseUnaryFixture.h delete mode 100644 tests/benchmark/fixtures/EqualizeHistogramFixture.h delete mode 100644 tests/benchmark/fixtures/FFTConvolutionLayerFixture.h delete mode 100644 tests/benchmark/fixtures/FFTFixture.h delete mode 100644 tests/benchmark/fixtures/FastCornersFixture.h delete mode 100644 tests/benchmark/fixtures/FlattenLayerFixture.h delete mode 100644 tests/benchmark/fixtures/FloorFixture.h delete mode 100644 tests/benchmark/fixtures/FullyConnectedLayerFixture.h delete mode 100644 tests/benchmark/fixtures/GEMMFixture.h delete mode 100644 tests/benchmark/fixtures/GEMMLowpFixture.h delete mode 100644 tests/benchmark/fixtures/GaussianPyramidFixture.h delete mode 100644 tests/benchmark/fixtures/HOGDescriptorFixture.h delete mode 100644 tests/benchmark/fixtures/HOGDetectorFixture.h delete mode 100644 tests/benchmark/fixtures/HOGMultiDetectionFixture.h delete mode 100644 tests/benchmark/fixtures/HarrisCornersFixture.h delete mode 100644 tests/benchmark/fixtures/HistogramFixture.h delete mode 100644 tests/benchmark/fixtures/IntegralImageFixture.h delete mode 100644 tests/benchmark/fixtures/L2NormalizeLayerFixture.h delete mode 100644 tests/benchmark/fixtures/LaplacianPyramidFixture.h delete mode 100644 tests/benchmark/fixtures/LaplacianReconstructFixture.h delete mode 100644 tests/benchmark/fixtures/LocallyConnectedLayerFixture.h delete mode 100644 tests/benchmark/fixtures/MagnitudeFixture.h delete mode 100644 tests/benchmark/fixtures/MeanStdDevFixture.h delete mode 100644 tests/benchmark/fixtures/Median3x3Fixture.h delete mode 100644 tests/benchmark/fixtures/MinMaxLocationFixture.h delete mode 100644 tests/benchmark/fixtures/NormalizationLayerFixture.h delete mode 100644 tests/benchmark/fixtures/NormalizePlanarYUVLayerFixture.h delete mode 100644 tests/benchmark/fixtures/OpticalFlowFixture.h delete mode 100644 tests/benchmark/fixtures/PadLayerFixture.h delete mode 100644 tests/benchmark/fixtures/PhaseFixture.h delete mode 100644 tests/benchmark/fixtures/PoolingLayerFixture.h delete mode 100644 tests/benchmark/fixtures/QuantizationLayerFixture.h delete mode 100644 tests/benchmark/fixtures/ROIPoolingLayerFixture.h delete mode 100644 tests/benchmark/fixtures/RemapFixture.h delete mode 100644 tests/benchmark/fixtures/ReshapeLayerFixture.h delete mode 100644 tests/benchmark/fixtures/SobelFixture.h delete mode 100644 tests/benchmark/fixtures/SoftmaxLayerFixture.h delete mode 100644 tests/benchmark/fixtures/TransposeFixture.h delete mode 100644 tests/benchmark/fixtures/WarpAffineFixture.h delete mode 100644 tests/benchmark/fixtures/WinogradConvolutionLayerFixture.h (limited to 'tests/benchmark') diff --git a/tests/benchmark/CL/ActivationLayer.cpp b/tests/benchmark/CL/ActivationLayer.cpp deleted file mode 100644 index 69db5a1974..0000000000 --- a/tests/benchmark/CL/ActivationLayer.cpp +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Copyright (c) 2017-2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/CLTensorAllocator.h" -#include "arm_compute/runtime/CL/functions/CLActivationLayer.h" -#include "tests/CL/CLAccessor.h" -#include "tests/benchmark/fixtures/ActivationLayerFixture.h" -#include "tests/datasets/system_tests/alexnet/AlexNetActivationLayerDataset.h" -#include "tests/datasets/system_tests/googlenet/inceptionv1/GoogLeNetInceptionV1ActivationLayerDataset.h" -#include "tests/datasets/system_tests/googlenet/inceptionv4/GoogLeNetInceptionV4ActivationLayerDataset.h" -#include "tests/datasets/system_tests/lenet5/LeNet5ActivationLayerDataset.h" -#include "tests/datasets/system_tests/mobilenet/MobileNetActivationLayerDataset.h" -#include "tests/datasets/system_tests/squeezenet/SqueezeNetActivationLayerDataset.h" -#include "tests/datasets/system_tests/vgg/vgg16/VGG16ActivationLayerDataset.h" -#include "tests/datasets/system_tests/yolo/v2/YOLOV2ActivationLayerDataset.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_types = framework::dataset::make("DataType", { DataType::F16, DataType::F32 }); -const auto data_types_mobilenet = framework::dataset::make("DataType", { DataType::F16, DataType::F32, DataType::QASYMM8 }); -} // namespace - -using CLActivationLayerFixture = ActivationLayerFixture; - -TEST_SUITE(CL) - -REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetActivationLayer, CLActivationLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::AlexNetActivationLayerDataset(), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(LeNet5ActivationLayer, CLActivationLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::LeNet5ActivationLayerDataset(), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(MobileNetActivationLayer, CLActivationLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::MobileNetActivationLayerDataset(), - data_types_mobilenet), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV1ActivationLayer, CLActivationLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV1ActivationLayerDataset(), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV4ActivationLayer, CLActivationLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV4ActivationLayerDataset(), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(SqueezeNetActivationLayer, CLActivationLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::SqueezeNetActivationLayerDataset(), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(VGG16ActivationLayer, CLActivationLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::VGG16ActivationLayerDataset(), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(YOLOV2ActivationLayer, CLActivationLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::YOLOV2ActivationLayerDataset(), - data_types), - framework::dataset::make("Batches", 1))); - -TEST_SUITE(NIGHTLY) -REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetActivationLayer, CLActivationLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(datasets::AlexNetActivationLayerDataset(), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(LeNet5ActivationLayer, CLActivationLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(datasets::LeNet5ActivationLayerDataset(), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(MobileNetActivationLayer, CLActivationLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(datasets::MobileNetActivationLayerDataset(), - data_types_mobilenet), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV1ActivationLayer, CLActivationLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV1ActivationLayerDataset(), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV4ActivationLayer, CLActivationLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV4ActivationLayerDataset(), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(SqueezeNetActivationLayer, CLActivationLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(datasets::SqueezeNetActivationLayerDataset(), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(VGG16ActivationLayer, CLActivationLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(datasets::VGG16ActivationLayerDataset(), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(YOLOV2ActivationLayer, CLActivationLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(datasets::YOLOV2ActivationLayerDataset(), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); -TEST_SUITE_END() -TEST_SUITE_END() -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/CL/BatchNormalizationLayer.cpp b/tests/benchmark/CL/BatchNormalizationLayer.cpp deleted file mode 100644 index 6d19030998..0000000000 --- a/tests/benchmark/CL/BatchNormalizationLayer.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2017-2019 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/CLTensorAllocator.h" -#include "arm_compute/runtime/CL/functions/CLBatchNormalizationLayer.h" -#include "tests/CL/CLAccessor.h" -#include "tests/benchmark/fixtures/BatchNormalizationLayerFixture.h" -#include "tests/datasets/system_tests/googlenet/inceptionv4/GoogLeNetInceptionV4BatchNormalizationLayerDataset.h" -#include "tests/datasets/system_tests/mobilenet/MobileNetBatchNormalizationLayerDataset.h" -#include "tests/datasets/system_tests/yolo/v2/YOLOV2BatchNormalizationLayerDataset.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_types = framework::dataset::make("DataType", { DataType::F32 }); -const auto data_layouts = framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC }); -const auto data_act = framework::dataset::make("ActivationInfo", ActivationLayerInfo()); -const auto data_GB = combine(framework::dataset::make("UseGamma", { false, true }), - framework::dataset::make("UseBeta", { false, true })); -const auto batch_one = combine(combine(data_types, data_layouts), framework::dataset::make("Batches", 1)); -const auto batch_four_eight = combine(combine(data_types, data_layouts), framework::dataset::make("Batches", { 4, 8 })); -} // namespace - -using CLBatchNormalizationLayerFixture = BatchNormalizationLayerFixture; - -TEST_SUITE(CL) - -REGISTER_FIXTURE_DATA_TEST_CASE(MobileNetBatchNormalizationLayer, CLBatchNormalizationLayerFixture, framework::DatasetMode::ALL, - combine(combine(combine(datasets::MobileNetBatchNormalizationLayerDataset(), data_GB), - framework::dataset::make("ActivationInfo", ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::BOUNDED_RELU, 6.f))), - batch_one)); - -REGISTER_FIXTURE_DATA_TEST_CASE(YOLOV2BatchNormalizationLayer, CLBatchNormalizationLayerFixture, framework::DatasetMode::ALL, - combine(combine(combine(datasets::YOLOV2BatchNormalizationLayerDataset(), data_GB), data_act), batch_one)); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV4BatchNormalizationLayer, CLBatchNormalizationLayerFixture, framework::DatasetMode::ALL, - combine(combine(combine(datasets::GoogLeNetInceptionV4BatchNormalizationLayerDataset(), data_GB), data_act), batch_one)); - -TEST_SUITE(NIGHTLY) - -REGISTER_FIXTURE_DATA_TEST_CASE(MobileNetBatchNormalizationLayer, CLBatchNormalizationLayerFixture, framework::DatasetMode::NIGHTLY, - combine(combine(combine(datasets::MobileNetBatchNormalizationLayerDataset(), data_GB), - framework::dataset::make("ActivationInfo", ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::BOUNDED_RELU, 6.f))), - batch_four_eight)); - -REGISTER_FIXTURE_DATA_TEST_CASE(YOLOV2BatchNormalizationLayer, CLBatchNormalizationLayerFixture, framework::DatasetMode::NIGHTLY, - combine(combine(combine(datasets::YOLOV2BatchNormalizationLayerDataset(), data_GB), data_act), batch_four_eight)); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV4BatchNormalizationLayer, CLBatchNormalizationLayerFixture, framework::DatasetMode::NIGHTLY, - combine(combine(combine(datasets::GoogLeNetInceptionV4BatchNormalizationLayerDataset(), data_GB), data_act), batch_four_eight)); -TEST_SUITE_END() -TEST_SUITE_END() -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/CL/CannyEdge.cpp b/tests/benchmark/CL/CannyEdge.cpp deleted file mode 100644 index 8cc918f4c8..0000000000 --- a/tests/benchmark/CL/CannyEdge.cpp +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/functions/CLCannyEdge.h" -#include "tests/CL/CLAccessor.h" -#include "tests/benchmark/fixtures/CannyEdgeFixture.h" -#include "tests/datasets/BorderModeDataset.h" -#include "tests/datasets/ImageFileDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -// *INDENT-OFF* -// clang-format off -const auto canny_edge_dataset = combine(framework::dataset::make("GradientSize", { 3, 5, 7 }), - combine(framework::dataset::make("Normalization", { MagnitudeType::L1NORM, MagnitudeType::L2NORM }), - datasets::BorderModes())); -} // namespace - -using CLCannyEdgeFixture = CannyEdgeFixture; - -TEST_SUITE(CL) -TEST_SUITE(CannyEdge) - -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, CLCannyEdgeFixture, framework::DatasetMode::PRECOMMIT, - combine(combine( - datasets::SmallImageFiles(), - canny_edge_dataset), - framework::dataset::make("Format", Format::U8))); - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, CLCannyEdgeFixture, framework::DatasetMode::NIGHTLY, - combine(combine( - datasets::LargeImageFiles(), - canny_edge_dataset), - framework::dataset::make("Format", Format::U8))); -// clang-format on -// *INDENT-ON* - -TEST_SUITE_END() // CannyEdge -TEST_SUITE_END() // CL -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/CL/ColorConvert.cpp b/tests/benchmark/CL/ColorConvert.cpp deleted file mode 100644 index a89357b9f1..0000000000 --- a/tests/benchmark/CL/ColorConvert.cpp +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/runtime/CL/CLMultiImage.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/functions/CLColorConvert.h" -#include "tests/CL/CLAccessor.h" -#include "tests/benchmark/fixtures/ColorConvertFixture.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto RGBDataset = framework::dataset::make("FormatType", { Format::RGB888, Format::RGBA8888 }); -const auto YUYVDataset = framework::dataset::make("FormatType", { Format::YUYV422, Format::UYVY422 }); - -const auto ColorConvert_RGBA_to_RGB = combine(framework::dataset::make("FormatType", { Format::RGBA8888 }), - framework::dataset::make("FormatType", { Format::RGB888 })); - -const auto ColorConvert_RGB_to_RGBA = combine(framework::dataset::make("FormatType", { Format::RGB888 }), - framework::dataset::make("FormatType", { Format::RGBA8888 })); - -const auto ColorConvert_RGB_to_U8 = combine(framework::dataset::make("FormatType", { Format::RGB888 }), - framework::dataset::make("FormatType", { Format::U8 })); - -const auto ColorConvert_YUYV_to_RGBDataset = combine(YUYVDataset, - RGBDataset); - -const auto ColorConvert_YUVPlanar_to_RGBDataset = combine(framework::dataset::make("FormatType", { Format::IYUV, Format::NV12, Format::NV21 }), - RGBDataset); - -const auto ColorConvert_RGBDataset_to_NVDataset = combine(RGBDataset, - framework::dataset::make("FormatType", { Format::NV12, Format::IYUV, Format::YUV444 })); - -const auto ColorConvert_YUYVDataset_to_NVDataset = combine(YUYVDataset, - framework::dataset::make("FormatType", { Format::NV12, Format::IYUV })); - -const auto ColorConvert_NVDataset_to_YUVDataset = combine(framework::dataset::make("FormatType", { Format::NV12, Format::NV21 }), - framework::dataset::make("FormatType", { Format::IYUV, Format::YUV444 })); -} // namespace - -TEST_SUITE(CL) -TEST_SUITE(ColorConvert) - -using CLColorConvertFixture = ColorConvertFixture; - -TEST_SUITE(RGBA) -// *INDENT-OFF* -// clang-format off -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, CLColorConvertFixture, framework::DatasetMode::PRECOMMIT, combine(datasets::Small2DShapes(), ColorConvert_RGBA_to_RGB)); -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, CLColorConvertFixture, framework::DatasetMode::NIGHTLY, combine(datasets::Large2DShapes(), ColorConvert_RGBA_to_RGB)); -TEST_SUITE_END() - -TEST_SUITE(RGB) -// *INDENT-OFF* -// clang-format off -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, CLColorConvertFixture, framework::DatasetMode::PRECOMMIT, combine(datasets::Small2DShapes(), ColorConvert_RGB_to_RGBA)); -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, CLColorConvertFixture, framework::DatasetMode::NIGHTLY, combine(datasets::Large2DShapes(), ColorConvert_RGB_to_RGBA)); -TEST_SUITE_END() - -TEST_SUITE(RGBtoU8) -// *INDENT-OFF* -// clang-format off -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, CLColorConvertFixture, framework::DatasetMode::PRECOMMIT, combine(datasets::Small2DShapes(), ColorConvert_RGB_to_U8)); -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, CLColorConvertFixture, framework::DatasetMode::NIGHTLY, combine(datasets::Large2DShapes(), ColorConvert_RGB_to_U8)); -TEST_SUITE_END() - -TEST_SUITE(YUV) -// *INDENT-OFF* -// clang-format off -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, CLColorConvertFixture, framework::DatasetMode::PRECOMMIT, combine(datasets::Small2DShapes(), ColorConvert_YUYV_to_RGBDataset)); -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, CLColorConvertFixture, framework::DatasetMode::NIGHTLY, combine(datasets::Large2DShapes(), ColorConvert_YUYV_to_RGBDataset)); -TEST_SUITE_END() - -TEST_SUITE(YUVPlanar) -// *INDENT-OFF* -// clang-format off -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, CLColorConvertFixture, framework::DatasetMode::PRECOMMIT, combine(datasets::Small2DShapes(), ColorConvert_YUVPlanar_to_RGBDataset)); -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, CLColorConvertFixture, framework::DatasetMode::NIGHTLY, combine(datasets::Large2DShapes(), ColorConvert_YUVPlanar_to_RGBDataset)); -TEST_SUITE_END() - -TEST_SUITE(NV) -// *INDENT-OFF* -// clang-format off -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, CLColorConvertFixture, framework::DatasetMode::PRECOMMIT, combine(datasets::Small2DShapes(), ColorConvert_RGBDataset_to_NVDataset)); -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, CLColorConvertFixture, framework::DatasetMode::NIGHTLY, combine(datasets::Large2DShapes(), ColorConvert_RGBDataset_to_NVDataset)); -TEST_SUITE_END() - -TEST_SUITE(YUYVtoNV) -// *INDENT-OFF* -// clang-format off -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, CLColorConvertFixture, framework::DatasetMode::PRECOMMIT, combine(datasets::Small2DShapes(), ColorConvert_YUYVDataset_to_NVDataset)); -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, CLColorConvertFixture, framework::DatasetMode::NIGHTLY, combine(datasets::Large2DShapes(), ColorConvert_YUYVDataset_to_NVDataset)); -TEST_SUITE_END() - -TEST_SUITE(NVtoYUV) -// *INDENT-OFF* -// clang-format off -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, CLColorConvertFixture, framework::DatasetMode::PRECOMMIT, combine(datasets::Small2DShapes(), ColorConvert_NVDataset_to_YUVDataset)); -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, CLColorConvertFixture, framework::DatasetMode::NIGHTLY, combine(datasets::Large2DShapes(), ColorConvert_NVDataset_to_YUVDataset)); -TEST_SUITE_END() - -TEST_SUITE_END() // ColorConvert -TEST_SUITE_END() // CL -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/CL/Convolution.cpp b/tests/benchmark/CL/Convolution.cpp deleted file mode 100644 index 04622aa363..0000000000 --- a/tests/benchmark/CL/Convolution.cpp +++ /dev/null @@ -1,206 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/functions/CLConvolution.h" -#include "tests/CL/CLAccessor.h" -#include "tests/benchmark/fixtures/ConvolutionFixture.h" -#include "tests/datasets/BorderModeDataset.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -// *INDENT-OFF* -// clang-format off - -#define CONVOLUTION_SQUARE_DATA_TEST_CASE(TEST_NAME, MODE, SHAPES, DT, FILTER_SIZE) \ - REGISTER_FIXTURE_DATA_TEST_CASE(TEST_NAME, CLConvolutionFixture, framework::DatasetMode::MODE, \ - combine(combine(combine( \ - datasets::SHAPES, \ - framework::dataset::make("DataType", DataType::DT)), \ - datasets::BorderModes()), \ - framework::dataset::make("FilterSize", { FILTER_SIZE }))); - -#define CONVOLUTION_RECTANGLE_DATA_TEST_CASE(TEST_NAME, MODE, SHAPES, DT) \ - REGISTER_FIXTURE_DATA_TEST_CASE(TEST_NAME, CLConvolutionFixture, framework::DatasetMode::MODE, \ - combine(combine(combine(combine( \ - datasets::SHAPES, \ - framework::dataset::make("DataType", DataType::DT)), \ - datasets::BorderModes()), \ - framework::dataset::make("FilterSize", { 3, 5, 7, 9 })), \ - framework::dataset::make("FilterSize", { 3, 5, 7, 9 }))); - -#define CONVOLUTION_SEPARABLE_DATA_TEST_CASE(TEST_NAME, MODE, SHAPES, DT, FILTER_SIZE) \ - CONVOLUTION_SQUARE_DATA_TEST_CASE(TEST_NAME, MODE, SHAPES, DT, FILTER_SIZE) - -// clang-format on -// *INDENT-ON* - -} // namespace - -TEST_SUITE(CL) -TEST_SUITE(CustomConvolution) - -TEST_SUITE(Square3x3) - -using CLConvolutionFixture = ConvolutionSquareFixture; - -TEST_SUITE(U8) -CONVOLUTION_SQUARE_DATA_TEST_CASE(RunSmall, PRECOMMIT, SmallShapes(), U8, 3) -CONVOLUTION_SQUARE_DATA_TEST_CASE(RunLarge, NIGHTLY, LargeShapes(), U8, 3) -TEST_SUITE_END() // U8 - -TEST_SUITE(S16) -CONVOLUTION_SQUARE_DATA_TEST_CASE(RunSmall, PRECOMMIT, SmallShapes(), S16, 3) -CONVOLUTION_SQUARE_DATA_TEST_CASE(RunLarge, NIGHTLY, LargeShapes(), S16, 3) -TEST_SUITE_END() // S16 - -TEST_SUITE_END() // Square3x3 - -TEST_SUITE(Square5x5) - -using CLConvolutionFixture = ConvolutionSquareFixture; - -TEST_SUITE(U8) -CONVOLUTION_SQUARE_DATA_TEST_CASE(RunSmall, PRECOMMIT, SmallShapes(), U8, 5) -CONVOLUTION_SQUARE_DATA_TEST_CASE(RunLarge, NIGHTLY, LargeShapes(), U8, 5) -TEST_SUITE_END() // U8 - -TEST_SUITE(S16) -CONVOLUTION_SQUARE_DATA_TEST_CASE(RunSmall, PRECOMMIT, SmallShapes(), S16, 5) -CONVOLUTION_SQUARE_DATA_TEST_CASE(RunLarge, NIGHTLY, LargeShapes(), S16, 5) -TEST_SUITE_END() // S16 - -TEST_SUITE_END() // Square5x5 - -TEST_SUITE(Square7x7) - -using CLConvolutionFixture = ConvolutionSquareFixture; - -TEST_SUITE(U8) -CONVOLUTION_SQUARE_DATA_TEST_CASE(RunSmall, PRECOMMIT, SmallShapes(), U8, 7) -CONVOLUTION_SQUARE_DATA_TEST_CASE(RunLarge, NIGHTLY, LargeShapes(), U8, 7) -TEST_SUITE_END() // U8 - -TEST_SUITE(S16) -CONVOLUTION_SQUARE_DATA_TEST_CASE(RunSmall, PRECOMMIT, SmallShapes(), S16, 7) -CONVOLUTION_SQUARE_DATA_TEST_CASE(RunLarge, NIGHTLY, LargeShapes(), S16, 7) -TEST_SUITE_END() // S16 - -TEST_SUITE_END() // Square7x7 - -TEST_SUITE(Square9x9) - -using CLConvolutionFixture = ConvolutionSquareFixture; - -TEST_SUITE(U8) -CONVOLUTION_SQUARE_DATA_TEST_CASE(RunSmall, PRECOMMIT, SmallShapes(), U8, 9) -CONVOLUTION_SQUARE_DATA_TEST_CASE(RunLarge, NIGHTLY, LargeShapes(), U8, 9) -TEST_SUITE_END() // U8 - -TEST_SUITE(S16) -CONVOLUTION_SQUARE_DATA_TEST_CASE(RunSmall, PRECOMMIT, SmallShapes(), S16, 9) -CONVOLUTION_SQUARE_DATA_TEST_CASE(RunLarge, NIGHTLY, LargeShapes(), S16, 9) -TEST_SUITE_END() // S16 - -TEST_SUITE_END() // Square9x9 - -TEST_SUITE(Rectangle) - -using CLConvolutionFixture = ConvolutionRectangleFixture; - -TEST_SUITE(U8) -CONVOLUTION_RECTANGLE_DATA_TEST_CASE(RunSmall, PRECOMMIT, SmallShapes(), U8) -CONVOLUTION_RECTANGLE_DATA_TEST_CASE(RunLarge, NIGHTLY, LargeShapes(), U8) -TEST_SUITE_END() // U8 - -TEST_SUITE(S16) -CONVOLUTION_RECTANGLE_DATA_TEST_CASE(RunSmall, PRECOMMIT, SmallShapes(), S16) -CONVOLUTION_RECTANGLE_DATA_TEST_CASE(RunLarge, NIGHTLY, LargeShapes(), S16) -TEST_SUITE_END() // S16 - -TEST_SUITE_END() // Rectangle - -TEST_SUITE(Separable5x5) - -using CLConvolutionFixture = ConvolutionSeperableFixture; - -TEST_SUITE(U8) -CONVOLUTION_SEPARABLE_DATA_TEST_CASE(RunSmall, PRECOMMIT, SmallShapes(), U8, 5) -CONVOLUTION_SEPARABLE_DATA_TEST_CASE(RunLarge, NIGHTLY, LargeShapes(), U8, 5) -TEST_SUITE_END() // U8 - -TEST_SUITE(S16) -CONVOLUTION_SEPARABLE_DATA_TEST_CASE(RunSmall, PRECOMMIT, SmallShapes(), S16, 5) -CONVOLUTION_SEPARABLE_DATA_TEST_CASE(RunLarge, NIGHTLY, LargeShapes(), S16, 5) -TEST_SUITE_END() // S16 - -TEST_SUITE_END() // Separable5x5 - -TEST_SUITE(Separable7x7) - -using CLConvolutionFixture = ConvolutionSeperableFixture; - -TEST_SUITE(U8) -CONVOLUTION_SEPARABLE_DATA_TEST_CASE(RunSmall, PRECOMMIT, SmallShapes(), U8, 7) -CONVOLUTION_SEPARABLE_DATA_TEST_CASE(RunLarge, NIGHTLY, LargeShapes(), U8, 7) -TEST_SUITE_END() // U8 - -TEST_SUITE(S16) -CONVOLUTION_SEPARABLE_DATA_TEST_CASE(RunSmall, PRECOMMIT, SmallShapes(), S16, 7) -CONVOLUTION_SEPARABLE_DATA_TEST_CASE(RunLarge, NIGHTLY, LargeShapes(), S16, 7) -TEST_SUITE_END() // S16 - -TEST_SUITE_END() // Separable7x7 - -TEST_SUITE(Separable9x9) - -using CLConvolutionFixture = ConvolutionSeperableFixture; - -TEST_SUITE(U8) -CONVOLUTION_SEPARABLE_DATA_TEST_CASE(RunSmall, PRECOMMIT, SmallShapes(), U8, 9) -CONVOLUTION_SEPARABLE_DATA_TEST_CASE(RunLarge, NIGHTLY, LargeShapes(), U8, 9) -TEST_SUITE_END() // U8 - -TEST_SUITE(S16) -CONVOLUTION_SEPARABLE_DATA_TEST_CASE(RunSmall, PRECOMMIT, SmallShapes(), S16, 9) -CONVOLUTION_SEPARABLE_DATA_TEST_CASE(RunLarge, NIGHTLY, LargeShapes(), S16, 9) -TEST_SUITE_END() // S16 - -TEST_SUITE_END() // Separable9x9 - -TEST_SUITE_END() // CustomConvolution -TEST_SUITE_END() // CL -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/CL/ConvolutionLayer.cpp b/tests/benchmark/CL/ConvolutionLayer.cpp deleted file mode 100644 index 20828b7717..0000000000 --- a/tests/benchmark/CL/ConvolutionLayer.cpp +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Copyright (c) 2017-2019 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/CLTensorAllocator.h" -#include "arm_compute/runtime/CL/functions/CLGEMMConvolutionLayer.h" -#include "arm_compute/runtime/CL/functions/CLWinogradConvolutionLayer.h" -#include "tests/CL/CLAccessor.h" -#include "tests/benchmark/fixtures/ConvolutionLayerFixture.h" -#include "tests/benchmark/fixtures/FFTConvolutionLayerFixture.h" -#include "tests/benchmark/fixtures/WinogradConvolutionLayerFixture.h" -#include "tests/datasets/system_tests/alexnet/AlexNetConvolutionLayerDataset.h" -#include "tests/datasets/system_tests/googlenet/inceptionv1/GoogLeNetInceptionV1ConvolutionLayerDataset.h" -#include "tests/datasets/system_tests/googlenet/inceptionv4/GoogLeNetInceptionV4ConvolutionLayerDataset.h" -#include "tests/datasets/system_tests/lenet5/LeNet5ConvolutionLayerDataset.h" -#include "tests/datasets/system_tests/mobilenet/MobileNetConvolutionLayerDataset.h" -#include "tests/datasets/system_tests/squeezenet/SqueezeNetConvolutionLayerDataset.h" -#include "tests/datasets/system_tests/vgg/vgg16/VGG16ConvolutionLayerDataset.h" -#include "tests/datasets/system_tests/yolo/v2/YOLOV2ConvolutionLayerDataset.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" -#include -#include -#include - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_types = framework::dataset::make("DataType", { DataType::F16, DataType::F32, DataType::QASYMM8 }); -} // namespace - -TEST_SUITE(CL) - -using CLGEMMConvolutionLayerFixture = ConvolutionLayerFixture; -using CLWinogradLayerFixture = WinogradConvolutionLayerFixture; -using CLFFTConvolutionLayerFixture = FFTConvolutionLayerFixture; - -REGISTER_FIXTURE_DATA_TEST_CASE(ResNet12FFTLayer, CLFFTConvolutionLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::ResNet12FFTConvolutionLayerDataset(), - framework::dataset::make("ActivationInfo", ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - framework::dataset::make("DataType", { DataType::F32 })), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetWinogradLayer, CLWinogradLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::AlexNetWinogradLayerDataset(), - framework::dataset::make("ActivationInfo", ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - framework::dataset::make("DataType", { DataType::F16, DataType::F32 })), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV1WinogradLayer, CLWinogradLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV1WinogradLayerDataset(), - framework::dataset::make("ActivationInfo", ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - framework::dataset::make("DataType", { DataType::F16, DataType::F32 })), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV4WinogradLayer, CLWinogradLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV4WinogradLayerDataset(), - framework::dataset::make("ActivationInfo", ActivationLayerInfo())), - framework::dataset::make("DataType", { DataType::F16, DataType::F32 })), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(SqueezeNetWinogradLayer, CLWinogradLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::SqueezeNetWinogradLayerDataset(), - framework::dataset::make("ActivationInfo", ActivationLayerInfo())), - framework::dataset::make("DataType", { DataType::F16, DataType::F32 })), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetConvolutionLayer, CLGEMMConvolutionLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::AlexNetConvolutionLayerDataset(), framework::dataset::make("ActivationInfo", - ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(LeNet5ConvolutionLayer, CLGEMMConvolutionLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::LeNet5ConvolutionLayerDataset(), framework::dataset::make("ActivationInfo", ActivationLayerInfo())), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV1ConvolutionLayer, CLGEMMConvolutionLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV1ConvolutionLayerDataset(), framework::dataset::make("ActivationInfo", - ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV4ConvolutionLayer, CLGEMMConvolutionLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV4ConvolutionLayerDataset(), framework::dataset::make("ActivationInfo", - ActivationLayerInfo())), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(SqueezeNetConvolutionLayer, CLGEMMConvolutionLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::SqueezeNetConvolutionLayerDataset(), framework::dataset::make("ActivationInfo", - ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(MobileNetConvolutionLayer, CLGEMMConvolutionLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::MobileNetConvolutionLayerDataset(), framework::dataset::make("ActivationInfo", - ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - data_types), - framework::dataset::make("Batches", 1))); - -TEST_SUITE(NIGHTLY) -REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetConvolutionLayer, CLGEMMConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::AlexNetConvolutionLayerDataset(), framework::dataset::make("ActivationInfo", - ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(LeNet5ConvolutionLayer, CLGEMMConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::LeNet5ConvolutionLayerDataset(), framework::dataset::make("ActivationInfo", ActivationLayerInfo())), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV1ConvolutionLayer, CLGEMMConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV1ConvolutionLayerDataset(), framework::dataset::make("ActivationInfo", - ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV4ConvolutionLayer, CLGEMMConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV4ConvolutionLayerDataset(), framework::dataset::make("ActivationInfo", - ActivationLayerInfo())), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(SqueezeNetConvolutionLayer, CLGEMMConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::SqueezeNetConvolutionLayerDataset(), framework::dataset::make("ActivationInfo", - ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -// 8 batches use about 1.8GB of memory which is too much for most devices! -REGISTER_FIXTURE_DATA_TEST_CASE(VGG16ConvolutionLayer, CLGEMMConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::VGG16ConvolutionLayerDataset(), framework::dataset::make("ActivationInfo", - ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - data_types), - framework::dataset::make("Batches", { 1, 4 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(YOLOV2ConvolutionLayer, CLGEMMConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::YOLOV2ConvolutionLayerDataset(), framework::dataset::make("ActivationInfo", ActivationLayerInfo())), - data_types), - framework::dataset::make("Batches", { 1, 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetWinogradLayer, CLWinogradLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::AlexNetWinogradLayerDataset(), - framework::dataset::make("ActivationInfo", ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - framework::dataset::make("DataType", { DataType::F16, DataType::F32 })), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV1WinogradLayer, CLWinogradLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV1WinogradLayerDataset(), - framework::dataset::make("ActivationInfo", ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - framework::dataset::make("DataType", { DataType::F16, DataType::F32 })), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV4WinogradLayer, CLWinogradLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV4WinogradLayerDataset(), - framework::dataset::make("ActivationInfo", ActivationLayerInfo())), - framework::dataset::make("DataType", { DataType::F16, DataType::F32 })), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(SqueezeNetWinogradLayer, CLWinogradLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::SqueezeNetWinogradLayerDataset(), - framework::dataset::make("ActivationInfo", ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - framework::dataset::make("DataType", { DataType::F16, DataType::F32 })), - framework::dataset::make("Batches", { 4, 8 }))); -TEST_SUITE_END() -TEST_SUITE_END() -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/CL/DepthConcatenateLayer.cpp b/tests/benchmark/CL/DepthConcatenateLayer.cpp deleted file mode 100644 index 9b101d84ed..0000000000 --- a/tests/benchmark/CL/DepthConcatenateLayer.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2017-2019 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/CLTensorAllocator.h" -#include "arm_compute/runtime/CL/functions/CLConcatenateLayer.h" -#include "tests/CL/CLAccessor.h" -#include "tests/benchmark/fixtures/DepthConcatenateLayerFixture.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_types = framework::dataset::make("DataType", { DataType::F16, DataType::F32 }); -} // namespace - -using CLDepthConcatenateLayerFixture = DepthConcatenateLayerFixture; - -TEST_SUITE(CL) -TEST_SUITE(DepthConcatenateLayer) - -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, CLDepthConcatenateLayerFixture, framework::DatasetMode::PRECOMMIT, framework::dataset::combine(datasets::Small2DShapes(), data_types)); -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, CLDepthConcatenateLayerFixture, framework::DatasetMode::NIGHTLY, framework::dataset::combine(datasets::DepthConcatenateLayerShapes(), data_types)); - -TEST_SUITE_END() -TEST_SUITE_END() -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/CL/DepthwiseConvolutionLayer.cpp b/tests/benchmark/CL/DepthwiseConvolutionLayer.cpp deleted file mode 100644 index 0e2696198d..0000000000 --- a/tests/benchmark/CL/DepthwiseConvolutionLayer.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2017-2019 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/CLTensorAllocator.h" -#include "arm_compute/runtime/CL/functions/CLDepthwiseConvolutionLayer.h" -#include "tests/CL/CLAccessor.h" -#include "tests/benchmark/fixtures/DepthwiseConvolutionLayerFixture.h" -#include "tests/datasets/system_tests/mobilenet/MobileNetDepthwiseConvolutionLayerDataset.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -const auto data_types = framework::dataset::make("DataType", { DataType::F16, DataType::F32, DataType::QASYMM8 }); -using CLDepthwiseConvolutionLayerFixture = DepthwiseConvolutionLayerFixture; - -TEST_SUITE(CL) - -REGISTER_FIXTURE_DATA_TEST_CASE(MobileNetDepthwiseConvLayer, CLDepthwiseConvolutionLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::MobileNetDepthwiseConvolutionLayerDataset(), data_types), - framework::dataset::make("Batches", { 1 }))); - -TEST_SUITE_END() -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/CL/DequantizationLayer.cpp b/tests/benchmark/CL/DequantizationLayer.cpp deleted file mode 100644 index 1998b1c589..0000000000 --- a/tests/benchmark/CL/DequantizationLayer.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2017-2019 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/CLTensorAllocator.h" -#include "arm_compute/runtime/CL/functions/CLDequantizationLayer.h" -#include "tests/CL/CLAccessor.h" -#include "tests/benchmark/fixtures/DequantizationLayerFixture.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_types_src = framework::dataset::make("DataType", { DataType::QASYMM8 }); -const auto data_types_dst = framework::dataset::make("DataType", { DataType::F16, DataType::F32 }); -} // namespace - -using CLDequantizationLayerFixture = DequantizationLayerFixture; - -TEST_SUITE(CL) - -REGISTER_FIXTURE_DATA_TEST_CASE(DequantizationLayer, CLDequantizationLayerFixture, - framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::Small3DShapes(), data_types_src), data_types_dst)); - -TEST_SUITE_END() // CL -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/CL/DirectConvolutionLayer.cpp b/tests/benchmark/CL/DirectConvolutionLayer.cpp deleted file mode 100644 index df63d3ac5d..0000000000 --- a/tests/benchmark/CL/DirectConvolutionLayer.cpp +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright (c) 2017-2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/CLTensorAllocator.h" -#include "arm_compute/runtime/CL/functions/CLDirectConvolutionLayer.h" -#include "tests/CL/CLAccessor.h" -#include "tests/benchmark/fixtures/DirectConvolutionLayerFixture.h" -#include "tests/datasets/system_tests/alexnet/AlexNetConvolutionLayerDataset.h" -#include "tests/datasets/system_tests/googlenet/inceptionv1/GoogLeNetInceptionV1ConvolutionLayerDataset.h" -#include "tests/datasets/system_tests/googlenet/inceptionv4/GoogLeNetInceptionV4ConvolutionLayerDataset.h" -#include "tests/datasets/system_tests/squeezenet/SqueezeNetConvolutionLayerDataset.h" -#include "tests/datasets/system_tests/vgg/vgg16/VGG16ConvolutionLayerDataset.h" -#include "tests/datasets/system_tests/yolo/v2/YOLOV2ConvolutionLayerDataset.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_types = framework::dataset::make("DataType", { DataType::F16, DataType::F32 }); -} // namespace - -using CLDirectConvolutionLayerFixture = DirectConvolutionLayerFixture; - -TEST_SUITE(CL) - -REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetDirectConvolutionLayer, CLDirectConvolutionLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::AlexNetDirectConvolutionLayerDataset(), framework::dataset::make("ActivationInfo", - ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV1DirectConvolutionLayer, CLDirectConvolutionLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV1DirectConvolutionLayerDataset(), - framework::dataset::make("ActivationInfo", ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV4DirectConvolutionLayer, CLDirectConvolutionLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV4DirectConvolutionLayerDataset(), framework::dataset::make("ActivationInfo", - ActivationLayerInfo())), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(SqueezeNetDirectConvolutionLayer, CLDirectConvolutionLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::SqueezeNetConvolutionLayerDataset(), framework::dataset::make("ActivationInfo", - ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - data_types), - framework::dataset::make("Batches", 1))); - -TEST_SUITE(NIGHTLY) -REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetDirectConvolutionLayer, CLDirectConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::AlexNetDirectConvolutionLayerDataset(), framework::dataset::make("ActivationInfo", - ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV1DirectConvolutionLayer, CLDirectConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV1DirectConvolutionLayerDataset(), framework::dataset::make("ActivationInfo", - ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV4DirectConvolutionLayer, CLDirectConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV4DirectConvolutionLayerDataset(), framework::dataset::make("ActivationInfo", - ActivationLayerInfo())), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(SqueezeNetDirectConvolutionLayer, CLDirectConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::SqueezeNetConvolutionLayerDataset(), framework::dataset::make("ActivationInfo", - ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(VGG16DirectConvolutionLayer, CLDirectConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::VGG16ConvolutionLayerDataset(), framework::dataset::make("ActivationInfo", - ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - data_types), - framework::dataset::make("Batches", { 1, 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(YOLOV2DirectConvolutionLayer, CLDirectConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::YOLOV2ConvolutionLayerDataset(), framework::dataset::make("ActivationInfo", ActivationLayerInfo())), - data_types), - framework::dataset::make("Batches", { 1, 4, 8 }))); -TEST_SUITE_END() -TEST_SUITE_END() -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/CL/EqualizeHistogram.cpp b/tests/benchmark/CL/EqualizeHistogram.cpp deleted file mode 100644 index 14eaccf3cb..0000000000 --- a/tests/benchmark/CL/EqualizeHistogram.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/functions/CLEqualizeHistogram.h" -#include "tests/CL/CLAccessor.h" -#include "tests/benchmark/fixtures/EqualizeHistogramFixture.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -using CLEqualizeHistogramFixture = EqualizeHistogramFixture; - -TEST_SUITE(CL) -TEST_SUITE(EqualizeHistogram) - -// *INDENT-OFF* -// clang-format off -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, CLEqualizeHistogramFixture, framework::DatasetMode::PRECOMMIT, - combine( - datasets::SmallImageShapes(), - framework::dataset::make("Format", Format::U8))); - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, CLEqualizeHistogramFixture, framework::DatasetMode::NIGHTLY, - combine( - datasets::LargeImageShapes(), - framework::dataset::make("Format", Format::U8))); -// clang-format on -// *INDENT-ON* - -TEST_SUITE_END() // EqualizeHistogram -TEST_SUITE_END() // CL -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/CL/FFT.cpp b/tests/benchmark/CL/FFT.cpp deleted file mode 100644 index 7f1ae63708..0000000000 --- a/tests/benchmark/CL/FFT.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2019 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/functions/CLFFT1D.h" -#include "arm_compute/runtime/CL/functions/CLFFT2D.h" -#include "tests/CL/CLAccessor.h" -#include "tests/benchmark/fixtures/FFTFixture.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_types = framework::dataset::make("DataType", { DataType::F32 }); -const auto shapes = framework::dataset::make("Shapes", { TensorShape(192U, 128U, 64U), TensorShape(224U, 224U) }); -} // namespace - -using CLFFT1DFixture = FFTFixture; -using CLFFT2DFixture = FFTFixture; - -TEST_SUITE(CL) - -REGISTER_FIXTURE_DATA_TEST_CASE(FFT1D, CLFFT1DFixture, framework::DatasetMode::ALL, - framework::dataset::combine(shapes, data_types)); - -REGISTER_FIXTURE_DATA_TEST_CASE(FFT2D, CLFFT2DFixture, framework::DatasetMode::ALL, - framework::dataset::combine(shapes, data_types)); - -TEST_SUITE_END() // CL -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/CL/FastCorners.cpp b/tests/benchmark/CL/FastCorners.cpp deleted file mode 100644 index 8b85893fde..0000000000 --- a/tests/benchmark/CL/FastCorners.cpp +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLArray.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/functions/CLFastCorners.h" -#include "tests/CL/CLAccessor.h" -#include "tests/benchmark/fixtures/FastCornersFixture.h" -#include "tests/datasets/ImageFileDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto threshold = framework::dataset::make("Threshold", { 64.f }); // valid range (0.0 ≤ threshold < 256.0) -const auto border_mode = framework::dataset::make("BorderMode", { BorderMode::UNDEFINED }); // NOTE: only BorderMode::UNDEFINED is implemented -const auto suppress_nonmax = framework::dataset::make("SuppressNonMax", { false, true }); -} // namespace - -using CLFastCornersFixture = FastCornersFixture; - -TEST_SUITE(CL) -TEST_SUITE(FastCorners) - -// *INDENT-OFF* -// clang-format off -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, CLFastCornersFixture, framework::DatasetMode::PRECOMMIT, - combine(combine(combine(combine( - datasets::SmallImageFiles(), - framework::dataset::make("Format", { Format::U8 })), - threshold), - suppress_nonmax), - border_mode)); - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, CLFastCornersFixture, framework::DatasetMode::NIGHTLY, - combine(combine(combine(combine( - datasets::LargeImageFiles(), - framework::dataset::make("Format", { Format::U8 })), - threshold), - suppress_nonmax), - border_mode)); -// clang-format on -// *INDENT-ON* - -TEST_SUITE_END() // FastCorners -TEST_SUITE_END() // CL -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/CL/FlattenLayer.cpp b/tests/benchmark/CL/FlattenLayer.cpp deleted file mode 100644 index e7e5a475b1..0000000000 --- a/tests/benchmark/CL/FlattenLayer.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2017-2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/CLTensorAllocator.h" -#include "arm_compute/runtime/CL/functions/CLFlattenLayer.h" -#include "tests/CL/CLAccessor.h" -#include "tests/benchmark/fixtures/FlattenLayerFixture.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_types = framework::dataset::make("DataType", { DataType::F32 }); -} // namespace - -using CLFlattenLayerFixture = FlattenLayerFixture; - -TEST_SUITE(CL) - -REGISTER_FIXTURE_DATA_TEST_CASE(Flatten, CLFlattenLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(datasets::Small4DShapes(), data_types)); - -TEST_SUITE_END() -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/CL/Floor.cpp b/tests/benchmark/CL/Floor.cpp deleted file mode 100644 index 3acf50c9f8..0000000000 --- a/tests/benchmark/CL/Floor.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2017-2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/CLTensorAllocator.h" -#include "arm_compute/runtime/CL/functions/CLFloor.h" -#include "tests/CL/CLAccessor.h" -#include "tests/benchmark/fixtures/FloorFixture.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_types = framework::dataset::make("DataType", { DataType::F32 }); -} // namespace - -using CLFloorFixture = FloorFixture; - -TEST_SUITE(CL) - -REGISTER_FIXTURE_DATA_TEST_CASE(Floor, CLFloorFixture, framework::DatasetMode::ALL, - framework::dataset::combine(datasets::SmallShapes(), data_types)); - -TEST_SUITE_END() -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/CL/FullyConnectedLayer.cpp b/tests/benchmark/CL/FullyConnectedLayer.cpp deleted file mode 100644 index aaab6bb025..0000000000 --- a/tests/benchmark/CL/FullyConnectedLayer.cpp +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (c) 2017-2018 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, - * FITCLSS 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 CONCLCTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/CLTensorAllocator.h" -#include "arm_compute/runtime/CL/functions/CLFullyConnectedLayer.h" -#include "tests/CL/CLAccessor.h" -#include "tests/benchmark/fixtures/FullyConnectedLayerFixture.h" -#include "tests/datasets/system_tests/alexnet/AlexNetFullyConnectedLayerDataset.h" -#include "tests/datasets/system_tests/googlenet/inceptionv1/GoogLeNetInceptionV1FullyConnectedLayerDataset.h" -#include "tests/datasets/system_tests/googlenet/inceptionv4/GoogLeNetInceptionV4FullyConnectedLayerDataset.h" -#include "tests/datasets/system_tests/lenet5/LeNet5FullyConnectedLayerDataset.h" -#include "tests/datasets/system_tests/vgg/vgg16/VGG16FullyConnectedLayerDataset.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_types = framework::dataset::make("DataType", { DataType::F16, DataType::F32 }); -} // namespace - -using CLFullyConnectedLayerFixture = FullyConnectedLayerFixture; - -TEST_SUITE(CL) - -REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetFullyConnectedLayer, CLFullyConnectedLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::AlexNetFullyConnectedLayerDataset(), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(LeNet5FullyConnectedLayer, CLFullyConnectedLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::LeNet5FullyConnectedLayerDataset(), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(VGG16FullyConnectedLayer, CLFullyConnectedLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::VGG16FullyConnectedLayerDataset(), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV1FullyConnectedLayer, CLFullyConnectedLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV1FullyConnectedLayerDataset(), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV4FullyConnectedLayer, CLFullyConnectedLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV4FullyConnectedLayerDataset(), - data_types), - framework::dataset::make("Batches", 1))); - -TEST_SUITE(NIGHTLY) -REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetFullyConnectedLayer, CLFullyConnectedLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(datasets::AlexNetFullyConnectedLayerDataset(), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(LeNet5FullyConnectedLayer, CLFullyConnectedLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(datasets::LeNet5FullyConnectedLayerDataset(), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(VGG16FullyConnectedLayer, CLFullyConnectedLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(datasets::VGG16FullyConnectedLayerDataset(), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV1FullyConnectedLayer, CLFullyConnectedLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV1FullyConnectedLayerDataset(), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV4FullyConnectedLayer, CLFullyConnectedLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV4FullyConnectedLayerDataset(), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); -TEST_SUITE_END() -TEST_SUITE_END() -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/CL/GEMM.cpp b/tests/benchmark/CL/GEMM.cpp deleted file mode 100644 index 179f261d08..0000000000 --- a/tests/benchmark/CL/GEMM.cpp +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2017-2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/CLTensorAllocator.h" -#include "arm_compute/runtime/CL/functions/CLGEMM.h" -#include "tests/CL/CLAccessor.h" -#include "tests/benchmark/fixtures/GEMMFixture.h" -#include "tests/datasets/AlexNetGEMMDataset.h" -#include "tests/datasets/GoogleNetGEMMDataset.h" -#include "tests/datasets/MatrixMultiplyGEMMDataset.h" -#include "tests/datasets/system_tests/googlenet/inceptionv1/GoogLeNetInceptionV1GEMMDataset.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_types = framework::dataset::make("DataType", { DataType::F16, DataType::F32 }); -const auto reshape_b_only_once = framework::dataset::make("ReshapeBOnlyOnce", { false, true }); -} // namespace - -using CLGEMMFixture = GEMMFixture; - -TEST_SUITE(CL) - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV1GEMM, CLGEMMFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV1GEMMDataset(), - data_types), - reshape_b_only_once)); -REGISTER_FIXTURE_DATA_TEST_CASE(MatrixMultiplyGEMM, CLGEMMFixture, framework::DatasetMode::ALL, framework::dataset::combine(framework::dataset::combine(datasets::MatrixMultiplyGEMMDataset(), - data_types), - reshape_b_only_once)); -REGISTER_FIXTURE_DATA_TEST_CASE(GoogleNetGEMM, CLGEMMFixture, framework::DatasetMode::NIGHTLY, framework::dataset::combine(framework::dataset::combine(datasets::GoogleNetGEMMDataset(), data_types), - reshape_b_only_once)); -REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetGEMM, CLGEMMFixture, framework::DatasetMode::NIGHTLY, framework::dataset::combine(framework::dataset::combine(datasets::AlexNetGEMMDataset(), - data_types), - reshape_b_only_once)); - -TEST_SUITE_END() -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/CL/GEMMLowp.cpp b/tests/benchmark/CL/GEMMLowp.cpp deleted file mode 100644 index f5ec043616..0000000000 --- a/tests/benchmark/CL/GEMMLowp.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2017-2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/CLTensorAllocator.h" -#include "arm_compute/runtime/CL/functions/CLGEMMLowpMatrixMultiplyCore.h" -#include "tests/CL/CLAccessor.h" -#include "tests/benchmark/fixtures/GEMMLowpFixture.h" -#include "tests/datasets/AlexNetGEMMDataset.h" -#include "tests/datasets/GoogleNetGEMMDataset.h" -#include "tests/datasets/MatrixMultiplyGEMMDataset.h" -#include "tests/datasets/system_tests/googlenet/inceptionv1/GoogLeNetInceptionV1GEMMDataset.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -using CLGEMMLowpFixture = GEMMLowpMatrixMultiplyCoreFixture; - -TEST_SUITE(CL) - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV1GEMMLowp, CLGEMMLowpFixture, framework::DatasetMode::ALL, datasets::GoogLeNetInceptionV1GEMMDataset()); -REGISTER_FIXTURE_DATA_TEST_CASE(MatrixMultiplyGEMMLowp, CLGEMMLowpFixture, framework::DatasetMode::ALL, datasets::MatrixMultiplyGEMMDataset()); -REGISTER_FIXTURE_DATA_TEST_CASE(GoogleNetGEMMLowp, CLGEMMLowpFixture, framework::DatasetMode::NIGHTLY, datasets::GoogleNetGEMMDataset()); -REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetGEMMLowp, CLGEMMLowpFixture, framework::DatasetMode::NIGHTLY, datasets::AlexNetGEMMDataset()); - -TEST_SUITE_END() -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/CL/GaussianPyramid.cpp b/tests/benchmark/CL/GaussianPyramid.cpp deleted file mode 100644 index 2689847767..0000000000 --- a/tests/benchmark/CL/GaussianPyramid.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/functions/CLGaussianPyramid.h" -#include "tests/CL/CLAccessor.h" -#include "tests/benchmark/fixtures/GaussianPyramidFixture.h" -#include "tests/datasets/BorderModeDataset.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -TEST_SUITE(CL) -TEST_SUITE(GaussianPyramid) -TEST_SUITE(Half) - -using CLGaussianPyramidFixture = GaussianPyramidHalfFixture; - -// *INDENT-OFF* -// clang-format off -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, CLGaussianPyramidFixture, framework::DatasetMode::PRECOMMIT, - combine( - datasets::Medium2DShapes(), - datasets::BorderModes()) * framework::dataset::make("numlevels", 2, 4)); - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, CLGaussianPyramidFixture, framework::DatasetMode::NIGHTLY, - combine( - datasets::Large2DShapes(), - datasets::BorderModes()) * framework::dataset::make("numlevels", 2, 5)); -// clang-format on -// *INDENT-ON* - -TEST_SUITE_END() // Half -TEST_SUITE_END() // GaussianPyramid -TEST_SUITE_END() // CL -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/CL/HOGDescriptor.cpp b/tests/benchmark/CL/HOGDescriptor.cpp deleted file mode 100644 index f78027eb62..0000000000 --- a/tests/benchmark/CL/HOGDescriptor.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLHOG.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/functions/CLHOGDescriptor.h" -#include "tests/CL/CLAccessor.h" -#include "tests/benchmark/fixtures/HOGDescriptorFixture.h" -#include "tests/datasets/HOGDescriptorDataset.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -using CLHOGDescriptorFixture = HOGDescriptorFixture; - -TEST_SUITE(CL) -TEST_SUITE(HOGDescriptor) - -// *INDENT-OFF* -// clang-format off -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, CLHOGDescriptorFixture, framework::DatasetMode::PRECOMMIT, - combine(combine( - datasets::SmallHOGDescriptorDataset(), - framework::dataset::make("Format", { Format::U8 })), - framework::dataset::make("BorderMode", {BorderMode::CONSTANT, BorderMode::REPLICATE}))); - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, CLHOGDescriptorFixture, framework::DatasetMode::NIGHTLY, - combine(combine( - datasets::LargeHOGDescriptorDataset(), - framework::dataset::make("Format", { Format::U8 })), - framework::dataset::make("BorderMode", {BorderMode::CONSTANT, BorderMode::REPLICATE}))); -// clang-format on -// *INDENT-ON* - -TEST_SUITE_END() // HOGDescriptor -TEST_SUITE_END() // CL -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/CL/HOGDetector.cpp b/tests/benchmark/CL/HOGDetector.cpp deleted file mode 100644 index aeed4d22bb..0000000000 --- a/tests/benchmark/CL/HOGDetector.cpp +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLArray.h" -#include "arm_compute/runtime/CL/CLHOG.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/functions/CLHOGDescriptor.h" -#include "arm_compute/runtime/CL/functions/CLHOGDetector.h" -#include "tests/CL/CLAccessor.h" -#include "tests/CL/CLHOGAccessor.h" -#include "tests/benchmark/fixtures/HOGDetectorFixture.h" -#include "tests/datasets/HOGDescriptorDataset.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -/* Input dataset (values must be a multiple of the HOGInfo block_size) */ -const auto DetectionWindowStrideDataset = framework::dataset::make("DetectionWindowStride", { Size2D(8, 8), Size2D(16, 16) }); -} // namespace - -TEST_SUITE(CL) -TEST_SUITE(HOGDetector) - -using CLHOGDetectorFixture = HOGDetectorFixture; - -// *INDENT-OFF* -// clang-format off -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, CLHOGDetectorFixture, framework::DatasetMode::PRECOMMIT, - combine(combine(combine( - DetectionWindowStrideDataset, - datasets::SmallHOGDescriptorDataset()), - framework::dataset::make("Format", Format::U8)), - framework::dataset::make("BorderMode", {BorderMode::CONSTANT, BorderMode::REPLICATE}))); - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, CLHOGDetectorFixture, framework::DatasetMode::NIGHTLY, - combine(combine(combine( - DetectionWindowStrideDataset, - datasets::LargeHOGDescriptorDataset()), - framework::dataset::make("Format", Format::U8)), - framework::dataset::make("BorderMode", {BorderMode::CONSTANT, BorderMode::REPLICATE}))); -// clang-format on -// *INDENT-ON* - -TEST_SUITE_END() // HOGDetector -TEST_SUITE_END() // CL -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/CL/HOGMultiDetection.cpp b/tests/benchmark/CL/HOGMultiDetection.cpp deleted file mode 100644 index c2fbfec430..0000000000 --- a/tests/benchmark/CL/HOGMultiDetection.cpp +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLMultiHOG.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/functions/CLHOGMultiDetection.h" -#include "tests/CL/CLAccessor.h" -#include "tests/CL/CLArrayAccessor.h" -#include "tests/CL/CLHOGAccessor.h" -#include "tests/benchmark/fixtures/HOGMultiDetectionFixture.h" -#include "tests/datasets/HOGMultiDetectionDataset.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -// *INDENT-OFF* -// clang-format off -using CLHOGMultiDetectionFixture = HOGMultiDetectionFixture>; -TEST_SUITE(CL) -TEST_SUITE(HOGMultiDetection) - -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, CLHOGMultiDetectionFixture, framework::DatasetMode::PRECOMMIT, - combine(combine(combine( - datasets::SmallHOGMultiDetectionDataset(), - framework::dataset::make("Format", Format::U8)), - framework::dataset::make("BorderMode", {BorderMode::CONSTANT, BorderMode::REPLICATE})), - framework::dataset::make("NonMaximaSuppression", {false, true}))); - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, CLHOGMultiDetectionFixture, framework::DatasetMode::NIGHTLY, - combine(combine(combine( - datasets::LargeHOGMultiDetectionDataset(), - framework::dataset::make("Format", Format::U8)), - framework::dataset::make("BorderMode", {BorderMode::CONSTANT, BorderMode::REPLICATE})), - framework::dataset::make("NonMaximaSuppression", {false, true}))); -// clang-format on -// *INDENT-ON* - -TEST_SUITE_END() // HOGMultiDetection -TEST_SUITE_END() // CL -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/CL/HarrisCorners.cpp b/tests/benchmark/CL/HarrisCorners.cpp deleted file mode 100644 index dbaf95c98d..0000000000 --- a/tests/benchmark/CL/HarrisCorners.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLArray.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/CLTensorAllocator.h" -#include "arm_compute/runtime/CL/functions/CLHarrisCorners.h" -#include "tests/CL/CLAccessor.h" -#include "tests/benchmark/fixtures/HarrisCornersFixture.h" -#include "tests/datasets/ImageFileDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto threshold = framework::dataset::make("Threshold", { 0.00115f }); -const auto min_dist = framework::dataset::make("MinDist", { 2.f }); -const auto sensitivity = framework::dataset::make("Sensitivity", { 0.04f }); -const auto gradient_size = framework::dataset::make("GradientSize", { 3, 5, 7 }); -const auto block_size = framework::dataset::make("BlockSize", { 3, 5, 7 }); -const auto border_mode = framework::dataset::make("BorderMode", { BorderMode::UNDEFINED, BorderMode::CONSTANT, BorderMode::REPLICATE }); -} // namespace - -using CLHarrisCornersFixture = HarrisCornersFixture; - -TEST_SUITE(CL) -TEST_SUITE(HarrisCorners) - -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, CLHarrisCornersFixture, framework::DatasetMode::PRECOMMIT, combine(combine(combine(combine(combine(combine(combine(datasets::SmallImageFiles(), - framework::dataset::make("Format", { Format::U8 })), - threshold), - min_dist), - sensitivity), - gradient_size), - block_size), - border_mode)); - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, CLHarrisCornersFixture, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(combine(combine(combine(datasets::LargeImageFiles(), - framework::dataset::make("Format", { Format::U8 })), - threshold), - min_dist), - sensitivity), - gradient_size), - block_size), - border_mode)); - -TEST_SUITE_END() // HarrisCorners -TEST_SUITE_END() // CL -} // namespace benchmark -} // namespace test -} // namespace arm_compute \ No newline at end of file diff --git a/tests/benchmark/CL/Histogram.cpp b/tests/benchmark/CL/Histogram.cpp deleted file mode 100644 index 657a5c7921..0000000000 --- a/tests/benchmark/CL/Histogram.cpp +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLDistribution1D.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/CLTensorAllocator.h" -#include "arm_compute/runtime/CL/functions/CLHistogram.h" -#include "tests/CL/CLAccessor.h" -#include "tests/benchmark/fixtures/HistogramFixture.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -using CLHistogramFixture = HistogramFixture; - -// *INDENT-OFF* -// clang-format off -TEST_SUITE(CL) -TEST_SUITE(Histogram) -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, CLHistogramFixture, framework::DatasetMode::PRECOMMIT, - combine( - datasets::Small2DShapes(), - framework::dataset::make("Format", Format::U8))); - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, CLHistogramFixture, framework::DatasetMode::PRECOMMIT, - combine( - datasets::Large2DShapes(), - framework::dataset::make("Format", Format::U8))); -// clang-format on -// *INDENT-ON* - -TEST_SUITE_END() // Histogram -TEST_SUITE_END() // CL -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/CL/IntegralImage.cpp b/tests/benchmark/CL/IntegralImage.cpp deleted file mode 100644 index ca1429472f..0000000000 --- a/tests/benchmark/CL/IntegralImage.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/functions/CLIntegralImage.h" -#include "tests/CL/CLAccessor.h" -#include "tests/benchmark/fixtures/IntegralImageFixture.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -using CLIntegralImageFixture = IntegralImageFixture; - -TEST_SUITE(CL) -TEST_SUITE(IntegralImage) - -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, CLIntegralImageFixture, framework::DatasetMode::PRECOMMIT, datasets::SmallImageShapes()); -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, CLIntegralImageFixture, framework::DatasetMode::NIGHTLY, datasets::LargeImageShapes()); - -TEST_SUITE_END() // IntegralImage -TEST_SUITE_END() // CL -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/CL/L2NormalizeLayer.cpp b/tests/benchmark/CL/L2NormalizeLayer.cpp deleted file mode 100644 index 23bf612069..0000000000 --- a/tests/benchmark/CL/L2NormalizeLayer.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2017-2019 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/CLTensorAllocator.h" -#include "arm_compute/runtime/CL/functions/CLL2NormalizeLayer.h" -#include "tests/CL/CLAccessor.h" -#include "tests/benchmark/fixtures/L2NormalizeLayerFixture.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_types = framework::dataset::make("DataType", { DataType::F32 }); -} // namespace - -using CLL2NormalizeLayerFixture = L2NormalizeLayerFixture; - -TEST_SUITE(CL) - -REGISTER_FIXTURE_DATA_TEST_CASE(L2NormalizeLayer, CLL2NormalizeLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::SmallShapes(), data_types), framework::dataset::make("Axis", { 0, 1, 2 }))); -TEST_SUITE(NIGHTLY) -REGISTER_FIXTURE_DATA_TEST_CASE(L2NormalizeLayer, CLL2NormalizeLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(datasets::LargeShapes(), data_types), framework::dataset::make("Axis", { 0, 1, 2 }))); -TEST_SUITE_END() -TEST_SUITE_END() -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/CL/LaplacianPyramid.cpp b/tests/benchmark/CL/LaplacianPyramid.cpp deleted file mode 100644 index 535510248d..0000000000 --- a/tests/benchmark/CL/LaplacianPyramid.cpp +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/functions/CLLaplacianPyramid.h" -#include "tests/CL/CLAccessor.h" -#include "tests/benchmark/fixtures/LaplacianPyramidFixture.h" -#include "tests/datasets/BorderModeDataset.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto small_laplacian_pyramid_levels = framework::dataset::make("NumLevels", 2, 3); -const auto large_laplacian_pyramid_levels = framework::dataset::make("NumLevels", 2, 5); - -const auto formats = combine(framework::dataset::make("FormatIn", Format::U8), framework::dataset::make("FormatOut", Format::S16)); -} // namespace - -using CLLaplacianPyramidFixture = LaplacianPyramidFixture; - -TEST_SUITE(CL) -TEST_SUITE(LaplacianPyramid) - -// *INDENT-OFF* -// clang-format off -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, CLLaplacianPyramidFixture, framework::DatasetMode::PRECOMMIT, - combine(combine(combine( - datasets::Medium2DShapes(), - datasets::BorderModes()), - small_laplacian_pyramid_levels), - formats)); - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, CLLaplacianPyramidFixture, framework::DatasetMode::NIGHTLY, - combine(combine(combine( - datasets::Large2DShapes(), - datasets::BorderModes()), - large_laplacian_pyramid_levels), - formats)); -// clang-format on -// *INDENT-ON* - -TEST_SUITE_END() // LaplacianPyramid -TEST_SUITE_END() // CL -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/CL/LaplacianReconstruct.cpp b/tests/benchmark/CL/LaplacianReconstruct.cpp deleted file mode 100644 index a25ea595da..0000000000 --- a/tests/benchmark/CL/LaplacianReconstruct.cpp +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/functions/CLLaplacianPyramid.h" -#include "arm_compute/runtime/CL/functions/CLLaplacianReconstruct.h" -#include "tests/CL/CLAccessor.h" -#include "tests/benchmark/fixtures/LaplacianReconstructFixture.h" -#include "tests/datasets/BorderModeDataset.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto small_laplacian_reconstruct_levels = framework::dataset::make("NumLevels", 2, 3); -const auto large_laplacian_reconstruct_levels = framework::dataset::make("NumLevels", 2, 5); - -const auto formats = combine(framework::dataset::make("FormatIn", Format::S16), framework::dataset::make("FormatOut", Format::U8)); -} // namespace - -// *INDENT-OFF* -// clang-format off -using CLLaplacianReconstructFixture = LaplacianReconstructFixture; - -TEST_SUITE(CL) -TEST_SUITE(LaplacianReconstruct) - -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, CLLaplacianReconstructFixture, framework::DatasetMode::PRECOMMIT, - combine(combine(combine( - datasets::Medium2DShapes(), - datasets::BorderModes()), - small_laplacian_reconstruct_levels), - formats)); - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, CLLaplacianReconstructFixture, framework::DatasetMode::PRECOMMIT, - combine(combine(combine( - datasets::Large2DShapes(), - datasets::BorderModes()), - large_laplacian_reconstruct_levels), - formats)); - -// clang-format on -// *INDENT-ON* - -TEST_SUITE_END() // LaplacianReconstruct -TEST_SUITE_END() // CL -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/CL/LocallyConnectedLayer.cpp b/tests/benchmark/CL/LocallyConnectedLayer.cpp deleted file mode 100644 index 91e2bd3524..0000000000 --- a/tests/benchmark/CL/LocallyConnectedLayer.cpp +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/functions/CLLocallyConnectedLayer.h" -#include "arm_compute/runtime/Tensor.h" -#include "arm_compute/runtime/TensorAllocator.h" -#include "tests/CL/CLAccessor.h" -#include "tests/benchmark/fixtures/LocallyConnectedLayerFixture.h" -#include "tests/datasets/LocallyConnectedDataset.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_types = framework::dataset::make("DataType", { DataType::F32 }); -} // namespace - -using CLLocallyConnectedLayerFixture = LocallyConnectedLayerFixture; - -TEST_SUITE(CL) -TEST_SUITE(LocallyConnectedLayer) - -// *INDENT-OFF* -// clang-format off -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, CLLocallyConnectedLayerFixture, framework::DatasetMode::PRECOMMIT, - combine(combine( - datasets::SmallLocallyConnectedDataset(), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, CLLocallyConnectedLayerFixture, framework::DatasetMode::NIGHTLY, - combine(combine( - datasets::SmallLocallyConnectedDataset(), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); -// clang-format on -// *INDENT-ON* - -TEST_SUITE_END() // LocallyConnectedLayer -TEST_SUITE_END() // CL -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/CL/Magnitude.cpp b/tests/benchmark/CL/Magnitude.cpp deleted file mode 100644 index c2bb590476..0000000000 --- a/tests/benchmark/CL/Magnitude.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2017-2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/CLTensorAllocator.h" -#include "arm_compute/runtime/CL/functions/CLMagnitude.h" -#include "tests/CL/CLAccessor.h" -#include "tests/benchmark/fixtures/MagnitudeFixture.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto magnitude_types = framework::dataset::make("MagnitudeType", { MagnitudeType::L1NORM, MagnitudeType::L2NORM }); -} // namespace - -using CLMagnitudeFixture = MagnitudeFixture; - -TEST_SUITE(CL) -TEST_SUITE(Magnitude) -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, CLMagnitudeFixture, framework::DatasetMode::PRECOMMIT, combine(combine(datasets::SmallImageShapes(), framework::dataset::make("Format", { Format::S16, Format::S32 })), - magnitude_types)); -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, CLMagnitudeFixture, framework::DatasetMode::NIGHTLY, combine(combine(datasets::LargeImageShapes(), framework::dataset::make("Format", { Format::S16, Format::S32 })), - magnitude_types)); -TEST_SUITE_END() // Magnitude -TEST_SUITE_END() // CL -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/CL/MeanStdDev.cpp b/tests/benchmark/CL/MeanStdDev.cpp deleted file mode 100644 index c37c4eb5a4..0000000000 --- a/tests/benchmark/CL/MeanStdDev.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/functions/CLMeanStdDev.h" -#include "tests/CL/CLAccessor.h" -#include "tests/benchmark/fixtures/MeanStdDevFixture.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -using CLMeanStdDevFixture = MeanStdDevFixture; - -TEST_SUITE(CL) -TEST_SUITE(MeanStdDev) - -// *INDENT-OFF* -// clang-format off -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, CLMeanStdDevFixture, framework::DatasetMode::PRECOMMIT, - combine( - datasets::Small2DShapes(), - framework::dataset::make("Format", Format::U8))); - - - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, CLMeanStdDevFixture, framework::DatasetMode::NIGHTLY, - combine( - datasets::Large2DShapes(), - framework::dataset::make("Format", Format::U8))); -// clang-format on -// *INDENT-ON* - -TEST_SUITE_END() // MeanStdDev -TEST_SUITE_END() // CL -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/CL/Median3x3.cpp b/tests/benchmark/CL/Median3x3.cpp deleted file mode 100644 index 41753ac8a5..0000000000 --- a/tests/benchmark/CL/Median3x3.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/functions/CLMedian3x3.h" -#include "tests/CL/CLAccessor.h" -#include "tests/benchmark/fixtures/Median3x3Fixture.h" -#include "tests/datasets/BorderModeDataset.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -using CLMedian3x3Fixture = Median3x3Fixture; - -TEST_SUITE(CL) -TEST_SUITE(Median3x3) - -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, CLMedian3x3Fixture, framework::DatasetMode::PRECOMMIT, - combine(datasets::SmallShapes(), datasets::BorderModes())); - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, CLMedian3x3Fixture, framework::DatasetMode::NIGHTLY, - combine(datasets::LargeShapes(), datasets::BorderModes())); - -TEST_SUITE_END() // Median3x3 -TEST_SUITE_END() // CL -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/CL/MinMaxLocation.cpp b/tests/benchmark/CL/MinMaxLocation.cpp deleted file mode 100644 index 779348d3dc..0000000000 --- a/tests/benchmark/CL/MinMaxLocation.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/functions/CLMinMaxLocation.h" -#include "tests/CL/CLAccessor.h" -#include "tests/benchmark/fixtures/MinMaxLocationFixture.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_types = framework::dataset::make("DataType", { DataType::U8, DataType::S16, DataType::F32 }); -} // namespace - -using CLMinMaxLocationFixture = MinMaxLocationFixture; - -TEST_SUITE(CL) -TEST_SUITE(MinMaxLocation) - -// *INDENT-OFF* -// clang-format off -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, CLMinMaxLocationFixture, framework::DatasetMode::PRECOMMIT, - combine( datasets::Small2DShapes(), data_types)); - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, CLMinMaxLocationFixture, framework::DatasetMode::NIGHTLY, - combine( datasets::Large2DShapes(), data_types)); -// clang-format on -// *INDENT-ON* -TEST_SUITE_END() // MinMaxLocation -TEST_SUITE_END() // CL -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/CL/NormalizationLayer.cpp b/tests/benchmark/CL/NormalizationLayer.cpp deleted file mode 100644 index 9ee5041121..0000000000 --- a/tests/benchmark/CL/NormalizationLayer.cpp +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) 2017-2018 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, - * FITCLSS 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 CONCLCTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/CLTensorAllocator.h" -#include "arm_compute/runtime/CL/functions/CLNormalizationLayer.h" -#include "tests/CL/CLAccessor.h" -#include "tests/benchmark/fixtures/NormalizationLayerFixture.h" -#include "tests/datasets/system_tests/alexnet/AlexNetNormalizationLayerDataset.h" -#include "tests/datasets/system_tests/googlenet/inceptionv1/GoogLeNetInceptionV1NormalizationLayerDataset.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_types = framework::dataset::make("DataType", { DataType::F16, DataType::F32 }); -} // namespace - -using CLNormalizationLayerFixture = NormalizationLayerFixture; - -TEST_SUITE(CL) - -REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetNormalizationLayer, CLNormalizationLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::AlexNetNormalizationLayerDataset(), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV1NormalizationLayer, CLNormalizationLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV1NormalizationLayerDataset(), - data_types), - framework::dataset::make("Batches", 1))); - -TEST_SUITE(NIGHTLY) -REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetNormalizationLayer, CLNormalizationLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(datasets::AlexNetNormalizationLayerDataset(), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV1NormalizationLayer, CLNormalizationLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV1NormalizationLayerDataset(), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); -TEST_SUITE_END() -TEST_SUITE_END() -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/CL/OpticalFlow.cpp b/tests/benchmark/CL/OpticalFlow.cpp deleted file mode 100644 index 4794d8a37a..0000000000 --- a/tests/benchmark/CL/OpticalFlow.cpp +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLArray.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/functions/CLGaussianPyramid.h" -#include "arm_compute/runtime/CL/functions/CLOpticalFlow.h" -#include "tests/CL/CLAccessor.h" -#include "tests/CL/CLArrayAccessor.h" -#include "tests/benchmark/fixtures/OpticalFlowFixture.h" -#include "tests/datasets/BorderModeDataset.h" -#include "tests/datasets/ImageFileDatasets.h" -#include "tests/datasets/OpticalFlowDataset.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -using CLOpticalFlowFixture = OpticalFlowFixture, CLPyramid, CLGaussianPyramidHalf>; - -TEST_SUITE(CL) -TEST_SUITE(OpticalFlow) - -// *INDENT-OFF* -// clang-format off -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, CLOpticalFlowFixture, framework::DatasetMode::PRECOMMIT, - combine(combine( - datasets::SmallOpticalFlowDataset(), - framework::dataset::make("Format", Format::U8)), - datasets::BorderModes())); - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, CLOpticalFlowFixture, framework::DatasetMode::NIGHTLY, - combine(combine( - datasets::LargeOpticalFlowDataset(), - framework::dataset::make("Format", Format::U8)), - datasets::BorderModes())); -// clang-format on -// *INDENT-ON* - -TEST_SUITE_END() // OpticalFlow -TEST_SUITE_END() // CL -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/CL/Phase.cpp b/tests/benchmark/CL/Phase.cpp deleted file mode 100644 index 2ffb9c08ba..0000000000 --- a/tests/benchmark/CL/Phase.cpp +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/functions/CLPhase.h" -#include "tests/CL/CLAccessor.h" -#include "tests/benchmark/fixtures/PhaseFixture.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto phase_types = framework::dataset::make("PhaseType", { PhaseType::SIGNED, PhaseType::UNSIGNED }); -} // namespace - -using CLPhaseFixture = PhaseFixture; - -TEST_SUITE(CL) -TEST_SUITE(Phase) - -// *INDENT-OFF* -// clang-format off -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, CLPhaseFixture, framework::DatasetMode::PRECOMMIT, - combine(combine( - datasets::SmallImageShapes(), - framework::dataset::make("Format", { Format::S16, Format::S32 })), - phase_types)); - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, CLPhaseFixture, framework::DatasetMode::NIGHTLY, - combine(combine( - datasets::LargeImageShapes(), - framework::dataset::make("Format", { Format::S16, Format::S32 })), - phase_types)); -// clang-format on -// *INDENT-ON* -TEST_SUITE_END() // Phase -TEST_SUITE_END() // CL -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/CL/PoolingLayer.cpp b/tests/benchmark/CL/PoolingLayer.cpp deleted file mode 100644 index f9fefaf141..0000000000 --- a/tests/benchmark/CL/PoolingLayer.cpp +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Copyright (c) 2017-2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/CLTensorAllocator.h" -#include "arm_compute/runtime/CL/functions/CLPoolingLayer.h" -#include "tests/CL/CLAccessor.h" -#include "tests/benchmark/fixtures/PoolingLayerFixture.h" -#include "tests/datasets/system_tests/alexnet/AlexNetPoolingLayerDataset.h" -#include "tests/datasets/system_tests/googlenet/inceptionv1/GoogLeNetInceptionV1PoolingLayerDataset.h" -#include "tests/datasets/system_tests/googlenet/inceptionv4/GoogLeNetInceptionV4PoolingLayerDataset.h" -#include "tests/datasets/system_tests/lenet5/LeNet5PoolingLayerDataset.h" -#include "tests/datasets/system_tests/squeezenet/SqueezeNetPoolingLayerDataset.h" -#include "tests/datasets/system_tests/vgg/vgg16/VGG16PoolingLayerDataset.h" -#include "tests/datasets/system_tests/yolo/v2/YOLOV2PoolingLayerDataset.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_types = framework::dataset::make("DataType", { DataType::F16, DataType::F32 }); -const auto data_layouts = framework::dataset::make("DataLayout", { DataLayout::NCHW }); -} // namespace - -using CLPoolingLayerFixture = PoolingLayerFixture; - -TEST_SUITE(CL) - -REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetPoolingLayer, CLPoolingLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::AlexNetPoolingLayerDataset(), - data_types), - data_layouts), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(LeNet5PoolingLayer, CLPoolingLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::LeNet5PoolingLayerDataset(), - data_types), - data_layouts), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV1PoolingLayer, CLPoolingLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV1PoolingLayerDataset(), - data_types), - data_layouts), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV4PoolingLayer, CLPoolingLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV4PoolingLayerDataset(), - data_types), - data_layouts), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(SqueezeNetPoolingLayer, CLPoolingLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::SqueezeNetPoolingLayerDataset(), - data_types), - data_layouts), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(VGG16PoolingLayer, CLPoolingLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::VGG16PoolingLayerDataset(), - data_types), - data_layouts), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(YOLOV2PoolingLayer, CLPoolingLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::YOLOV2PoolingLayerDataset(), - data_types), - data_layouts), - framework::dataset::make("Batches", 1))); - -TEST_SUITE(NIGHTLY) -REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetPoolingLayer, CLPoolingLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::AlexNetPoolingLayerDataset(), - data_types), - data_layouts), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(LeNet5PoolingLayer, CLPoolingLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::LeNet5PoolingLayerDataset(), - data_types), - data_layouts), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV1PoolingLayer, CLPoolingLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV1PoolingLayerDataset(), - data_types), - data_layouts), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV4PoolingLayer, CLPoolingLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV4PoolingLayerDataset(), - data_types), - data_layouts), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(SqueezeNetPoolingLayer, CLPoolingLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::SqueezeNetPoolingLayerDataset(), - data_types), - data_layouts), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(VGG16PoolingLayer, CLPoolingLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::VGG16PoolingLayerDataset(), - data_types), - data_layouts), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(YOLOV2PoolingLayer, CLPoolingLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::YOLOV2PoolingLayerDataset(), - data_types), - data_layouts), - framework::dataset::make("Batches", { 4, 8 }))); -TEST_SUITE_END() -TEST_SUITE_END() -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/CL/QuantizationLayer.cpp b/tests/benchmark/CL/QuantizationLayer.cpp deleted file mode 100644 index f52e6f078d..0000000000 --- a/tests/benchmark/CL/QuantizationLayer.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2017-2019 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/CLTensorAllocator.h" -#include "arm_compute/runtime/CL/functions/CLQuantizationLayer.h" -#include "tests/CL/CLAccessor.h" -#include "tests/benchmark/fixtures/QuantizationLayerFixture.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_types = framework::dataset::make("DataType", { DataType::F32, DataType::F16 }); -} // namespace - -using CLQuantizationLayerFixture = QuantizationLayerFixture; - -TEST_SUITE(CL) - -REGISTER_FIXTURE_DATA_TEST_CASE(QuantizationLayer, CLQuantizationLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(datasets::Small3DShapes(), data_types)); - -TEST_SUITE_END() -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/CL/ROIPoolingLayer.cpp b/tests/benchmark/CL/ROIPoolingLayer.cpp deleted file mode 100644 index eadb027b75..0000000000 --- a/tests/benchmark/CL/ROIPoolingLayer.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2017-2019 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLArray.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/CLTensorAllocator.h" -#include "arm_compute/runtime/CL/functions/CLROIPoolingLayer.h" -#include "tests/CL/CLAccessor.h" -#include "tests/CL/CLArrayAccessor.h" -#include "tests/benchmark/fixtures/ROIPoolingLayerFixture.h" -#include "tests/datasets/ROIDataset.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -template -using CLROIPoolingLayerFixture = ROIPoolingLayerFixture; - -TEST_SUITE(CL) -REGISTER_FIXTURE_DATA_TEST_CASE(SmallROIPoolingLayerHalf, CLROIPoolingLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::SmallROIDataset(), - framework::dataset::make("DataType", { DataType::F16 })), - framework::dataset::make("Batches", { 1, 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(SmallROIPoolingLayerFloat, CLROIPoolingLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::SmallROIDataset(), - framework::dataset::make("DataType", { DataType::F32 })), - framework::dataset::make("Batches", { 1, 4, 8 }))); -TEST_SUITE_END() // CL -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/CL/Remap.cpp b/tests/benchmark/CL/Remap.cpp deleted file mode 100644 index 9da1356eaa..0000000000 --- a/tests/benchmark/CL/Remap.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/functions/CLRemap.h" -#include "tests/CL/CLAccessor.h" -#include "tests/benchmark/fixtures/RemapFixture.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto interpolation_policies = framework::dataset::make("InterpolationPolicy", { InterpolationPolicy::NEAREST_NEIGHBOR, InterpolationPolicy::BILINEAR }); -const auto border_modes = framework::dataset::make("BorderModes", { BorderMode::UNDEFINED, BorderMode::CONSTANT }); -const auto remap_data = interpolation_policies * framework::dataset::make("DataType", DataType::U8) * border_modes; -} // namespace - -using CLRemapFixture = RemapFixture; - -TEST_SUITE(CL) -TEST_SUITE(Remap) - -// *INDENT-OFF* -// clang-format off -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, CLRemapFixture, framework::DatasetMode::PRECOMMIT, - combine( datasets::SmallShapes(), remap_data)); - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, CLRemapFixture, framework::DatasetMode::NIGHTLY, - combine( datasets::LargeShapes(), remap_data)); -// clang-format on -// *INDENT-ON* - -TEST_SUITE_END() // Remap -TEST_SUITE_END() // CL -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/CL/ReshapeLayer.cpp b/tests/benchmark/CL/ReshapeLayer.cpp deleted file mode 100644 index 550deed41a..0000000000 --- a/tests/benchmark/CL/ReshapeLayer.cpp +++ /dev/null @@ -1,57 +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. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/CLTensorAllocator.h" -#include "arm_compute/runtime/CL/functions/CLReshapeLayer.h" -#include "tests/CL/CLAccessor.h" -#include "tests/benchmark/fixtures/ReshapeLayerFixture.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_types = framework::dataset::make("DataType", { DataType::U8, DataType::U16, DataType::U32, DataType::F16, DataType::F32 }); -} // namespace - -using CLReshapeLayerFixture = ReshapeLayerFixture; - -TEST_SUITE(CL) - -REGISTER_FIXTURE_DATA_TEST_CASE(ReshapeLayer, CLReshapeLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(datasets::SmallShapes(), data_types)); - -TEST_SUITE_END() -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/CL/Scale.cpp b/tests/benchmark/CL/Scale.cpp index 98f64f164b..0b219b47ff 100644 --- a/tests/benchmark/CL/Scale.cpp +++ b/tests/benchmark/CL/Scale.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 ARM Limited. + * Copyright (c) 2017-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -55,11 +55,6 @@ REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, CLScaleFixture, framework::DatasetMode interpolation_types), datasets::BorderModes()), datasets::SamplingPolicies())); -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, CLScaleFixture, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(combine(datasets::LargeImageShapes(), framework::dataset::make("DataType", { DataType::F16, DataType::F32 })), - framework::dataset::make("DataLayout", { DataLayout::NCHW })), - interpolation_types), - datasets::BorderModes()), - datasets::SamplingPolicies())); TEST_SUITE_END() // Scale TEST_SUITE_END() // CL } // namespace benchmark diff --git a/tests/benchmark/CL/Sobel.cpp b/tests/benchmark/CL/Sobel.cpp deleted file mode 100644 index f0478b88e5..0000000000 --- a/tests/benchmark/CL/Sobel.cpp +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/functions/CLSobel3x3.h" -#include "arm_compute/runtime/CL/functions/CLSobel5x5.h" -#include "arm_compute/runtime/CL/functions/CLSobel7x7.h" -#include "tests/CL/CLAccessor.h" -#include "tests/benchmark/fixtures/SobelFixture.h" -#include "tests/datasets/BorderModeDataset.h" -#include "tests/datasets/GradientDimensionDataset.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -using CLSobel3x3Fixture = SobelFixture; - -TEST_SUITE(CL) -TEST_SUITE(Sobel) - -// *INDENT-OFF* -// clang-format off -TEST_SUITE(W3x3) -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, CLSobel3x3Fixture, framework::DatasetMode::PRECOMMIT, - combine(combine(combine( - datasets::Small2DShapes(), - datasets::BorderModes()), - datasets::GradientDimensions()), - framework::dataset::make("Format", Format::U8))); - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, CLSobel3x3Fixture, framework::DatasetMode::NIGHTLY, - combine(combine(combine( - datasets::Large2DShapes(), - datasets::BorderModes()), - datasets::GradientDimensions()), - framework::dataset::make("Format", Format::U8))); -TEST_SUITE_END() // W3x3 - -using CLSobel5x5Fixture = SobelFixture; - -TEST_SUITE(W5x5) -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, CLSobel5x5Fixture, framework::DatasetMode::PRECOMMIT, - combine(combine(combine( - datasets::Small2DShapes(), - datasets::BorderModes()), - datasets::GradientDimensions()), - framework::dataset::make("Format", Format::U8))); - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, CLSobel5x5Fixture, framework::DatasetMode::NIGHTLY, - combine(combine(combine( - datasets::Large2DShapes(), - datasets::BorderModes()), - datasets::GradientDimensions()), - framework::dataset::make("Format", Format::U8))); -TEST_SUITE_END() // W5x5 - -using CLSobel7x7Fixture = SobelFixture; - -TEST_SUITE(W7x7) -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, CLSobel7x7Fixture, framework::DatasetMode::PRECOMMIT, - combine(combine(combine( - datasets::Small2DShapes(), - datasets::BorderModes()), - datasets::GradientDimensions()), - framework::dataset::make("Format", Format::U8))); - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, CLSobel7x7Fixture, framework::DatasetMode::NIGHTLY, - combine(combine(combine( - datasets::Large2DShapes(), - datasets::BorderModes()), - datasets::GradientDimensions()), - framework::dataset::make("Format", Format::U8))); -TEST_SUITE_END() // W7x7 -// clang-format on -// *INDENT-ON* - -TEST_SUITE_END() // Sobel -TEST_SUITE_END() // CL -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/CL/SoftmaxLayer.cpp b/tests/benchmark/CL/SoftmaxLayer.cpp deleted file mode 100644 index f1bc888c8d..0000000000 --- a/tests/benchmark/CL/SoftmaxLayer.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2017-2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/CLTensorAllocator.h" -#include "arm_compute/runtime/CL/functions/CLSoftmaxLayer.h" -#include "tests/CL/CLAccessor.h" -#include "tests/benchmark/fixtures/SoftmaxLayerFixture.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_types = framework::dataset::make("DataType", { DataType::QASYMM8, DataType::F16, DataType::F32 }); -} // namespace - -using CLSoftmaxLayerFixture = SoftmaxLayerFixture; - -TEST_SUITE(CL) - -REGISTER_FIXTURE_DATA_TEST_CASE(SoftmaxLayerSmall, CLSoftmaxLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(datasets::SoftmaxLayerSmallShapes(), data_types)); - -REGISTER_FIXTURE_DATA_TEST_CASE(SoftmaxLayerLarge, CLSoftmaxLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(datasets::SoftmaxLayerLargeShapes(), data_types)); - -TEST_SUITE_END() -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/CL/Transpose.cpp b/tests/benchmark/CL/Transpose.cpp deleted file mode 100644 index 33ca40624e..0000000000 --- a/tests/benchmark/CL/Transpose.cpp +++ /dev/null @@ -1,62 +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. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/CLTensorAllocator.h" -#include "arm_compute/runtime/CL/functions/CLTranspose.h" -#include "tests/CL/CLAccessor.h" -#include "tests/benchmark/fixtures/TransposeFixture.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_types = framework::dataset::make("DataType", { DataType::U8, DataType::U16, DataType::U32 }); -} // namespace - -using CLTransposeFixture = TransposeFixture; - -TEST_SUITE(CL) -TEST_SUITE(Transpose) - -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, CLTransposeFixture, framework::DatasetMode::PRECOMMIT, - framework::dataset::combine(framework::dataset::concat(datasets::Small1DShapes(), datasets::Small2DShapes()), data_types)); - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, CLTransposeFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::concat(datasets::Large1DShapes(), datasets::Large2DShapes()), data_types)); - -TEST_SUITE_END() -TEST_SUITE_END() -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/CL/WarpAffine.cpp b/tests/benchmark/CL/WarpAffine.cpp deleted file mode 100644 index 48a182562a..0000000000 --- a/tests/benchmark/CL/WarpAffine.cpp +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/CL/CLTensor.h" -#include "arm_compute/runtime/CL/functions/CLWarpAffine.h" -#include "tests/CL/CLAccessor.h" -#include "tests/benchmark/fixtures/WarpAffineFixture.h" -#include "tests/datasets/BorderModeDataset.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_type = framework::dataset::make("DataType", DataType::U8); -const auto interpolation_types = framework::dataset::make("InterpolationPolicy", { InterpolationPolicy::NEAREST_NEIGHBOR, InterpolationPolicy::BILINEAR }); -} // namespace - -using CLWarpAffineFixture = WarpAffineFixture; - -TEST_SUITE(CL) -TEST_SUITE(WarpAffine) - -// *INDENT-OFF* -// clang-format off -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, CLWarpAffineFixture, framework::DatasetMode::PRECOMMIT, - combine(combine(combine( - datasets::SmallShapes(), - data_type), - interpolation_types), - datasets::BorderModes())); - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, CLWarpAffineFixture, framework::DatasetMode::NIGHTLY, - combine(combine(combine( - datasets::LargeShapes(), - data_type), - interpolation_types), - datasets::BorderModes())); -// clang-format on -// *INDENT-ON* - -TEST_SUITE_END() // WarpAffine -TEST_SUITE_END() // CL -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/GLES_COMPUTE/ActivationLayer.cpp b/tests/benchmark/GLES_COMPUTE/ActivationLayer.cpp deleted file mode 100644 index feb401eff2..0000000000 --- a/tests/benchmark/GLES_COMPUTE/ActivationLayer.cpp +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h" -#include "arm_compute/runtime/GLES_COMPUTE/functions/GCActivationLayer.h" -#include "tests/GLES_COMPUTE/GCAccessor.h" -#include "tests/benchmark/fixtures/ActivationLayerFixture.h" -#include "tests/datasets/system_tests/alexnet/AlexNetActivationLayerDataset.h" -#include "tests/datasets/system_tests/googlenet/inceptionv1/GoogLeNetInceptionV1ActivationLayerDataset.h" -#include "tests/datasets/system_tests/googlenet/inceptionv4/GoogLeNetInceptionV4ActivationLayerDataset.h" -#include "tests/datasets/system_tests/lenet5/LeNet5ActivationLayerDataset.h" -#include "tests/datasets/system_tests/mobilenet/MobileNetActivationLayerDataset.h" -#include "tests/datasets/system_tests/squeezenet/SqueezeNetActivationLayerDataset.h" -#include "tests/datasets/system_tests/vgg/vgg16/VGG16ActivationLayerDataset.h" -#include "tests/datasets/system_tests/yolo/v2/YOLOV2ActivationLayerDataset.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_types = framework::dataset::make("DataType", { DataType::F16, DataType::F32 }); -const auto data_types_mobilenet = framework::dataset::make("DataType", { DataType::F16, DataType::F32 }); -} // namespace - -using GCActivationLayerFixture = ActivationLayerFixture; - -TEST_SUITE(GC) - -REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetActivationLayer, GCActivationLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::AlexNetActivationLayerDataset(), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(LeNet5ActivationLayer, GCActivationLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::LeNet5ActivationLayerDataset(), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(MobileNetActivationLayer, GCActivationLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::MobileNetActivationLayerDataset(), - data_types_mobilenet), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV1ActivationLayer, GCActivationLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV1ActivationLayerDataset(), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV4ActivationLayer, GCActivationLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV4ActivationLayerDataset(), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(SqueezeNetActivationLayer, GCActivationLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::SqueezeNetActivationLayerDataset(), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(VGG16ActivationLayer, GCActivationLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::VGG16ActivationLayerDataset(), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(YOLOV2ActivationLayer, GCActivationLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::YOLOV2ActivationLayerDataset(), - data_types), - framework::dataset::make("Batches", 1))); - -TEST_SUITE(NIGHTLY) -REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetActivationLayer, GCActivationLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(datasets::AlexNetActivationLayerDataset(), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(LeNet5ActivationLayer, GCActivationLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(datasets::LeNet5ActivationLayerDataset(), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(MobileNetActivationLayer, GCActivationLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(datasets::MobileNetActivationLayerDataset(), - data_types_mobilenet), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV1ActivationLayer, GCActivationLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV1ActivationLayerDataset(), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV4ActivationLayer, GCActivationLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV4ActivationLayerDataset(), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(SqueezeNetActivationLayer, GCActivationLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(datasets::SqueezeNetActivationLayerDataset(), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(VGG16ActivationLayer, GCActivationLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(datasets::VGG16ActivationLayerDataset(), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(YOLOV2ActivationLayer, GCActivationLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(datasets::YOLOV2ActivationLayerDataset(), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); -TEST_SUITE_END() -TEST_SUITE_END() -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/GLES_COMPUTE/BatchNormalizationLayer.cpp b/tests/benchmark/GLES_COMPUTE/BatchNormalizationLayer.cpp deleted file mode 100644 index 881a6ab4dc..0000000000 --- a/tests/benchmark/GLES_COMPUTE/BatchNormalizationLayer.cpp +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (c) 2017-2018 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, - * FITCLSS 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 CONCLCTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h" -#include "arm_compute/runtime/GLES_COMPUTE/functions/GCBatchNormalizationLayer.h" -#include "tests/GLES_COMPUTE/GCAccessor.h" -#include "tests/benchmark/fixtures/BatchNormalizationLayerFixture.h" -#include "tests/datasets/system_tests/googlenet/inceptionv4/GoogLeNetInceptionV4BatchNormalizationLayerDataset.h" -#include "tests/datasets/system_tests/mobilenet/MobileNetBatchNormalizationLayerDataset.h" -#include "tests/datasets/system_tests/yolo/v2/YOLOV2BatchNormalizationLayerDataset.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_types = framework::dataset::make("DataType", { DataType::F16, DataType::F32 }); -} // namespace - -using GCBatchNormalizationLayerFixture = BatchNormalizationLayerFixture; - -TEST_SUITE(GC) - -REGISTER_FIXTURE_DATA_TEST_CASE(MobileNetBatchNormalizationLayer, GCBatchNormalizationLayerFixture, framework::DatasetMode::ALL, - combine(combine(combine(combine(combine(datasets::MobileNetBatchNormalizationLayerDataset(), - combine(framework::dataset::make("UseGamma", { false, true }), - framework::dataset::make("UseBeta", { false, true }))), - framework::dataset::make("ActivationInfo", ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::BOUNDED_RELU, 6.f))), - data_types), - framework::dataset::make("DataLayout", { DataLayout::NCHW })), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(YOLOV2BatchNormalizationLayer, GCBatchNormalizationLayerFixture, framework::DatasetMode::ALL, - combine(combine(combine(combine(combine(datasets::YOLOV2BatchNormalizationLayerDataset(), - combine(framework::dataset::make("UseGamma", { false, true }), - framework::dataset::make("UseBeta", { false, true }))), - framework::dataset::make("ActivationInfo", ActivationLayerInfo())), - data_types), - framework::dataset::make("DataLayout", { DataLayout::NCHW })), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV4BatchNormalizationLayer, GCBatchNormalizationLayerFixture, framework::DatasetMode::ALL, - combine(combine(combine(combine(combine(datasets::GoogLeNetInceptionV4BatchNormalizationLayerDataset(), - combine(framework::dataset::make("UseGamma", { false, true }), - framework::dataset::make("UseBeta", { false, true }))), - framework::dataset::make("ActivationInfo", ActivationLayerInfo())), - data_types), - framework::dataset::make("DataLayout", { DataLayout::NCHW })), - framework::dataset::make("Batches", 1))); - -TEST_SUITE(NIGHTLY) - -REGISTER_FIXTURE_DATA_TEST_CASE(MobileNetBatchNormalizationLayer, GCBatchNormalizationLayerFixture, framework::DatasetMode::NIGHTLY, - combine(combine(combine(combine(combine(datasets::MobileNetBatchNormalizationLayerDataset(), - combine(framework::dataset::make("UseGamma", { false, true }), - framework::dataset::make("UseBeta", { false, true }))), - framework::dataset::make("ActivationInfo", ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::BOUNDED_RELU, 6.f))), - data_types), - framework::dataset::make("DataLayout", { DataLayout::NCHW })), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(YOLOV2BatchNormalizationLayer, GCBatchNormalizationLayerFixture, framework::DatasetMode::NIGHTLY, - combine(combine(combine(combine(combine(datasets::YOLOV2BatchNormalizationLayerDataset(), - combine(framework::dataset::make("UseGamma", { false, true }), - framework::dataset::make("UseBeta", { false, true }))), - framework::dataset::make("ActivationInfo", ActivationLayerInfo())), - data_types), - framework::dataset::make("DataLayout", { DataLayout::NCHW })), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV4BatchNormalizationLayer, GCBatchNormalizationLayerFixture, framework::DatasetMode::NIGHTLY, - combine(combine(combine(combine(combine(datasets::GoogLeNetInceptionV4BatchNormalizationLayerDataset(), - combine(framework::dataset::make("UseGamma", { false, true }), - framework::dataset::make("UseBeta", { false, true }))), - framework::dataset::make("ActivationInfo", ActivationLayerInfo())), - data_types), - framework::dataset::make("DataLayout", { DataLayout::NCHW })), - framework::dataset::make("Batches", { 4, 8 }))); -TEST_SUITE_END() -TEST_SUITE_END() -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/GLES_COMPUTE/ConvolutionLayer.cpp b/tests/benchmark/GLES_COMPUTE/ConvolutionLayer.cpp deleted file mode 100644 index c79e0156cf..0000000000 --- a/tests/benchmark/GLES_COMPUTE/ConvolutionLayer.cpp +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright (c) 2017-2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h" -#include "arm_compute/runtime/GLES_COMPUTE/functions/GCConvolutionLayer.h" -#include "tests/GLES_COMPUTE/GCAccessor.h" -#include "tests/benchmark/fixtures/ConvolutionLayerFixture.h" -#include "tests/datasets/system_tests/alexnet/AlexNetConvolutionLayerDataset.h" -#include "tests/datasets/system_tests/googlenet/inceptionv1/GoogLeNetInceptionV1ConvolutionLayerDataset.h" -#include "tests/datasets/system_tests/googlenet/inceptionv4/GoogLeNetInceptionV4ConvolutionLayerDataset.h" -#include "tests/datasets/system_tests/lenet5/LeNet5ConvolutionLayerDataset.h" -#include "tests/datasets/system_tests/squeezenet/SqueezeNetConvolutionLayerDataset.h" -#include "tests/datasets/system_tests/vgg/vgg16/VGG16ConvolutionLayerDataset.h" -#include "tests/datasets/system_tests/yolo/v2/YOLOV2ConvolutionLayerDataset.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_types = framework::dataset::make("DataType", { DataType::F16 }); -} // namespace - -using GCConvolutionLayerFixture = ConvolutionLayerFixture; - -TEST_SUITE(GC) - -REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetConvolutionLayer, GCConvolutionLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::AlexNetConvolutionLayerDataset(), framework::dataset::make("ActivationInfo", - ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(LeNet5ConvolutionLayer, GCConvolutionLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::LeNet5ConvolutionLayerDataset(), framework::dataset::make("ActivationInfo", ActivationLayerInfo())), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV1ConvolutionLayer, GCConvolutionLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV1ConvolutionLayerDataset(), framework::dataset::make("ActivationInfo", - ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV4ConvolutionLayer, GCConvolutionLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV4ConvolutionLayerDataset(), framework::dataset::make("ActivationInfo", - ActivationLayerInfo())), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(SqueezeNetConvolutionLayer, GCConvolutionLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::SqueezeNetConvolutionLayerDataset(), framework::dataset::make("ActivationInfo", - ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - data_types), - framework::dataset::make("Batches", 1))); - -TEST_SUITE(NIGHTLY) -REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetConvolutionLayer, GCConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::AlexNetConvolutionLayerDataset(), framework::dataset::make("ActivationInfo", - ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(LeNet5ConvolutionLayer, GCConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::LeNet5ConvolutionLayerDataset(), framework::dataset::make("ActivationInfo", ActivationLayerInfo())), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV1ConvolutionLayer, GCConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV1ConvolutionLayerDataset(), framework::dataset::make("ActivationInfo", - ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV4ConvolutionLayer, GCConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV4ConvolutionLayerDataset(), framework::dataset::make("ActivationInfo", - ActivationLayerInfo())), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(SqueezeNetConvolutionLayer, GCConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::SqueezeNetConvolutionLayerDataset(), framework::dataset::make("ActivationInfo", - ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -// 8 batches use about 1.8GB of memory which is too much for most devices! -REGISTER_FIXTURE_DATA_TEST_CASE(VGG16ConvolutionLayer, GCConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::VGG16ConvolutionLayerDataset(), framework::dataset::make("ActivationInfo", - ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - data_types), - framework::dataset::make("Batches", { 1, 4 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(YOLOV2ConvolutionLayer, GCConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::YOLOV2ConvolutionLayerDataset(), framework::dataset::make("ActivationInfo", ActivationLayerInfo())), - data_types), - framework::dataset::make("Batches", { 1, 4, 8 }))); -TEST_SUITE_END() -TEST_SUITE_END() -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/GLES_COMPUTE/DepthwiseConvolutionLayer.cpp b/tests/benchmark/GLES_COMPUTE/DepthwiseConvolutionLayer.cpp deleted file mode 100644 index 0633acb27a..0000000000 --- a/tests/benchmark/GLES_COMPUTE/DepthwiseConvolutionLayer.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2017-2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h" -#include "arm_compute/runtime/GLES_COMPUTE/functions/GCDepthwiseConvolutionLayer.h" -#include "tests/GLES_COMPUTE/GCAccessor.h" -#include "tests/benchmark/fixtures/DepthwiseConvolutionLayerFixture.h" -#include "tests/datasets/system_tests/mobilenet/MobileNetDepthwiseConvolutionLayerDataset.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -const auto data_types = framework::dataset::make("DataType", { DataType::F16 }); -using GCDepthwiseConvolutionLayerFixture = DepthwiseConvolutionLayerFixture; - -TEST_SUITE(GC) - -REGISTER_FIXTURE_DATA_TEST_CASE(MobileNetDepthwiseConvLayer, GCDepthwiseConvolutionLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::MobileNetDepthwiseConvolutionLayerDataset(), data_types), - framework::dataset::make("Batches", { 1 }))); - -TEST_SUITE_END() -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/GLES_COMPUTE/DirectConvolutionLayer.cpp b/tests/benchmark/GLES_COMPUTE/DirectConvolutionLayer.cpp deleted file mode 100644 index 66fd8fc216..0000000000 --- a/tests/benchmark/GLES_COMPUTE/DirectConvolutionLayer.cpp +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (c) 2017-2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h" -#include "arm_compute/runtime/GLES_COMPUTE/functions/GCDirectConvolutionLayer.h" -#include "tests/GLES_COMPUTE/GCAccessor.h" -#include "tests/benchmark/fixtures/DirectConvolutionLayerFixture.h" -#include "tests/datasets/system_tests/alexnet/AlexNetConvolutionLayerDataset.h" -#include "tests/datasets/system_tests/googlenet/inceptionv1/GoogLeNetInceptionV1ConvolutionLayerDataset.h" -#include "tests/datasets/system_tests/googlenet/inceptionv4/GoogLeNetInceptionV4ConvolutionLayerDataset.h" -#include "tests/datasets/system_tests/squeezenet/SqueezeNetConvolutionLayerDataset.h" -#include "tests/datasets/system_tests/vgg/vgg16/VGG16ConvolutionLayerDataset.h" -#include "tests/datasets/system_tests/yolo/v2/YOLOV2ConvolutionLayerDataset.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_types = framework::dataset::make("DataType", { DataType::F32, DataType::F16 }); -} // namespace - -using GCDirectConvolutionLayerFixture = DirectConvolutionLayerFixture; - -TEST_SUITE(GC) - -REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetDirectConvolutionLayer, GCDirectConvolutionLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::AlexNetDirectConvolutionLayerDataset(), framework::dataset::make("ActivationInfo", - ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV1DirectConvolutionLayer, GCDirectConvolutionLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV1DirectConvolutionLayerDataset(), framework::dataset::make("ActivationInfo", - ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV4DirectConvolutionLayer, GCDirectConvolutionLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV4DirectConvolutionLayerDataset(), framework::dataset::make("ActivationInfo", - ActivationLayerInfo())), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(SqueezeNetDirectConvolutionLayer, GCDirectConvolutionLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::SqueezeNetConvolutionLayerDataset(), framework::dataset::make("ActivationInfo", - ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - data_types), - framework::dataset::make("Batches", 1))); - -TEST_SUITE(NIGHTLY) -REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetDirectConvolutionLayer, GCDirectConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::AlexNetDirectConvolutionLayerDataset(), framework::dataset::make("ActivationInfo", - ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV1DirectConvolutionLayer, GCDirectConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV1DirectConvolutionLayerDataset(), framework::dataset::make("ActivationInfo", - ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV4DirectConvolutionLayer, GCDirectConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV4DirectConvolutionLayerDataset(), framework::dataset::make("ActivationInfo", - ActivationLayerInfo())), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(SqueezeNetDirectConvolutionLayer, GCDirectConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::SqueezeNetConvolutionLayerDataset(), framework::dataset::make("ActivationInfo", - ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(VGG16DirectConvolutionLayer, GCDirectConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::VGG16ConvolutionLayerDataset(), framework::dataset::make("ActivationInfo", - ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - data_types), - framework::dataset::make("Batches", { 1, 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(YOLOV2DirectConvolutionLayer, GCDirectConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::YOLOV2ConvolutionLayerDataset(), - framework::dataset::make("ActivationInfo", ActivationLayerInfo())), - data_types), - framework::dataset::make("Batches", { 1, 4, 8 }))); -TEST_SUITE_END() -TEST_SUITE_END() -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/GLES_COMPUTE/FullyConnectedLayer.cpp b/tests/benchmark/GLES_COMPUTE/FullyConnectedLayer.cpp deleted file mode 100644 index 8d2cc7236f..0000000000 --- a/tests/benchmark/GLES_COMPUTE/FullyConnectedLayer.cpp +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (c) 2017-2018 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, - * FITCLSS 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 CONCLCTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h" -#include "arm_compute/runtime/GLES_COMPUTE/functions/GCFullyConnectedLayer.h" -#include "tests/GLES_COMPUTE/GCAccessor.h" -#include "tests/benchmark/fixtures/FullyConnectedLayerFixture.h" -#include "tests/datasets/system_tests/alexnet/AlexNetFullyConnectedLayerDataset.h" -#include "tests/datasets/system_tests/googlenet/inceptionv1/GoogLeNetInceptionV1FullyConnectedLayerDataset.h" -#include "tests/datasets/system_tests/googlenet/inceptionv4/GoogLeNetInceptionV4FullyConnectedLayerDataset.h" -#include "tests/datasets/system_tests/lenet5/LeNet5FullyConnectedLayerDataset.h" -#include "tests/datasets/system_tests/vgg/vgg16/VGG16FullyConnectedLayerDataset.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_types = framework::dataset::make("DataType", { DataType::F32, DataType::F16 }); -} // namespace - -using GCFullyConnectedLayerFixture = FullyConnectedLayerFixture; - -TEST_SUITE(GC) - -REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetFullyConnectedLayer, GCFullyConnectedLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::AlexNetFullyConnectedLayerDataset(), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(LeNet5FullyConnectedLayer, GCFullyConnectedLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::LeNet5FullyConnectedLayerDataset(), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(VGG16FullyConnectedLayer, GCFullyConnectedLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::VGG16FullyConnectedLayerDataset(), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV1FullyConnectedLayer, GCFullyConnectedLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV1FullyConnectedLayerDataset(), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV4FullyConnectedLayer, GCFullyConnectedLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV4FullyConnectedLayerDataset(), - data_types), - framework::dataset::make("Batches", 1))); - -TEST_SUITE(NIGHTLY) -REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetFullyConnectedLayer, GCFullyConnectedLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(datasets::AlexNetFullyConnectedLayerDataset(), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(LeNet5FullyConnectedLayer, GCFullyConnectedLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(datasets::LeNet5FullyConnectedLayerDataset(), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(VGG16FullyConnectedLayer, GCFullyConnectedLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(datasets::VGG16FullyConnectedLayerDataset(), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV1FullyConnectedLayer, GCFullyConnectedLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV1FullyConnectedLayerDataset(), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV4FullyConnectedLayer, GCFullyConnectedLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV4FullyConnectedLayerDataset(), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); -TEST_SUITE_END() -TEST_SUITE_END() -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/GLES_COMPUTE/GEMM.cpp b/tests/benchmark/GLES_COMPUTE/GEMM.cpp deleted file mode 100644 index 3e561138ef..0000000000 --- a/tests/benchmark/GLES_COMPUTE/GEMM.cpp +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2017-2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h" -#include "arm_compute/runtime/GLES_COMPUTE/functions/GCGEMM.h" -#include "tests/GLES_COMPUTE/GCAccessor.h" -#include "tests/benchmark/fixtures/GEMMFixture.h" -#include "tests/datasets/GoogleNetGEMMDataset.h" -#include "tests/datasets/MatrixMultiplyGEMMDataset.h" -#include "tests/datasets/system_tests/googlenet/inceptionv1/GoogLeNetInceptionV1GEMMDataset.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_types = framework::dataset::make("DataType", { DataType::F32 }); -const auto reshape_b_only_once = framework::dataset::make("ReshapeBOnlyOnce", { false }); -} // namespace - -using GCGEMMFixture = GEMMFixture; - -TEST_SUITE(GC) - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV1GEMM, GCGEMMFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV1GEMMDataset(), - data_types), - reshape_b_only_once)); -REGISTER_FIXTURE_DATA_TEST_CASE(MatrixMultiplyGEMM, GCGEMMFixture, framework::DatasetMode::ALL, framework::dataset::combine(framework::dataset::combine(datasets::MatrixMultiplyGEMMDataset(), - data_types), - reshape_b_only_once)); -REGISTER_FIXTURE_DATA_TEST_CASE(GoogleNetGEMM, GCGEMMFixture, framework::DatasetMode::NIGHTLY, framework::dataset::combine(framework::dataset::combine(datasets::GoogleNetGEMMDataset(), - data_types), - reshape_b_only_once)); - -TEST_SUITE_END() -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/GLES_COMPUTE/NormalizePlanarYUVLayer.cpp b/tests/benchmark/GLES_COMPUTE/NormalizePlanarYUVLayer.cpp deleted file mode 100644 index 3ba65d427c..0000000000 --- a/tests/benchmark/GLES_COMPUTE/NormalizePlanarYUVLayer.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2017-2018 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, - * FITCLSS 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 CONCLCTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h" -#include "arm_compute/runtime/GLES_COMPUTE/functions/GCNormalizePlanarYUVLayer.h" -#include "tests/GLES_COMPUTE/GCAccessor.h" -#include "tests/benchmark/fixtures/NormalizePlanarYUVLayerFixture.h" -#include "tests/datasets/system_tests/googlenet/inceptionv4/GoogLeNetInceptionV4NormalizePlanarYUVLayerDataset.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_types = framework::dataset::make("DataType", { DataType::F16 }); -} // namespace - -using GCNormalizePlanarYUVLayerFixture = NormalizePlanarYUVLayerFixture; - -TEST_SUITE(GC) - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV4NormalizePlanarYUVLayer, GCNormalizePlanarYUVLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV4NormalizePlanarYUVLayerDataset(), - data_types), - framework::dataset::make("Batches", 1))); - -TEST_SUITE_END() -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/GLES_COMPUTE/PoolingLayer.cpp b/tests/benchmark/GLES_COMPUTE/PoolingLayer.cpp deleted file mode 100644 index 80a33875e1..0000000000 --- a/tests/benchmark/GLES_COMPUTE/PoolingLayer.cpp +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Copyright (c) 2017-2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h" -#include "arm_compute/runtime/GLES_COMPUTE/functions/GCPoolingLayer.h" -#include "tests/GLES_COMPUTE/GCAccessor.h" -#include "tests/benchmark/fixtures/PoolingLayerFixture.h" -#include "tests/datasets/system_tests/alexnet/AlexNetPoolingLayerDataset.h" -#include "tests/datasets/system_tests/googlenet/inceptionv1/GoogLeNetInceptionV1PoolingLayerDataset.h" -#include "tests/datasets/system_tests/googlenet/inceptionv4/GoogLeNetInceptionV4PoolingLayerDataset.h" -#include "tests/datasets/system_tests/lenet5/LeNet5PoolingLayerDataset.h" -#include "tests/datasets/system_tests/squeezenet/SqueezeNetPoolingLayerDataset.h" -#include "tests/datasets/system_tests/vgg/vgg16/VGG16PoolingLayerDataset.h" -#include "tests/datasets/system_tests/yolo/v2/YOLOV2PoolingLayerDataset.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_types = framework::dataset::make("DataType", { DataType::F32 }); -const auto data_layouts = framework::dataset::make("DataLayout", { DataLayout::NCHW }); -} // namespace - -using GCPoolingLayerFixture = PoolingLayerFixture; - -TEST_SUITE(GC) - -REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetPoolingLayer, GCPoolingLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::AlexNetPoolingLayerDataset(), - data_types), - data_layouts), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(LeNet5PoolingLayer, GCPoolingLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::LeNet5PoolingLayerDataset(), - data_types), - data_layouts), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV1PoolingLayer, GCPoolingLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV1PoolingLayerDataset(), - data_types), - data_layouts), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV4PoolingLayer, GCPoolingLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV4PoolingLayerDataset(), - data_types), - data_layouts), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(SqueezeNetPoolingLayer, GCPoolingLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::SqueezeNetPoolingLayerDataset(), - data_types), - data_layouts), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(VGG16PoolingLayer, GCPoolingLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::VGG16PoolingLayerDataset(), - data_types), - data_layouts), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(YOLOV2PoolingLayer, GCPoolingLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::YOLOV2PoolingLayerDataset(), - data_types), - data_layouts), - framework::dataset::make("Batches", 1))); - -TEST_SUITE(NIGHTLY) -REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetPoolingLayer, GCPoolingLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::AlexNetPoolingLayerDataset(), - data_types), - data_layouts), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(LeNet5PoolingLayer, GCPoolingLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::LeNet5PoolingLayerDataset(), - data_types), - data_layouts), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV1PoolingLayer, GCPoolingLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV1PoolingLayerDataset(), - data_types), - data_layouts), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV4PoolingLayer, GCPoolingLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV4PoolingLayerDataset(), - data_types), - data_layouts), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(SqueezeNetPoolingLayer, GCPoolingLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::SqueezeNetPoolingLayerDataset(), - data_types), - data_layouts), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(VGG16PoolingLayer, GCPoolingLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::VGG16PoolingLayerDataset(), - data_types), - data_layouts), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(YOLOV2PoolingLayer, GCPoolingLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::YOLOV2PoolingLayerDataset(), - data_types), - data_layouts), - framework::dataset::make("Batches", { 4, 8 }))); -TEST_SUITE_END() -TEST_SUITE_END() -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/GLES_COMPUTE/Scale.cpp b/tests/benchmark/GLES_COMPUTE/Scale.cpp index dc7ebe13fe..b34056aede 100644 --- a/tests/benchmark/GLES_COMPUTE/Scale.cpp +++ b/tests/benchmark/GLES_COMPUTE/Scale.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 ARM Limited. + * Copyright (c) 2017-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -52,12 +52,6 @@ TEST_SUITE(GC) REGISTER_FIXTURE_DATA_TEST_CASE(SmallScaleLayer, GCScaleLayerFixture, framework::DatasetMode::ALL, framework::dataset::combine(datasets::SmallScaleLayerShapes(), data_types)); -TEST_SUITE(NIGHTLY) - -REGISTER_FIXTURE_DATA_TEST_CASE(LargeScaleLayer, GCScaleLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(datasets::LargeScaleLayerShapes(), data_types)); - -TEST_SUITE_END() TEST_SUITE_END() } // namespace benchmark } // namespace test diff --git a/tests/benchmark/GLES_COMPUTE/SoftmaxLayer.cpp b/tests/benchmark/GLES_COMPUTE/SoftmaxLayer.cpp deleted file mode 100644 index 63ddd8a5a5..0000000000 --- a/tests/benchmark/GLES_COMPUTE/SoftmaxLayer.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2017-2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h" -#include "arm_compute/runtime/GLES_COMPUTE/functions/GCSoftmaxLayer.h" -#include "tests/GLES_COMPUTE/GCAccessor.h" -#include "tests/benchmark/fixtures/SoftmaxLayerFixture.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_types = framework::dataset::make("DataType", { DataType::F16, DataType::F32 }); -} // namespace - -using GCSoftmaxLayerFixture = SoftmaxLayerFixture; - -TEST_SUITE(GC) - -REGISTER_FIXTURE_DATA_TEST_CASE(SoftmaxLayer, GCSoftmaxLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(datasets::SoftmaxLayerSmallShapes(), data_types)); - -TEST_SUITE(NIGHTLY) - -REGISTER_FIXTURE_DATA_TEST_CASE(SoftmaxLayer, GCSoftmaxLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(datasets::SoftmaxLayerLargeShapes(), data_types)); - -TEST_SUITE_END() -TEST_SUITE_END() -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/GLES_COMPUTE/Transpose.cpp b/tests/benchmark/GLES_COMPUTE/Transpose.cpp deleted file mode 100644 index a76ca8fc2d..0000000000 --- a/tests/benchmark/GLES_COMPUTE/Transpose.cpp +++ /dev/null @@ -1,62 +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. - */ - -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h" -#include "arm_compute/runtime/GLES_COMPUTE/GCTensorAllocator.h" -#include "arm_compute/runtime/GLES_COMPUTE/functions/GCTranspose.h" -#include "tests/GLES_COMPUTE/GCAccessor.h" -#include "tests/benchmark/fixtures/TransposeFixture.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_types = framework::dataset::make("DataType", { DataType::F16, DataType::F32 }); -} // namespace - -using GCTransposeFixture = TransposeFixture; - -TEST_SUITE(GC) -TEST_SUITE(Transpose) - -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, GCTransposeFixture, framework::DatasetMode::PRECOMMIT, - framework::dataset::combine(datasets::Small2DShapes(), data_types)); - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, GCTransposeFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(datasets::Large2DShapes(), data_types)); - -TEST_SUITE_END() -TEST_SUITE_END() -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/NEON/ActivationLayer.cpp b/tests/benchmark/NEON/ActivationLayer.cpp deleted file mode 100644 index 1c4ea214b7..0000000000 --- a/tests/benchmark/NEON/ActivationLayer.cpp +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright (c) 2017-2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/NEON/functions/NEActivationLayer.h" -#include "arm_compute/runtime/Tensor.h" -#include "arm_compute/runtime/TensorAllocator.h" -#include "tests/NEON/Accessor.h" -#include "tests/benchmark/fixtures/ActivationLayerFixture.h" -#include "tests/datasets/system_tests/alexnet/AlexNetActivationLayerDataset.h" -#include "tests/datasets/system_tests/googlenet/inceptionv1/GoogLeNetInceptionV1ActivationLayerDataset.h" -#include "tests/datasets/system_tests/googlenet/inceptionv4/GoogLeNetInceptionV4ActivationLayerDataset.h" -#include "tests/datasets/system_tests/lenet5/LeNet5ActivationLayerDataset.h" -#include "tests/datasets/system_tests/mobilenet/MobileNetActivationLayerDataset.h" -#include "tests/datasets/system_tests/squeezenet/SqueezeNetActivationLayerDataset.h" -#include "tests/datasets/system_tests/vgg/vgg16/VGG16ActivationLayerDataset.h" -#include "tests/datasets/system_tests/yolo/v2/YOLOV2ActivationLayerDataset.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -#ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC -const auto data_types = framework::dataset::make("DataType", { DataType::F16, DataType::F32 }); -const auto data_types_mobilenet = framework::dataset::make("DataType", { DataType::F16, DataType::F32, DataType::QASYMM8 }); -#else /* __ARM_FEATURE_FP16_VECTOR_ARITHMETIC */ -const auto data_types = framework::dataset::make("DataType", { DataType::F32 }); -const auto data_types_mobilenet = framework::dataset::make("DataType", { DataType::F32, DataType::QASYMM8 }); -#endif /* __ARM_FEATURE_FP16_VECTOR_ARITHMETIC */ -} // namespace - -using NEActivationLayerFixture = ActivationLayerFixture; - -TEST_SUITE(NEON) - -REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetActivationLayer, NEActivationLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::AlexNetActivationLayerDataset(), data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(LeNet5ActivationLayer, NEActivationLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::LeNet5ActivationLayerDataset(), data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(MobileNetActivationLayer, NEActivationLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::MobileNetActivationLayerDataset(), data_types_mobilenet), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV1ActivationLayer, NEActivationLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV1ActivationLayerDataset(), data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV4ActivationLayer, NEActivationLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV4ActivationLayerDataset(), data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(SqueezeNetActivationLayer, NEActivationLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::SqueezeNetActivationLayerDataset(), data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(VGG16ActivationLayer, NEActivationLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::VGG16ActivationLayerDataset(), data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(YOLOV2ActivationLayer, NEActivationLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::YOLOV2ActivationLayerDataset(), data_types), - framework::dataset::make("Batches", 1))); - -TEST_SUITE(NIGHTLY) -REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetActivationLayer, NEActivationLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(datasets::AlexNetActivationLayerDataset(), data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(LeNet5ActivationLayer, NEActivationLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(datasets::LeNet5ActivationLayerDataset(), data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(MobileNetActivationLayer, NEActivationLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(datasets::MobileNetActivationLayerDataset(), data_types_mobilenet), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV1ActivationLayer, NEActivationLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV1ActivationLayerDataset(), data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV4ActivationLayer, NEActivationLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV4ActivationLayerDataset(), data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(SqueezeNetActivationLayer, NEActivationLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(datasets::SqueezeNetActivationLayerDataset(), data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(VGG16ActivationLayer, NEActivationLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(datasets::VGG16ActivationLayerDataset(), data_types), - framework::dataset::make("Batches", { 2 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(YOLOV2ActivationLayer, NEActivationLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(datasets::YOLOV2ActivationLayerDataset(), data_types), - framework::dataset::make("Batches", { 4, 8 }))); -TEST_SUITE_END() -TEST_SUITE_END() -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/NEON/BatchNormalizationLayer.cpp b/tests/benchmark/NEON/BatchNormalizationLayer.cpp deleted file mode 100644 index 35187ff66a..0000000000 --- a/tests/benchmark/NEON/BatchNormalizationLayer.cpp +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) 2017-2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/NEON/functions/NEBatchNormalizationLayer.h" -#include "arm_compute/runtime/Tensor.h" -#include "arm_compute/runtime/TensorAllocator.h" -#include "tests/NEON/Accessor.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -#include "tests/benchmark/fixtures/BatchNormalizationLayerFixture.h" -#include "tests/datasets/system_tests/googlenet/inceptionv4/GoogLeNetInceptionV4BatchNormalizationLayerDataset.h" -#include "tests/datasets/system_tests/mobilenet/MobileNetBatchNormalizationLayerDataset.h" -#include "tests/datasets/system_tests/yolo/v2/YOLOV2BatchNormalizationLayerDataset.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -#ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC -const auto data_types = framework::dataset::make("DataType", { DataType::F16, DataType::F32 }); -#else /* __ARM_FEATURE_FP16_VECTOR_ARITHMETIC */ -const auto data_types = framework::dataset::make("DataType", { DataType::F32 }); -#endif /* __ARM_FEATURE_FP16_VECTOR_ARITHMETIC */ -} // namespace - -using NEBatchNormalizationLayerFixture = BatchNormalizationLayerFixture; - -TEST_SUITE(NEON) - -REGISTER_FIXTURE_DATA_TEST_CASE(MobileNetBatchNormalizationLayer, NEBatchNormalizationLayerFixture, framework::DatasetMode::ALL, - combine(combine(combine(combine(combine(datasets::MobileNetBatchNormalizationLayerDataset(), - combine(framework::dataset::make("UseGamma", { false, true }), - framework::dataset::make("UseBeta", { false, true }))), - framework::dataset::make("ActivationInfo", ActivationLayerInfo())), - data_types), - framework::dataset::make("DataLayout", { DataLayout::NCHW })), - framework::dataset::make("Batches", 1))); -REGISTER_FIXTURE_DATA_TEST_CASE(YOLOV2BatchNormalizationLayer, NEBatchNormalizationLayerFixture, framework::DatasetMode::ALL, - combine(combine(combine(combine(combine(datasets::YOLOV2BatchNormalizationLayerDataset(), - combine(framework::dataset::make("UseGamma", { false, true }), - framework::dataset::make("UseBeta", { false, true }))), - framework::dataset::make("ActivationInfo", ActivationLayerInfo())), - data_types), - framework::dataset::make("DataLayout", { DataLayout::NCHW })), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV4BatchNormalizationLayer, NEBatchNormalizationLayerFixture, framework::DatasetMode::ALL, - combine(combine(combine(combine(combine(datasets::GoogLeNetInceptionV4BatchNormalizationLayerDataset(), - combine(framework::dataset::make("UseGamma", { false, true }), - framework::dataset::make("UseBeta", { false, true }))), - framework::dataset::make("ActivationInfo", ActivationLayerInfo())), - data_types), - framework::dataset::make("DataLayout", { DataLayout::NCHW })), - framework::dataset::make("Batches", 1))); - -TEST_SUITE(NIGHTLY) -REGISTER_FIXTURE_DATA_TEST_CASE(MobileNetBatchNormalizationLayer, NEBatchNormalizationLayerFixture, framework::DatasetMode::NIGHTLY, - combine(combine(combine(combine(combine(datasets::MobileNetBatchNormalizationLayerDataset(), - combine(framework::dataset::make("UseGamma", { false, true }), - framework::dataset::make("UseBeta", { false, true }))), - framework::dataset::make("ActivationInfo", ActivationLayerInfo())), - data_types), - framework::dataset::make("DataLayout", { DataLayout::NCHW })), - framework::dataset::make("Batches", { 4, 8 }))); -REGISTER_FIXTURE_DATA_TEST_CASE(YOLOV2BatchNormalizationLayer, NEBatchNormalizationLayerFixture, framework::DatasetMode::NIGHTLY, - combine(combine(combine(combine(combine(datasets::YOLOV2BatchNormalizationLayerDataset(), - combine(framework::dataset::make("UseGamma", { false, true }), - framework::dataset::make("UseBeta", { false, true }))), - framework::dataset::make("ActivationInfo", ActivationLayerInfo())), - data_types), - framework::dataset::make("DataLayout", { DataLayout::NCHW })), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV4BatchNormalizationLayer, NEBatchNormalizationLayerFixture, framework::DatasetMode::NIGHTLY, - combine(combine(combine(combine(combine(datasets::GoogLeNetInceptionV4BatchNormalizationLayerDataset(), - combine(framework::dataset::make("UseGamma", { false, true }), - framework::dataset::make("UseBeta", { false, true }))), - framework::dataset::make("ActivationInfo", ActivationLayerInfo())), - data_types), - framework::dataset::make("DataLayout", { DataLayout::NCHW })), - framework::dataset::make("Batches", { 4, 8 }))); -TEST_SUITE_END() -TEST_SUITE_END() -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/NEON/CannyEdge.cpp b/tests/benchmark/NEON/CannyEdge.cpp deleted file mode 100644 index c4414507c9..0000000000 --- a/tests/benchmark/NEON/CannyEdge.cpp +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/NEON/functions/NECannyEdge.h" -#include "arm_compute/runtime/Tensor.h" -#include "tests/NEON/Accessor.h" -#include "tests/benchmark/fixtures/CannyEdgeFixture.h" -#include "tests/datasets/BorderModeDataset.h" -#include "tests/datasets/ImageFileDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -// *INDENT-OFF* -// clang-format off -const auto canny_edge_dataset = combine(framework::dataset::make("GradientSize", { 3, 5, 7 }), - combine(framework::dataset::make("Normalization", { MagnitudeType::L1NORM, MagnitudeType::L2NORM }), - datasets::BorderModes())); -} // namespace - -using NECannyEdgeFixture = CannyEdgeFixture; - -TEST_SUITE(NEON) -TEST_SUITE(CannyEdge) - -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, NECannyEdgeFixture, framework::DatasetMode::PRECOMMIT, - combine(combine( - datasets::SmallImageFiles(), - canny_edge_dataset), - framework::dataset::make("Format", Format::U8))); - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, NECannyEdgeFixture, framework::DatasetMode::NIGHTLY, - combine(combine( - datasets::LargeImageFiles(), - canny_edge_dataset), - framework::dataset::make("Format", Format::U8))); -// clang-format on -// *INDENT-ON* - -TEST_SUITE_END() // CannyEdge -TEST_SUITE_END() // NEON -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/NEON/ColorConvert.cpp b/tests/benchmark/NEON/ColorConvert.cpp deleted file mode 100644 index 8223551635..0000000000 --- a/tests/benchmark/NEON/ColorConvert.cpp +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/runtime/MultiImage.h" -#include "arm_compute/runtime/NEON/functions/NEColorConvert.h" -#include "arm_compute/runtime/Tensor.h" -#include "tests/NEON/Accessor.h" -#include "tests/benchmark/fixtures/ColorConvertFixture.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto RGBDataset = framework::dataset::make("FormatType", { Format::RGB888, Format::RGBA8888 }); -const auto YUYVDataset = framework::dataset::make("FormatType", { Format::YUYV422, Format::UYVY422 }); - -const auto ColorConvert_RGBA_to_RGB = combine(framework::dataset::make("FormatType", { Format::RGBA8888 }), - framework::dataset::make("FormatType", { Format::RGB888 })); - -const auto ColorConvert_RGB_to_RGBA = combine(framework::dataset::make("FormatType", { Format::RGB888 }), - framework::dataset::make("FormatType", { Format::RGBA8888 })); - -const auto ColorConvert_RGB_to_U8 = combine(framework::dataset::make("FormatType", { Format::RGB888 }), - framework::dataset::make("FormatType", { Format::U8 })); - -const auto ColorConvert_YUYVDataset_to_RGBDataset = combine(YUYVDataset, - RGBDataset); - -const auto ColorConvert_YUVPlanar_to_RGBDataset = combine(framework::dataset::make("FormatType", { Format::IYUV, Format::NV12, Format::NV21 }), - RGBDataset); - -const auto ColorConvert_RGBDataset_to_NVDataset = combine(RGBDataset, - framework::dataset::make("FormatType", { Format::NV12, Format::IYUV, Format::YUV444 })); - -const auto ColorConvert_YUYVDataset_to_NVDataset = combine(YUYVDataset, - framework::dataset::make("FormatType", { Format::NV12, Format::IYUV })); - -const auto ColorConvert_NVDataset_to_YUVDataset = combine(framework::dataset::make("FormatType", { Format::NV12, Format::NV21 }), - framework::dataset::make("FormatType", { Format::IYUV, Format::YUV444 })); -} // namespace - -TEST_SUITE(NEON) -TEST_SUITE(ColorConvert) - -using NEColorConvertFixture = ColorConvertFixture; - -TEST_SUITE(RGBA) -// *INDENT-OFF* -// clang-format off -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, NEColorConvertFixture, framework::DatasetMode::PRECOMMIT, combine(datasets::Small2DShapes(), ColorConvert_RGBA_to_RGB)); -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, NEColorConvertFixture, framework::DatasetMode::NIGHTLY, combine(datasets::Large2DShapes(), ColorConvert_RGBA_to_RGB)); -TEST_SUITE_END() - -TEST_SUITE(RGB) -// *INDENT-OFF* -// clang-format off -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, NEColorConvertFixture, framework::DatasetMode::PRECOMMIT, combine(datasets::Small2DShapes(), ColorConvert_RGB_to_RGBA)); -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, NEColorConvertFixture, framework::DatasetMode::NIGHTLY, combine(datasets::Large2DShapes(), ColorConvert_RGB_to_RGBA)); -TEST_SUITE_END() - -TEST_SUITE(RGBtoU8) -// *INDENT-OFF* -// clang-format off -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, NEColorConvertFixture, framework::DatasetMode::PRECOMMIT, combine(datasets::Small2DShapes(), ColorConvert_RGB_to_U8)); -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, NEColorConvertFixture, framework::DatasetMode::NIGHTLY, combine(datasets::Large2DShapes(), ColorConvert_RGB_to_U8)); -TEST_SUITE_END() - -TEST_SUITE(YUYV) -// *INDENT-OFF* -// clang-format off -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, NEColorConvertFixture, framework::DatasetMode::PRECOMMIT, combine(datasets::Small2DShapes(), ColorConvert_YUYVDataset_to_RGBDataset)); -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, NEColorConvertFixture, framework::DatasetMode::NIGHTLY, combine(datasets::Large2DShapes(), ColorConvert_YUYVDataset_to_RGBDataset)); -TEST_SUITE_END() - -TEST_SUITE(YUVPlanar) -// *INDENT-OFF* -// clang-format off -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, NEColorConvertFixture, framework::DatasetMode::PRECOMMIT, combine(datasets::Small2DShapes(), ColorConvert_YUVPlanar_to_RGBDataset)); -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, NEColorConvertFixture, framework::DatasetMode::NIGHTLY, combine(datasets::Large2DShapes(), ColorConvert_YUVPlanar_to_RGBDataset)); -TEST_SUITE_END() - -TEST_SUITE(NV) -// *INDENT-OFF* -// clang-format off -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, NEColorConvertFixture, framework::DatasetMode::PRECOMMIT, combine(datasets::Small2DShapes(), ColorConvert_RGBDataset_to_NVDataset)); -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, NEColorConvertFixture, framework::DatasetMode::NIGHTLY, combine(datasets::Large2DShapes(), ColorConvert_RGBDataset_to_NVDataset)); -TEST_SUITE_END() - -TEST_SUITE(YUYVtoNV) -// *INDENT-OFF* -// clang-format off -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, NEColorConvertFixture, framework::DatasetMode::PRECOMMIT, combine(datasets::Small2DShapes(), ColorConvert_YUYVDataset_to_NVDataset)); -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, NEColorConvertFixture, framework::DatasetMode::NIGHTLY, combine(datasets::Large2DShapes(), ColorConvert_YUYVDataset_to_NVDataset)); -TEST_SUITE_END() - -TEST_SUITE(NVtoYUV) -// *INDENT-OFF* -// clang-format off -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, NEColorConvertFixture, framework::DatasetMode::PRECOMMIT, combine(datasets::Small2DShapes(), ColorConvert_NVDataset_to_YUVDataset)); -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, NEColorConvertFixture, framework::DatasetMode::NIGHTLY, combine(datasets::Large2DShapes(), ColorConvert_NVDataset_to_YUVDataset)); -TEST_SUITE_END() - -TEST_SUITE_END() // ColorConvert -TEST_SUITE_END() // CL -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/NEON/Convolution.cpp b/tests/benchmark/NEON/Convolution.cpp deleted file mode 100644 index 29ff60a48a..0000000000 --- a/tests/benchmark/NEON/Convolution.cpp +++ /dev/null @@ -1,206 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime//Tensor.h" -#include "arm_compute/runtime/NEON/functions/NEConvolution.h" -#include "tests/NEON/Accessor.h" -#include "tests/benchmark/fixtures/ConvolutionFixture.h" -#include "tests/datasets/BorderModeDataset.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -// *INDENT-OFF* -// clang-format off - -#define CONVOLUTION_SQUARE_DATA_TEST_CASE(TEST_NAME, MODE, SHAPES, DT, FILTER_SIZE) \ - REGISTER_FIXTURE_DATA_TEST_CASE(TEST_NAME, NEConvolutionFixture, framework::DatasetMode::MODE, \ - combine(combine(combine( \ - datasets::SHAPES, \ - framework::dataset::make("DataType", DataType::DT)), \ - datasets::BorderModes()), \ - framework::dataset::make("FilterSize", { FILTER_SIZE }))); - -#define CONVOLUTION_RECTANGLE_DATA_TEST_CASE(TEST_NAME, MODE, SHAPES, DT) \ - REGISTER_FIXTURE_DATA_TEST_CASE(TEST_NAME, NEConvolutionFixture, framework::DatasetMode::MODE, \ - combine(combine(combine(combine( \ - datasets::SHAPES, \ - framework::dataset::make("DataType", DataType::DT)), \ - datasets::BorderModes()), \ - framework::dataset::make("FilterSize", { 3, 5, 7, 9 })), \ - framework::dataset::make("FilterSize", { 3, 5, 7, 9 }))); - -#define CONVOLUTION_SEPARABLE_DATA_TEST_CASE(TEST_NAME, MODE, SHAPES, DT, FILTER_SIZE) \ - CONVOLUTION_SQUARE_DATA_TEST_CASE(TEST_NAME, MODE, SHAPES, DT, FILTER_SIZE) - -// clang-format on -// *INDENT-ON* - -} // namespace - -TEST_SUITE(NEON) -TEST_SUITE(CustomConvolution) - -TEST_SUITE(Square3x3) - -using NEConvolutionFixture = ConvolutionSquareFixture; - -TEST_SUITE(U8) -CONVOLUTION_SQUARE_DATA_TEST_CASE(RunSmall, PRECOMMIT, SmallShapes(), U8, 3) -CONVOLUTION_SQUARE_DATA_TEST_CASE(RunLarge, NIGHTLY, LargeShapes(), U8, 3) -TEST_SUITE_END() // U8 - -TEST_SUITE(S16) -CONVOLUTION_SQUARE_DATA_TEST_CASE(RunSmall, PRECOMMIT, SmallShapes(), S16, 3) -CONVOLUTION_SQUARE_DATA_TEST_CASE(RunLarge, NIGHTLY, LargeShapes(), S16, 3) -TEST_SUITE_END() // S16 - -TEST_SUITE_END() // Square3x3 - -TEST_SUITE(Square5x5) - -using NEConvolutionFixture = ConvolutionSquareFixture; - -TEST_SUITE(U8) -CONVOLUTION_SQUARE_DATA_TEST_CASE(RunSmall, PRECOMMIT, SmallShapes(), U8, 5) -CONVOLUTION_SQUARE_DATA_TEST_CASE(RunLarge, NIGHTLY, LargeShapes(), U8, 5) -TEST_SUITE_END() // U8 - -TEST_SUITE(S16) -CONVOLUTION_SQUARE_DATA_TEST_CASE(RunSmall, PRECOMMIT, SmallShapes(), S16, 5) -CONVOLUTION_SQUARE_DATA_TEST_CASE(RunLarge, NIGHTLY, LargeShapes(), S16, 5) -TEST_SUITE_END() // S16 - -TEST_SUITE_END() // Square5x5 - -TEST_SUITE(Square7x7) - -using NEConvolutionFixture = ConvolutionSquareFixture; - -TEST_SUITE(U8) -CONVOLUTION_SQUARE_DATA_TEST_CASE(RunSmall, PRECOMMIT, SmallShapes(), U8, 7) -CONVOLUTION_SQUARE_DATA_TEST_CASE(RunLarge, NIGHTLY, LargeShapes(), U8, 7) -TEST_SUITE_END() // U8 - -TEST_SUITE(S16) -CONVOLUTION_SQUARE_DATA_TEST_CASE(RunSmall, PRECOMMIT, SmallShapes(), S16, 7) -CONVOLUTION_SQUARE_DATA_TEST_CASE(RunLarge, NIGHTLY, LargeShapes(), S16, 7) -TEST_SUITE_END() // S16 - -TEST_SUITE_END() // Square7x7 - -TEST_SUITE(Square9x9) - -using NEConvolutionFixture = ConvolutionSquareFixture; - -TEST_SUITE(U8) -CONVOLUTION_SQUARE_DATA_TEST_CASE(RunSmall, PRECOMMIT, SmallShapes(), U8, 9) -CONVOLUTION_SQUARE_DATA_TEST_CASE(RunLarge, NIGHTLY, LargeShapes(), U8, 9) -TEST_SUITE_END() // U8 - -TEST_SUITE(S16) -CONVOLUTION_SQUARE_DATA_TEST_CASE(RunSmall, PRECOMMIT, SmallShapes(), S16, 9) -CONVOLUTION_SQUARE_DATA_TEST_CASE(RunLarge, NIGHTLY, LargeShapes(), S16, 9) -TEST_SUITE_END() // S16 - -TEST_SUITE_END() // Square9x9 - -TEST_SUITE(Rectangle) - -using NEConvolutionFixture = ConvolutionRectangleFixture; - -TEST_SUITE(U8) -CONVOLUTION_RECTANGLE_DATA_TEST_CASE(RunSmall, PRECOMMIT, SmallShapes(), U8) -CONVOLUTION_RECTANGLE_DATA_TEST_CASE(RunLarge, NIGHTLY, LargeShapes(), U8) -TEST_SUITE_END() // U8 - -TEST_SUITE(S16) -CONVOLUTION_RECTANGLE_DATA_TEST_CASE(RunSmall, PRECOMMIT, SmallShapes(), S16) -CONVOLUTION_RECTANGLE_DATA_TEST_CASE(RunLarge, NIGHTLY, LargeShapes(), S16) -TEST_SUITE_END() // S16 - -TEST_SUITE_END() // Rectangle - -TEST_SUITE(Separable5x5) - -using NEConvolutionFixture = ConvolutionSeperableFixture; - -TEST_SUITE(U8) -CONVOLUTION_SEPARABLE_DATA_TEST_CASE(RunSmall, PRECOMMIT, SmallShapes(), U8, 5) -CONVOLUTION_SEPARABLE_DATA_TEST_CASE(RunLarge, NIGHTLY, LargeShapes(), U8, 5) -TEST_SUITE_END() // U8 - -TEST_SUITE(S16) -CONVOLUTION_SEPARABLE_DATA_TEST_CASE(RunSmall, PRECOMMIT, SmallShapes(), S16, 5) -CONVOLUTION_SEPARABLE_DATA_TEST_CASE(RunLarge, NIGHTLY, LargeShapes(), S16, 5) -TEST_SUITE_END() // S16 - -TEST_SUITE_END() // Separable5x5 - -TEST_SUITE(Separable7x7) - -using NEConvolutionFixture = ConvolutionSeperableFixture; - -TEST_SUITE(U8) -CONVOLUTION_SEPARABLE_DATA_TEST_CASE(RunSmall, PRECOMMIT, SmallShapes(), U8, 7) -CONVOLUTION_SEPARABLE_DATA_TEST_CASE(RunLarge, NIGHTLY, LargeShapes(), U8, 7) -TEST_SUITE_END() // U8 - -TEST_SUITE(S16) -CONVOLUTION_SEPARABLE_DATA_TEST_CASE(RunSmall, PRECOMMIT, SmallShapes(), S16, 7) -CONVOLUTION_SEPARABLE_DATA_TEST_CASE(RunLarge, NIGHTLY, LargeShapes(), S16, 7) -TEST_SUITE_END() // S16 - -TEST_SUITE_END() // Separable7x7 - -TEST_SUITE(Separable9x9) - -using NEConvolutionFixture = ConvolutionSeperableFixture; - -TEST_SUITE(U8) -CONVOLUTION_SEPARABLE_DATA_TEST_CASE(RunSmall, PRECOMMIT, SmallShapes(), U8, 9) -CONVOLUTION_SEPARABLE_DATA_TEST_CASE(RunLarge, NIGHTLY, LargeShapes(), U8, 9) -TEST_SUITE_END() // U8 - -TEST_SUITE(S16) -CONVOLUTION_SEPARABLE_DATA_TEST_CASE(RunSmall, PRECOMMIT, SmallShapes(), S16, 9) -CONVOLUTION_SEPARABLE_DATA_TEST_CASE(RunLarge, NIGHTLY, LargeShapes(), S16, 9) -TEST_SUITE_END() // S16 - -TEST_SUITE_END() // Separable9x9 - -TEST_SUITE_END() // CustomConvolution -TEST_SUITE_END() // NEON -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/NEON/ConvolutionLayer.cpp b/tests/benchmark/NEON/ConvolutionLayer.cpp deleted file mode 100644 index 2ae893bdec..0000000000 --- a/tests/benchmark/NEON/ConvolutionLayer.cpp +++ /dev/null @@ -1,213 +0,0 @@ -/* - * Copyright (c) 2017-2019 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/NEON/functions/NEConvolutionLayer.h" -#include "arm_compute/runtime/NEON/functions/NEFFTConvolutionLayer.h" -#include "arm_compute/runtime/NEON/functions/NEWinogradConvolutionLayer.h" -#include "arm_compute/runtime/Tensor.h" -#include "arm_compute/runtime/TensorAllocator.h" -#include "tests/NEON/Accessor.h" -#include "tests/benchmark/fixtures/ConvolutionLayerFixture.h" -#include "tests/benchmark/fixtures/FFTConvolutionLayerFixture.h" -#include "tests/benchmark/fixtures/WinogradConvolutionLayerFixture.h" -#include "tests/datasets/SmallConvolutionLayerDataset.h" -#include "tests/datasets/system_tests/alexnet/AlexNetConvolutionLayerDataset.h" -#include "tests/datasets/system_tests/googlenet/inceptionv1/GoogLeNetInceptionV1ConvolutionLayerDataset.h" -#include "tests/datasets/system_tests/googlenet/inceptionv4/GoogLeNetInceptionV4ConvolutionLayerDataset.h" -#include "tests/datasets/system_tests/lenet5/LeNet5ConvolutionLayerDataset.h" -#include "tests/datasets/system_tests/mobilenet/MobileNetConvolutionLayerDataset.h" -#include "tests/datasets/system_tests/resnet12/ResNet12ConvolutionLayerDataset.h" -#include "tests/datasets/system_tests/squeezenet/SqueezeNetConvolutionLayerDataset.h" -#include "tests/datasets/system_tests/vgg/vgg16/VGG16ConvolutionLayerDataset.h" -#include "tests/datasets/system_tests/yolo/v2/YOLOV2ConvolutionLayerDataset.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -#ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC -const auto data_types = framework::dataset::make("DataType", { DataType::F16, DataType::F32, DataType::QASYMM8 }); -#else /* __ARM_FEATURE_FP16_VECTOR_ARITHMETIC */ -const auto data_types = framework::dataset::make("DataType", { DataType::F32, DataType::QASYMM8 }); - -#endif /* __ARM_FEATURE_FP16_VECTOR_ARITHMETIC */ -} // namespace - -using NEGEMMConvolutionLayerFixture = ConvolutionLayerFixture; -using NEFFTConvolutionLayerFixture = FFTConvolutionLayerFixture; - -TEST_SUITE(NEON) -#if defined(__aarch64__) -using NEWinogradConvolutionLayerFixture = WinogradConvolutionLayerFixture; - -REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetWinogradLayer, NEWinogradConvolutionLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::AlexNetWinogradLayerDataset(), - framework::dataset::make("ActivationInfo", ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - framework::dataset::make("DataType", DataType::F32)), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV1WinogradLayer, NEWinogradConvolutionLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV1WinogradLayerDataset(), - framework::dataset::make("ActivationInfo", ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - framework::dataset::make("DataType", DataType::F32)), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV4WinogradLayer, NEWinogradConvolutionLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV4WinogradLayerDataset(), - framework::dataset::make("ActivationInfo", ActivationLayerInfo())), - framework::dataset::make("DataType", DataType::F32)), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(SqueezeNetWinogradLayer, NEWinogradConvolutionLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::SqueezeNetWinogradLayerDataset(), - framework::dataset::make("ActivationInfo", ActivationLayerInfo())), - framework::dataset::make("DataType", DataType::F32)), - framework::dataset::make("Batches", 1))); -#endif /* __aarch64__ */ - -REGISTER_FIXTURE_DATA_TEST_CASE(ResNet12FFTLayer, NEFFTConvolutionLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::ResNet12FFTConvolutionLayerDataset(), - framework::dataset::make("ActivationInfo", ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - framework::dataset::make("DataType", { DataType::F32 })), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetConvolutionLayer, NEGEMMConvolutionLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::AlexNetConvolutionLayerDataset(), - framework::dataset::make("ActivationInfo", ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(LeNet5ConvolutionLayer, NEGEMMConvolutionLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::LeNet5ConvolutionLayerDataset(), - framework::dataset::make("ActivationInfo", ActivationLayerInfo())), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV1ConvolutionLayer, NEGEMMConvolutionLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV1ConvolutionLayerDataset(), - framework::dataset::make("ActivationInfo", ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV4ConvolutionLayer, NEGEMMConvolutionLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV4ConvolutionLayerDataset(), - framework::dataset::make("ActivationInfo", ActivationLayerInfo())), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(SqueezeNetConvolutionLayer, NEGEMMConvolutionLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::SqueezeNetConvolutionLayerDataset(), - framework::dataset::make("ActivationInfo", ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(MobileNetConvolutionLayer, NEGEMMConvolutionLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::MobileNetConvolutionLayerDataset(), - framework::dataset::make("ActivationInfo", ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - data_types), - framework::dataset::make("Batches", 1))); - -TEST_SUITE(NIGHTLY) -REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetConvolutionLayer, NEGEMMConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::AlexNetConvolutionLayerDataset(), - framework::dataset::make("ActivationInfo", ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(LeNet5ConvolutionLayer, NEGEMMConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::LeNet5ConvolutionLayerDataset(), - framework::dataset::make("ActivationInfo", ActivationLayerInfo())), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV1ConvolutionLayer, NEGEMMConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV1ConvolutionLayerDataset(), - framework::dataset::make("ActivationInfo", ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV4ConvolutionLayer, NEGEMMConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV4ConvolutionLayerDataset(), - framework::dataset::make("ActivationInfo", ActivationLayerInfo())), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(SqueezeNetConvolutionLayer, NEGEMMConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::SqueezeNetConvolutionLayerDataset(), - framework::dataset::make("ActivationInfo", ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -// 8 batches use about 2GB of memory which is too much for most devices! -REGISTER_FIXTURE_DATA_TEST_CASE(VGG16ConvolutionLayer, NEGEMMConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::VGG16ConvolutionLayerDataset(), - framework::dataset::make("ActivationInfo", ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - data_types), - framework::dataset::make("Batches", { 1, 2 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(YOLOV2ConvolutionLayer, NEGEMMConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::YOLOV2ConvolutionLayerDataset(), - framework::dataset::make("ActivationInfo", ActivationLayerInfo())), - data_types), - framework::dataset::make("Batches", { 1, 4, 8 }))); - -#if defined(__aarch64__) -REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetWinogradLayer, NEWinogradConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::AlexNetWinogradLayerDataset(), - framework::dataset::make("ActivationInfo", ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - framework::dataset::make("DataType", DataType::F32)), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV1WinogradLayer, NEWinogradConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV1WinogradLayerDataset(), - framework::dataset::make("ActivationInfo", ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - framework::dataset::make("DataType", DataType::F32)), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV4WinogradLayer, NEWinogradConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV4WinogradLayerDataset(), - framework::dataset::make("ActivationInfo", ActivationLayerInfo())), - framework::dataset::make("DataType", DataType::F32)), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(SqueezeNetWinogradLayer, NEWinogradConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::SqueezeNetWinogradLayerDataset(), - framework::dataset::make("ActivationInfo", ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - framework::dataset::make("DataType", DataType::F32)), - framework::dataset::make("Batches", { 4, 8 }))); -#endif /* __aarch64__ */ - -TEST_SUITE_END() -TEST_SUITE_END() -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/NEON/DepthConcatenateLayer.cpp b/tests/benchmark/NEON/DepthConcatenateLayer.cpp deleted file mode 100644 index 1d8b18c2bb..0000000000 --- a/tests/benchmark/NEON/DepthConcatenateLayer.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2017-2019 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/NEON/functions/NEConcatenateLayer.h" -#include "arm_compute/runtime/Tensor.h" -#include "arm_compute/runtime/TensorAllocator.h" -#include "tests/NEON/Accessor.h" -#include "tests/benchmark/fixtures/DepthConcatenateLayerFixture.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_types = framework::dataset::make("DataType", { DataType::F16, DataType::F32 }); -} // namespace - -using NEDepthConcatenateLayerFixture = DepthConcatenateLayerFixture; - -TEST_SUITE(NEON) -TEST_SUITE(DepthConcatenateLayer) - -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, NEDepthConcatenateLayerFixture, framework::DatasetMode::PRECOMMIT, framework::dataset::combine(datasets::Small3DShapes(), data_types)); -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, NEDepthConcatenateLayerFixture, framework::DatasetMode::NIGHTLY, framework::dataset::combine(datasets::ConcatenateLayerShapes(), data_types)); - -TEST_SUITE_END() // DepthConcatenateLayer -TEST_SUITE_END() // NEON -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/NEON/DequantizationLayer.cpp b/tests/benchmark/NEON/DequantizationLayer.cpp deleted file mode 100644 index 2ffa8a1c3f..0000000000 --- a/tests/benchmark/NEON/DequantizationLayer.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2017-2019 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/NEON/functions/NEDequantizationLayer.h" -#include "arm_compute/runtime/Tensor.h" -#include "arm_compute/runtime/TensorAllocator.h" -#include "tests/NEON/Accessor.h" -#include "tests/benchmark/fixtures/DequantizationLayerFixture.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_types_src = framework::dataset::make("DataType", { DataType::QASYMM8 }); -#ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC -const auto data_types_dst = framework::dataset::make("DataType", { DataType::F16, DataType::F32 }); -#else /* __ARM_FEATURE_FP16_VECTOR_ARITHMETIC */ -const auto data_types_dst = framework::dataset::make("DataType", { DataType::F32 }); -#endif /* __ARM_FEATURE_FP16_VECTOR_ARITHMETIC */ -} // namespace - -using NEDequantizationLayerFixture = DequantizationLayerFixture; - -TEST_SUITE(NEON) - -REGISTER_FIXTURE_DATA_TEST_CASE(DequantizationLayer, NEDequantizationLayerFixture, - framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::Small3DShapes(), data_types_src), data_types_dst)); - -TEST_SUITE_END() // NEON -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/NEON/DirectConvolutionLayer.cpp b/tests/benchmark/NEON/DirectConvolutionLayer.cpp deleted file mode 100644 index f94ef6be19..0000000000 --- a/tests/benchmark/NEON/DirectConvolutionLayer.cpp +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright (c) 2017-2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/NEON/functions/NEDirectConvolutionLayer.h" -#include "arm_compute/runtime/Tensor.h" -#include "arm_compute/runtime/TensorAllocator.h" -#include "tests/NEON/Accessor.h" -#include "tests/benchmark/fixtures/DirectConvolutionLayerFixture.h" -#include "tests/datasets/DirectConvolutionLayerDataset.h" -#include "tests/datasets/system_tests/alexnet/AlexNetConvolutionLayerDataset.h" -#include "tests/datasets/system_tests/googlenet/inceptionv1/GoogLeNetInceptionV1ConvolutionLayerDataset.h" -#include "tests/datasets/system_tests/googlenet/inceptionv4/GoogLeNetInceptionV4ConvolutionLayerDataset.h" -#include "tests/datasets/system_tests/squeezenet/SqueezeNetConvolutionLayerDataset.h" -#include "tests/datasets/system_tests/vgg/vgg16/VGG16ConvolutionLayerDataset.h" -#include "tests/datasets/system_tests/yolo/v2/YOLOV2ConvolutionLayerDataset.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -// Special data types for networks that need 5x5 direct convolution -#ifdef ARM_COMPUTE_ENABLE_F16 -const auto data_types = framework::dataset::make("DataType", { DataType::F16, DataType::F32 }); -#else /* ARM_COMPUTE_ENABLE_F16 */ -const auto data_types = framework::dataset::make("DataType", { DataType::F32 }); -#endif /* ARM_COMPUTE_ENABLE_F16 */ -} // namespace - -using NEDirectConvolutionLayerFixture = DirectConvolutionLayerFixture; - -TEST_SUITE(NEON) - -REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetDirectConvolutionLayer, NEDirectConvolutionLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::AlexNetDirectConvolutionLayerDataset(), - framework::dataset::make("ActivationInfo", ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV1DirectConvolutionLayer, NEDirectConvolutionLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV1DirectConvolutionLayerDataset(), - framework::dataset::make("ActivationInfo", ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV4DirectConvolutionLayer, NEDirectConvolutionLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV4DirectConvolutionLayerDataset(), - framework::dataset::make("ActivationInfo", ActivationLayerInfo())), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(SqueezeNetDirectConvolutionLayer, NEDirectConvolutionLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::SqueezeNetConvolutionLayerDataset(), - framework::dataset::make("ActivationInfo", ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - data_types), - framework::dataset::make("Batches", 1))); - -TEST_SUITE(NIGHTLY) -REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetDirectConvolutionLayer, NEDirectConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::AlexNetDirectConvolutionLayerDataset(), - framework::dataset::make("ActivationInfo", ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV1DirectConvolutionLayer, NEDirectConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV1DirectConvolutionLayerDataset(), - framework::dataset::make("ActivationInfo", ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV4DirectConvolutionLayer, NEDirectConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV4DirectConvolutionLayerDataset(), - framework::dataset::make("ActivationInfo", ActivationLayerInfo())), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(SqueezeNetDirectConvolutionLayer, NEDirectConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::SqueezeNetConvolutionLayerDataset(), - framework::dataset::make("ActivationInfo", ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(VGG16DirectConvolutionLayer, NEDirectConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::VGG16ConvolutionLayerDataset(), - framework::dataset::make("ActivationInfo", ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU))), - data_types), - framework::dataset::make("Batches", { 1, 2 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(YOLOV2DirectConvolutionLayer, NEDirectConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::YOLOV2ConvolutionLayerDataset(), - framework::dataset::make("ActivationInfo", ActivationLayerInfo())), - data_types), - framework::dataset::make("Batches", { 1, 4, 8 }))); - -TEST_SUITE_END() -TEST_SUITE_END() -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/NEON/ElementwiseSin.cpp b/tests/benchmark/NEON/ElementwiseSin.cpp deleted file mode 100644 index 58b58dc1bd..0000000000 --- a/tests/benchmark/NEON/ElementwiseSin.cpp +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2019 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/NEON/functions/NEElementwiseUnaryLayer.h" -#include "arm_compute/runtime/Tensor.h" -#include "arm_compute/runtime/TensorAllocator.h" -#include "tests/NEON/Accessor.h" -#include "tests/PaddingCalculator.h" -#include "tests/benchmark/fixtures/ElementWiseUnaryFixture.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Asserts.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -TEST_SUITE(NEON) -TEST_SUITE(SinLayer) - -template -using NESinLayerFixture = SinBenchmarkFixture; - -TEST_SUITE(Float) -#ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC -TEST_SUITE(FP16) -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, NESinLayerFixture, framework::DatasetMode::PRECOMMIT, combine(datasets::SmallShapes(), framework::dataset::make("DataType", - DataType::F16))); - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, NESinLayerFixture, framework::DatasetMode::NIGHTLY, combine(datasets::LargeShapes(), framework::dataset::make("DataType", - DataType::F16))); - -TEST_SUITE_END() // FP16 -#endif // __ARM_FEATURE_FP16_VECTOR_ARITHMETIC - -TEST_SUITE(FP32) -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, NESinLayerFixture, framework::DatasetMode::ALL, combine(datasets::SmallShapes(), framework::dataset::make("DataType", - DataType::F32))); - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, NESinLayerFixture, framework::DatasetMode::NIGHTLY, combine(datasets::LargeShapes(), framework::dataset::make("DataType", - DataType::F32))); -TEST_SUITE_END() // FP32 -TEST_SUITE_END() // Float - -TEST_SUITE_END() // SinLayer -TEST_SUITE_END() // NEON -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/NEON/EqualizeHistogram.cpp b/tests/benchmark/NEON/EqualizeHistogram.cpp deleted file mode 100644 index b37100931f..0000000000 --- a/tests/benchmark/NEON/EqualizeHistogram.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/NEON/functions/NEEqualizeHistogram.h" -#include "arm_compute/runtime/Tensor.h" -#include "tests/NEON/Accessor.h" -#include "tests/benchmark/fixtures/EqualizeHistogramFixture.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -using NEEqualizeHistogramFixture = EqualizeHistogramFixture; - -TEST_SUITE(NEON) -TEST_SUITE(EqualizeHistogram) - -// *INDENT-OFF* -// clang-format off -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, NEEqualizeHistogramFixture, framework::DatasetMode::PRECOMMIT, - combine( - datasets::SmallImageShapes(), - framework::dataset::make("Format", Format::U8))); - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, NEEqualizeHistogramFixture, framework::DatasetMode::NIGHTLY, - combine( - datasets::LargeImageShapes(), - framework::dataset::make("Format", Format::U8))); -// clang-format on -// *INDENT-ON* - -TEST_SUITE_END() // EqualizeHistogram -TEST_SUITE_END() // NEON -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/NEON/FFT.cpp b/tests/benchmark/NEON/FFT.cpp deleted file mode 100644 index c9889fda02..0000000000 --- a/tests/benchmark/NEON/FFT.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2019 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/NEON/functions/NEFFT1D.h" -#include "arm_compute/runtime/NEON/functions/NEFFT2D.h" -#include "arm_compute/runtime/Tensor.h" -#include "tests/NEON/Accessor.h" -#include "tests/benchmark/fixtures/FFTFixture.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_types = framework::dataset::make("DataType", { DataType::F32 }); -const auto shapes = framework::dataset::make("Shapes", { TensorShape(192U, 128U, 64U), TensorShape(224U, 224U) }); -} // namespace - -using NEFFT1DFixture = FFTFixture; -using NEFFT2DFixture = FFTFixture; - -TEST_SUITE(CL) - -REGISTER_FIXTURE_DATA_TEST_CASE(FFT1D, NEFFT1DFixture, framework::DatasetMode::ALL, - framework::dataset::combine(shapes, data_types)); - -REGISTER_FIXTURE_DATA_TEST_CASE(FFT2D, NEFFT2DFixture, framework::DatasetMode::ALL, - framework::dataset::combine(shapes, data_types)); - -TEST_SUITE_END() // CL -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/NEON/FastCorners.cpp b/tests/benchmark/NEON/FastCorners.cpp deleted file mode 100644 index 0e30d90900..0000000000 --- a/tests/benchmark/NEON/FastCorners.cpp +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/Array.h" -#include "arm_compute/runtime/NEON/functions/NEFastCorners.h" -#include "arm_compute/runtime/Tensor.h" -#include "tests/NEON/Accessor.h" -#include "tests/benchmark/fixtures/FastCornersFixture.h" -#include "tests/datasets/ImageFileDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto threshold = framework::dataset::make("Threshold", { 64.f }); // valid range (0.0 ≤ threshold < 256.0) -const auto border_mode = framework::dataset::make("BorderMode", { BorderMode::UNDEFINED }); // NOTE: only BorderMode::UNDEFINED is implemented -const auto suppress_nonmax = framework::dataset::make("SuppressNonMax", { false, true }); -} // namespace - -using NEFastCornersFixture = FastCornersFixture; - -TEST_SUITE(NEON) -TEST_SUITE(FastCorners) - -// *INDENT-OFF* -// clang-format off -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, NEFastCornersFixture, framework::DatasetMode::PRECOMMIT, - combine(combine(combine(combine( - datasets::SmallImageFiles(), - framework::dataset::make("Format", { Format::U8 })), - threshold), - suppress_nonmax), - border_mode)); - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, NEFastCornersFixture, framework::DatasetMode::NIGHTLY, - combine(combine(combine(combine( - datasets::LargeImageFiles(), - framework::dataset::make("Format", { Format::U8 })), - threshold), - suppress_nonmax), - border_mode)); -// clang-format on -// *INDENT-ON* - -TEST_SUITE_END() // FastCorners -TEST_SUITE_END() // NEON -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/NEON/FlattenLayer.cpp b/tests/benchmark/NEON/FlattenLayer.cpp deleted file mode 100644 index 9479f01662..0000000000 --- a/tests/benchmark/NEON/FlattenLayer.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2017-2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/NEON/functions/NEFlattenLayer.h" -#include "arm_compute/runtime/Tensor.h" -#include "arm_compute/runtime/TensorAllocator.h" -#include "tests/NEON/Accessor.h" -#include "tests/benchmark/fixtures/FlattenLayerFixture.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_types = framework::dataset::make("DataType", { DataType::F32 }); -} // namespace - -using NEFllattenLayerFixture = FlattenLayerFixture; - -TEST_SUITE(NEON) - -REGISTER_FIXTURE_DATA_TEST_CASE(FlattenLayer, NEFllattenLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(datasets::Small4DShapes(), data_types)); - -TEST_SUITE_END() -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/NEON/Floor.cpp b/tests/benchmark/NEON/Floor.cpp deleted file mode 100644 index f87e70c356..0000000000 --- a/tests/benchmark/NEON/Floor.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2017-2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/NEON/functions/NEFloor.h" -#include "arm_compute/runtime/Tensor.h" -#include "arm_compute/runtime/TensorAllocator.h" -#include "tests/NEON/Accessor.h" -#include "tests/benchmark/fixtures/FloorFixture.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_types = framework::dataset::make("DataType", { DataType::F32 }); -} // namespace - -using NEFloorFixture = FloorFixture; - -TEST_SUITE(NEON) - -REGISTER_FIXTURE_DATA_TEST_CASE(Floor, NEFloorFixture, framework::DatasetMode::ALL, - framework::dataset::combine(datasets::SmallShapes(), data_types)); - -TEST_SUITE_END() -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/NEON/FullyConnectedLayer.cpp b/tests/benchmark/NEON/FullyConnectedLayer.cpp deleted file mode 100644 index d0fb04f000..0000000000 --- a/tests/benchmark/NEON/FullyConnectedLayer.cpp +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (c) 2017-2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/NEON/functions/NEFullyConnectedLayer.h" -#include "arm_compute/runtime/Tensor.h" -#include "arm_compute/runtime/TensorAllocator.h" -#include "tests/NEON/Accessor.h" -#include "tests/benchmark/fixtures/FullyConnectedLayerFixture.h" -#include "tests/datasets/system_tests/alexnet/AlexNetFullyConnectedLayerDataset.h" -#include "tests/datasets/system_tests/googlenet/inceptionv1/GoogLeNetInceptionV1FullyConnectedLayerDataset.h" -#include "tests/datasets/system_tests/googlenet/inceptionv4/GoogLeNetInceptionV4FullyConnectedLayerDataset.h" -#include "tests/datasets/system_tests/lenet5/LeNet5FullyConnectedLayerDataset.h" -#include "tests/datasets/system_tests/vgg/vgg16/VGG16FullyConnectedLayerDataset.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -#ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC -const auto data_types = framework::dataset::make("DataType", { DataType::F16, DataType::F32 }); -#else /* __ARM_FEATURE_FP16_VECTOR_ARITHMETIC */ -const auto data_types = framework::dataset::make("DataType", { DataType::F32 }); -#endif /* __ARM_FEATURE_FP16_VECTOR_ARITHMETIC */ -} // namespace - -using NEFullyConnectedLayerFixture = FullyConnectedLayerFixture; - -TEST_SUITE(NEON) - -REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetFullyConnectedLayer, NEFullyConnectedLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::AlexNetFullyConnectedLayerDataset(), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(LeNet5FullyConnectedLayer, NEFullyConnectedLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::LeNet5FullyConnectedLayerDataset(), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(VGG16FullyConnectedLayer, NEFullyConnectedLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::VGG16FullyConnectedLayerDataset(), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV1FullyConnectedLayer, NEFullyConnectedLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV1FullyConnectedLayerDataset(), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV4FullyConnectedLayer, NEFullyConnectedLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV4FullyConnectedLayerDataset(), - data_types), - framework::dataset::make("Batches", 1))); - -TEST_SUITE(NIGHTLY) -REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetFullyConnectedLayer, NEFullyConnectedLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(datasets::AlexNetFullyConnectedLayerDataset(), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(LeNet5FullyConnectedLayer, NEFullyConnectedLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(datasets::LeNet5FullyConnectedLayerDataset(), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(VGG16FullyConnectedLayer, NEFullyConnectedLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(datasets::VGG16FullyConnectedLayerDataset(), - data_types), - framework::dataset::make("Batches", { 2 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV1FullyConnectedLayer, NEFullyConnectedLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV1FullyConnectedLayerDataset(), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV4FullyConnectedLayer, NEFullyConnectedLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV4FullyConnectedLayerDataset(), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); -TEST_SUITE_END() -TEST_SUITE_END() -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/NEON/GEMM.cpp b/tests/benchmark/NEON/GEMM.cpp deleted file mode 100644 index 2a57ace269..0000000000 --- a/tests/benchmark/NEON/GEMM.cpp +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2017-2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/NEON/functions/NEGEMM.h" -#include "arm_compute/runtime/Tensor.h" -#include "arm_compute/runtime/TensorAllocator.h" -#include "tests/NEON/Accessor.h" -#include "tests/benchmark/fixtures/GEMMFixture.h" -#include "tests/datasets/GoogleNetGEMMDataset.h" -#include "tests/datasets/MatrixMultiplyGEMMDataset.h" -#include "tests/datasets/system_tests/googlenet/inceptionv1/GoogLeNetInceptionV1GEMMDataset.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_types = framework::dataset::make("DataType", -{ -#if __ARM_FEATURE_FP16_VECTOR_ARITHMETIC - DataType::F16, -#endif /* __ARM_FEATURE_FP16_VECTOR_ARITHMETIC */ - DataType::F32 -}); -const auto reshape_b_only_once = framework::dataset::make("ReshapeBOnlyOnce", { false, true }); -} // namespace - -using NEGEMMFixture = GEMMFixture; - -TEST_SUITE(NEON) - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV1GEMM, NEGEMMFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV1GEMMDataset(), - data_types), - reshape_b_only_once)); -REGISTER_FIXTURE_DATA_TEST_CASE(MatrixMultiplyGEMM, NEGEMMFixture, framework::DatasetMode::ALL, framework::dataset::combine(framework::dataset::combine(datasets::MatrixMultiplyGEMMDataset(), - data_types), - reshape_b_only_once)); -REGISTER_FIXTURE_DATA_TEST_CASE(GoogleNetGEMM, NEGEMMFixture, framework::DatasetMode::NIGHTLY, framework::dataset::combine(framework::dataset::combine(datasets::GoogleNetGEMMDataset(), - data_types), - reshape_b_only_once)); - -TEST_SUITE_END() -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/NEON/GEMMLowp.cpp b/tests/benchmark/NEON/GEMMLowp.cpp deleted file mode 100644 index 4b13f31147..0000000000 --- a/tests/benchmark/NEON/GEMMLowp.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2017-2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/NEON/functions/NEGEMMLowpMatrixMultiplyCore.h" -#include "arm_compute/runtime/Tensor.h" -#include "arm_compute/runtime/TensorAllocator.h" -#include "tests/NEON/Accessor.h" -#include "tests/benchmark/fixtures/GEMMLowpFixture.h" -#include "tests/datasets/GoogleNetGEMMDataset.h" -#include "tests/datasets/MatrixMultiplyGEMMDataset.h" -#include "tests/datasets/system_tests/googlenet/inceptionv1/GoogLeNetInceptionV1GEMMDataset.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -using NEGEMMLowpFixture = GEMMLowpMatrixMultiplyCoreFixture; - -TEST_SUITE(NEON) - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV1GEMMLowp, NEGEMMLowpFixture, framework::DatasetMode::ALL, datasets::GoogLeNetInceptionV1GEMMDataset()); -REGISTER_FIXTURE_DATA_TEST_CASE(MatrixMultiplyGEMMLowp, NEGEMMLowpFixture, framework::DatasetMode::ALL, datasets::MatrixMultiplyGEMMDataset()); -REGISTER_FIXTURE_DATA_TEST_CASE(GoogleNetGEMMLowp, NEGEMMLowpFixture, framework::DatasetMode::NIGHTLY, datasets::GoogleNetGEMMDataset()); - -TEST_SUITE_END() -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/NEON/GaussianPyramid.cpp b/tests/benchmark/NEON/GaussianPyramid.cpp deleted file mode 100644 index a62819f25f..0000000000 --- a/tests/benchmark/NEON/GaussianPyramid.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/NEON/functions/NEGaussianPyramid.h" -#include "arm_compute/runtime/Tensor.h" -#include "tests/NEON/Accessor.h" -#include "tests/benchmark/fixtures/GaussianPyramidFixture.h" -#include "tests/datasets/BorderModeDataset.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -TEST_SUITE(NEON) -TEST_SUITE(GaussianPyramid) -TEST_SUITE(Half) - -using NEGaussianPyramidFixture = GaussianPyramidHalfFixture; - -// *INDENT-OFF* -// clang-format off -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, NEGaussianPyramidFixture, framework::DatasetMode::PRECOMMIT, - combine( - datasets::Medium2DShapes(), - datasets::BorderModes()) * framework::dataset::make("numlevels", 2, 4)); - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, NEGaussianPyramidFixture, framework::DatasetMode::NIGHTLY, - combine( - datasets::Large2DShapes(), - datasets::BorderModes()) * framework::dataset::make("numlevels", 2, 5)); -// clang-format on -// *INDENT-ON* - -TEST_SUITE_END() // Half -TEST_SUITE_END() // GaussianPyramid -TEST_SUITE_END() // NEON -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/NEON/HOGDescriptor.cpp b/tests/benchmark/NEON/HOGDescriptor.cpp deleted file mode 100644 index daf201fd63..0000000000 --- a/tests/benchmark/NEON/HOGDescriptor.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/runtime/HOG.h" -#include "arm_compute/runtime/NEON/functions/NEHOGDescriptor.h" -#include "arm_compute/runtime/Tensor.h" -#include "tests/NEON/Accessor.h" -#include "tests/benchmark/fixtures/HOGDescriptorFixture.h" -#include "tests/datasets/HOGDescriptorDataset.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -using NEHOGDescriptorFixture = HOGDescriptorFixture; - -TEST_SUITE(NEON) -TEST_SUITE(HOGDescriptor) - -// *INDENT-OFF* -// clang-format off -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, NEHOGDescriptorFixture, framework::DatasetMode::PRECOMMIT, - combine(combine( - datasets::SmallHOGDescriptorDataset(), - framework::dataset::make("Format", { Format::U8 })), - framework::dataset::make("BorderMode", {BorderMode::CONSTANT, BorderMode::REPLICATE}))); - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, NEHOGDescriptorFixture, framework::DatasetMode::NIGHTLY, - combine(combine( - datasets::LargeHOGDescriptorDataset(), - framework::dataset::make("Format", { Format::U8 })), - framework::dataset::make("BorderMode", {BorderMode::CONSTANT, BorderMode::REPLICATE}))); -// clang-format on -// *INDENT-ON* - -TEST_SUITE_END() // HOGDescriptor -TEST_SUITE_END() // NEON -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/NEON/HOGDetector.cpp b/tests/benchmark/NEON/HOGDetector.cpp deleted file mode 100644 index 3ab9fae2fc..0000000000 --- a/tests/benchmark/NEON/HOGDetector.cpp +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/Array.h" -#include "arm_compute/runtime/NEON/functions/NEHOGDescriptor.h" -#include "arm_compute/runtime/NEON/functions/NEHOGDetector.h" -#include "arm_compute/runtime/Tensor.h" -#include "tests/NEON/Accessor.h" -#include "tests/NEON/HOGAccessor.h" -#include "tests/benchmark/fixtures/HOGDetectorFixture.h" -#include "tests/datasets/HOGDescriptorDataset.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -/* Input dataset (values must be a multiple of the HOGInfo block_size) */ -const auto DetectionWindowStrideDataset = framework::dataset::make("DetectionWindowStride", { Size2D(8, 8), Size2D(16, 16) }); -} // namespace - -TEST_SUITE(NEON) -TEST_SUITE(HOGDetector) - -using NEHOGDetectorFixture = HOGDetectorFixture; - -// *INDENT-OFF* -// clang-format off -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, NEHOGDetectorFixture, framework::DatasetMode::PRECOMMIT, - combine(combine(combine( - DetectionWindowStrideDataset, - datasets::SmallHOGDescriptorDataset()), - framework::dataset::make("Format", Format::U8)), - framework::dataset::make("BorderMode", {BorderMode::CONSTANT, BorderMode::REPLICATE}))); - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, NEHOGDetectorFixture, framework::DatasetMode::NIGHTLY, - combine(combine(combine( - DetectionWindowStrideDataset, - datasets::LargeHOGDescriptorDataset()), - framework::dataset::make("Format", Format::U8)), - framework::dataset::make("BorderMode", {BorderMode::CONSTANT, BorderMode::REPLICATE}))); -// clang-format on -// *INDENT-ON* - -TEST_SUITE_END() // HOGDetector -TEST_SUITE_END() // NEON -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/NEON/HOGMultiDetection.cpp b/tests/benchmark/NEON/HOGMultiDetection.cpp deleted file mode 100644 index c0b9d1d8cf..0000000000 --- a/tests/benchmark/NEON/HOGMultiDetection.cpp +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/MultiHOG.h" -#include "arm_compute/runtime/NEON/functions/NEHOGMultiDetection.h" -#include "arm_compute/runtime/Tensor.h" -#include "tests/NEON/Accessor.h" -#include "tests/NEON/ArrayAccessor.h" -#include "tests/NEON/HOGAccessor.h" -#include "tests/benchmark/fixtures/HOGMultiDetectionFixture.h" -#include "tests/datasets/HOGMultiDetectionDataset.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -// *INDENT-OFF* -// clang-format off -using NEHOGMultiDetectionFixture = HOGMultiDetectionFixture>; -TEST_SUITE(NEON) -TEST_SUITE(HOGMultiDetection) - -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, NEHOGMultiDetectionFixture, framework::DatasetMode::PRECOMMIT, - combine(combine(combine( - datasets::SmallHOGMultiDetectionDataset(), - framework::dataset::make("Format", Format::U8)), - framework::dataset::make("BorderMode", {BorderMode::CONSTANT, BorderMode::REPLICATE})), - framework::dataset::make("NonMaximaSuppression", {false, true}))); - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, NEHOGMultiDetectionFixture, framework::DatasetMode::NIGHTLY, - combine(combine(combine( - datasets::LargeHOGMultiDetectionDataset(), - framework::dataset::make("Format", Format::U8)), - framework::dataset::make("BorderMode", {BorderMode::CONSTANT, BorderMode::REPLICATE})), - framework::dataset::make("NonMaximaSuppression", {false, true}))); -// clang-format on -// *INDENT-ON* - -TEST_SUITE_END() // HOGMultiDetection -TEST_SUITE_END() // NEON -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/NEON/HarrisCorners.cpp b/tests/benchmark/NEON/HarrisCorners.cpp deleted file mode 100644 index 75a6794cc5..0000000000 --- a/tests/benchmark/NEON/HarrisCorners.cpp +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/NEON/functions/NEHarrisCorners.h" -#include "arm_compute/runtime/Tensor.h" -#include "arm_compute/runtime/TensorAllocator.h" -#include "tests/NEON/Accessor.h" -#include "tests/benchmark/fixtures/HarrisCornersFixture.h" -#include "tests/datasets/ImageFileDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto threshold = framework::dataset::make("Threshold", { 0.00115f }); -const auto min_dist = framework::dataset::make("MinDist", { 2.f }); -const auto sensitivity = framework::dataset::make("Sensitivity", { 0.04f }); -const auto gradient_size = framework::dataset::make("GradientSize", { 3, 5, 7 }); -const auto block_size = framework::dataset::make("BlockSize", { 3, 5, 7 }); -const auto border_mode = framework::dataset::make("BorderMode", { BorderMode::UNDEFINED, BorderMode::CONSTANT, BorderMode::REPLICATE }); -} // namespace - -using NEHarrisCornersFixture = HarrisCornersFixture; - -TEST_SUITE(NEON) -TEST_SUITE(HarrisCorners) - -TEST_SUITE(S16) -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, NEHarrisCornersFixture, framework::DatasetMode::PRECOMMIT, combine(combine(combine(combine(combine(combine(combine(datasets::SmallImageFiles(), - framework::dataset::make("Format", { Format::U8 })), - threshold), - min_dist), - sensitivity), - gradient_size), - block_size), - border_mode)); -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, NEHarrisCornersFixture, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(combine(combine(combine(datasets::LargeImageFiles(), - framework::dataset::make("Format", { Format::U8 })), - threshold), - min_dist), - sensitivity), - gradient_size), - block_size), - border_mode)); -TEST_SUITE_END() // S16 -TEST_SUITE_END() // HarrisCorners -TEST_SUITE_END() // NEON -} // namespace benchmark -} // namespace test -} // namespace arm_compute \ No newline at end of file diff --git a/tests/benchmark/NEON/Histogram.cpp b/tests/benchmark/NEON/Histogram.cpp deleted file mode 100644 index 77e385c879..0000000000 --- a/tests/benchmark/NEON/Histogram.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/Distribution1D.h" -#include "arm_compute/runtime/NEON/functions/NEHistogram.h" -#include "arm_compute/runtime/Tensor.h" -#include "tests/NEON/Accessor.h" -#include "tests/benchmark/fixtures/HistogramFixture.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -using NEHistogramFixture = HistogramFixture; - -// *INDENT-OFF* -// clang-format off -TEST_SUITE(NEON) -TEST_SUITE(Histogram) -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, NEHistogramFixture, framework::DatasetMode::PRECOMMIT, - combine( - datasets::Small2DShapes(), - framework::dataset::make("Format", Format::U8))); - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, NEHistogramFixture, framework::DatasetMode::PRECOMMIT, - combine( - datasets::Large2DShapes(), - framework::dataset::make("Format", Format::U8))); -// clang-format on -// *INDENT-ON* - -TEST_SUITE_END() // Histogram -TEST_SUITE_END() // NEON -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/NEON/IntegralImage.cpp b/tests/benchmark/NEON/IntegralImage.cpp deleted file mode 100644 index b9f7666d44..0000000000 --- a/tests/benchmark/NEON/IntegralImage.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/NEON/functions/NEIntegralImage.h" -#include "arm_compute/runtime/Tensor.h" -#include "tests/NEON/Accessor.h" -#include "tests/benchmark/fixtures/IntegralImageFixture.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -using NEIntegralImageFixture = IntegralImageFixture; - -TEST_SUITE(NEON) -TEST_SUITE(IntegralImage) - -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, NEIntegralImageFixture, framework::DatasetMode::PRECOMMIT, datasets::SmallImageShapes()); -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, NEIntegralImageFixture, framework::DatasetMode::NIGHTLY, datasets::LargeImageShapes()); - -TEST_SUITE_END() // IntegralImage -TEST_SUITE_END() // NEON -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/NEON/L2NormalizeLayer.cpp b/tests/benchmark/NEON/L2NormalizeLayer.cpp deleted file mode 100644 index 164c64b2aa..0000000000 --- a/tests/benchmark/NEON/L2NormalizeLayer.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2017-2019 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/NEON/functions/NEL2NormalizeLayer.h" -#include "arm_compute/runtime/Tensor.h" -#include "arm_compute/runtime/TensorAllocator.h" -#include "tests/NEON/Accessor.h" -#include "tests/benchmark/fixtures/L2NormalizeLayerFixture.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_types = framework::dataset::make("DataType", { DataType::F32 }); -} // namespace - -using NEL2NormalizeLayerFixture = L2NormalizeLayerFixture; - -TEST_SUITE(NEON) - -REGISTER_FIXTURE_DATA_TEST_CASE(L2NormalizeLayer, NEL2NormalizeLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::SmallShapes(), data_types), framework::dataset::make("Axis", { 0, 1, 2 }))); -TEST_SUITE(NIGHTLY) -REGISTER_FIXTURE_DATA_TEST_CASE(L2NormalizeLayer, NEL2NormalizeLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(datasets::LargeShapes(), data_types), framework::dataset::make("Axis", { 0, 1, 2 }))); -TEST_SUITE_END() -TEST_SUITE_END() -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/NEON/LaplacianPyramid.cpp b/tests/benchmark/NEON/LaplacianPyramid.cpp deleted file mode 100644 index e314aff01b..0000000000 --- a/tests/benchmark/NEON/LaplacianPyramid.cpp +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/NEON/functions/NELaplacianPyramid.h" -#include "arm_compute/runtime/Tensor.h" -#include "tests/NEON/Accessor.h" -#include "tests/benchmark/fixtures/LaplacianPyramidFixture.h" -#include "tests/datasets/BorderModeDataset.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto small_laplacian_pyramid_levels = framework::dataset::make("NumLevels", 2, 3); -const auto large_laplacian_pyramid_levels = framework::dataset::make("NumLevels", 2, 5); - -const auto formats = combine(framework::dataset::make("FormatIn", Format::U8), framework::dataset::make("FormatOut", Format::S16)); -} // namespace - -using NELaplacianPyramidFixture = LaplacianPyramidFixture; - -TEST_SUITE(NEON) -TEST_SUITE(LaplacianPyramid) - -// *INDENT-OFF* -// clang-format off -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, NELaplacianPyramidFixture, framework::DatasetMode::PRECOMMIT, - combine(combine(combine( - datasets::Medium2DShapes(), - datasets::BorderModes()), - small_laplacian_pyramid_levels), - formats)); - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, NELaplacianPyramidFixture, framework::DatasetMode::NIGHTLY, - combine(combine(combine( - datasets::Large2DShapes(), - datasets::BorderModes()), - large_laplacian_pyramid_levels), - formats)); -// clang-format on -// *INDENT-ON* - -TEST_SUITE_END() // LaplacianPyramid -TEST_SUITE_END() // NEON -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/NEON/LaplacianReconstruct.cpp b/tests/benchmark/NEON/LaplacianReconstruct.cpp deleted file mode 100644 index 602923b9e7..0000000000 --- a/tests/benchmark/NEON/LaplacianReconstruct.cpp +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/NEON/functions/NELaplacianPyramid.h" -#include "arm_compute/runtime/NEON/functions/NELaplacianReconstruct.h" -#include "arm_compute/runtime/Tensor.h" -#include "tests/NEON/Accessor.h" -#include "tests/benchmark/fixtures/LaplacianReconstructFixture.h" -#include "tests/datasets/BorderModeDataset.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto small_laplacian_reconstruct_levels = framework::dataset::make("NumLevels", 2, 3); -const auto large_laplacian_reconstruct_levels = framework::dataset::make("NumLevels", 2, 5); - -const auto formats = combine(framework::dataset::make("FormatIn", Format::S16), framework::dataset::make("FormatOut", Format::U8)); -} // namespace - -// *INDENT-OFF* -// clang-format off -using NELaplacianReconstructFixture = LaplacianReconstructFixture; - -TEST_SUITE(NEON) -TEST_SUITE(LaplacianReconstruct) - -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, NELaplacianReconstructFixture, framework::DatasetMode::PRECOMMIT, - combine(combine(combine( - datasets::Medium2DShapes(), - datasets::BorderModes()), - small_laplacian_reconstruct_levels), - formats)); - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, NELaplacianReconstructFixture, framework::DatasetMode::PRECOMMIT, - combine(combine(combine( - datasets::Large2DShapes(), - datasets::BorderModes()), - large_laplacian_reconstruct_levels), - formats)); - -// clang-format on -// *INDENT-ON* - -TEST_SUITE_END() // LaplacianReconstruct -TEST_SUITE_END() // NEON -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/NEON/LocallyConnectedLayer.cpp b/tests/benchmark/NEON/LocallyConnectedLayer.cpp deleted file mode 100644 index 460909390e..0000000000 --- a/tests/benchmark/NEON/LocallyConnectedLayer.cpp +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/NEON/functions/NELocallyConnectedLayer.h" -#include "arm_compute/runtime/Tensor.h" -#include "arm_compute/runtime/TensorAllocator.h" -#include "tests/NEON/Accessor.h" -#include "tests/benchmark/fixtures/LocallyConnectedLayerFixture.h" -#include "tests/datasets/LocallyConnectedDataset.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_types = framework::dataset::make("DataType", { DataType::F32 }); -} // namespace - -using NELocallyConnectedLayerFixture = LocallyConnectedLayerFixture; - -TEST_SUITE(NEON) -TEST_SUITE(LocallyConnectedLayer) - -// *INDENT-OFF* -// clang-format off -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, NELocallyConnectedLayerFixture, framework::DatasetMode::ALL, - combine(combine( - datasets::SmallLocallyConnectedDataset(), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, NELocallyConnectedLayerFixture, framework::DatasetMode::NIGHTLY, - combine(combine( - datasets::SmallLocallyConnectedDataset(), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); -// clang-format on -// *INDENT-ON* - -TEST_SUITE_END() // LocallyConnectedLayer -TEST_SUITE_END() // NEON -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/NEON/Magnitude.cpp b/tests/benchmark/NEON/Magnitude.cpp deleted file mode 100644 index d671b8e005..0000000000 --- a/tests/benchmark/NEON/Magnitude.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2017-2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/NEON/functions/NEMagnitude.h" -#include "arm_compute/runtime/Tensor.h" -#include "arm_compute/runtime/TensorAllocator.h" -#include "tests/NEON/Accessor.h" -#include "tests/benchmark/fixtures/MagnitudeFixture.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto magnitude_types = framework::dataset::make("MagnitudeType", { MagnitudeType::L1NORM, MagnitudeType::L2NORM }); -} // namespace - -using NEMagnitudeFixture = MagnitudeFixture; - -TEST_SUITE(NEON) -TEST_SUITE(Magnitude) -TEST_SUITE(S16) -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, NEMagnitudeFixture, framework::DatasetMode::PRECOMMIT, combine(combine(datasets::SmallImageShapes(), framework::dataset::make("Format", { Format::S16 })), - magnitude_types)); -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, NEMagnitudeFixture, framework::DatasetMode::NIGHTLY, combine(combine(datasets::LargeImageShapes(), framework::dataset::make("Format", { Format::S16 })), - magnitude_types)); -TEST_SUITE_END() // S16 -TEST_SUITE_END() // Magnitude -TEST_SUITE_END() // NEON -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/NEON/MeanStdDev.cpp b/tests/benchmark/NEON/MeanStdDev.cpp deleted file mode 100644 index 59cefb3358..0000000000 --- a/tests/benchmark/NEON/MeanStdDev.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/NEON/functions/NEMeanStdDev.h" -#include "arm_compute/runtime/Tensor.h" -#include "tests/NEON/Accessor.h" -#include "tests/benchmark/fixtures/MeanStdDevFixture.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -using NEMeanStdDevFixture = MeanStdDevFixture; - -TEST_SUITE(NEON) -TEST_SUITE(MeanStdDev) - -// *INDENT-OFF* -// clang-format off -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, NEMeanStdDevFixture, framework::DatasetMode::PRECOMMIT, - combine( - datasets::Small2DShapes(), - framework::dataset::make("Format", Format::U8))); - - - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, NEMeanStdDevFixture, framework::DatasetMode::NIGHTLY, - combine( - datasets::Large2DShapes(), - framework::dataset::make("Format", Format::U8))); -// clang-format on -// *INDENT-ON* - -TEST_SUITE_END() // MeanStdDev -TEST_SUITE_END() // NEON -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/NEON/Median3x3.cpp b/tests/benchmark/NEON/Median3x3.cpp deleted file mode 100644 index a8be29811d..0000000000 --- a/tests/benchmark/NEON/Median3x3.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/NEON/functions/NEMedian3x3.h" -#include "arm_compute/runtime/Tensor.h" -#include "tests/NEON/Accessor.h" -#include "tests/benchmark/fixtures/Median3x3Fixture.h" -#include "tests/datasets/BorderModeDataset.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -using NEMedian3x3Fixture = Median3x3Fixture; - -TEST_SUITE(NEON) -TEST_SUITE(Median3x3) - -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, NEMedian3x3Fixture, framework::DatasetMode::PRECOMMIT, - combine(datasets::SmallShapes(), datasets::BorderModes())); - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, NEMedian3x3Fixture, framework::DatasetMode::NIGHTLY, - combine(datasets::LargeShapes(), datasets::BorderModes())); - -TEST_SUITE_END() // Median3x3 -TEST_SUITE_END() // NEON -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/NEON/MinMaxLocation.cpp b/tests/benchmark/NEON/MinMaxLocation.cpp deleted file mode 100644 index 446370bdca..0000000000 --- a/tests/benchmark/NEON/MinMaxLocation.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/NEON/functions/NEMinMaxLocation.h" -#include "arm_compute/runtime/Tensor.h" -#include "tests/NEON/Accessor.h" -#include "tests/benchmark/fixtures/MinMaxLocationFixture.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_types = framework::dataset::make("DataType", { DataType::U8, DataType::S16, DataType::F32 }); -} // namespace - -using NEMinMaxLocationFixture = MinMaxLocationFixture; - -TEST_SUITE(NEON) -TEST_SUITE(MinMaxLocation) - -// *INDENT-OFF* -// clang-format off -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, NEMinMaxLocationFixture, framework::DatasetMode::PRECOMMIT, - combine(datasets::Small2DShapes(), data_types)); - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, NEMinMaxLocationFixture, framework::DatasetMode::NIGHTLY, - combine(datasets::Large2DShapes(), data_types)); -// clang-format on -// *INDENT-ON* -TEST_SUITE_END() // MinMaxLocation -TEST_SUITE_END() // NEON -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/NEON/NormalizationLayer.cpp b/tests/benchmark/NEON/NormalizationLayer.cpp deleted file mode 100644 index 0c9a864eec..0000000000 --- a/tests/benchmark/NEON/NormalizationLayer.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2017-2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/NEON/functions/NENormalizationLayer.h" -#include "arm_compute/runtime/Tensor.h" -#include "arm_compute/runtime/TensorAllocator.h" -#include "tests/NEON/Accessor.h" -#include "tests/benchmark/fixtures/NormalizationLayerFixture.h" -#include "tests/datasets/system_tests/alexnet/AlexNetNormalizationLayerDataset.h" -#include "tests/datasets/system_tests/googlenet/inceptionv1/GoogLeNetInceptionV1NormalizationLayerDataset.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -#ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC -const auto data_types = framework::dataset::make("DataType", { DataType::F16, DataType::F32 }); -#else /* __ARM_FEATURE_FP16_VECTOR_ARITHMETIC */ -const auto data_types = framework::dataset::make("DataType", { DataType::F32 }); -#endif /* __ARM_FEATURE_FP16_VECTOR_ARITHMETIC */ -} // namespace -using NENormalizationLayerFixture = NormalizationLayerFixture; - -TEST_SUITE(NEON) - -REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetNormalizationLayer, NENormalizationLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::AlexNetNormalizationLayerDataset(), - data_types), - framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV1NormalizationLayer, NENormalizationLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV1NormalizationLayerDataset(), - data_types), - framework::dataset::make("Batches", 1))); - -TEST_SUITE(NIGHTLY) -REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetNormalizationLayer, NENormalizationLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(datasets::AlexNetNormalizationLayerDataset(), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV1NormalizationLayer, NENormalizationLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV1NormalizationLayerDataset(), - data_types), - framework::dataset::make("Batches", { 4, 8 }))); -TEST_SUITE_END() -TEST_SUITE_END() -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/NEON/OpticalFlow.cpp b/tests/benchmark/NEON/OpticalFlow.cpp deleted file mode 100644 index 30672a1c14..0000000000 --- a/tests/benchmark/NEON/OpticalFlow.cpp +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/Array.h" -#include "arm_compute/runtime/NEON/functions/NEGaussianPyramid.h" -#include "arm_compute/runtime/NEON/functions/NEOpticalFlow.h" -#include "arm_compute/runtime/Tensor.h" -#include "tests/NEON/Accessor.h" -#include "tests/NEON/ArrayAccessor.h" -#include "tests/benchmark/fixtures/OpticalFlowFixture.h" -#include "tests/datasets/BorderModeDataset.h" -#include "tests/datasets/ImageFileDatasets.h" -#include "tests/datasets/OpticalFlowDataset.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -using NEOpticalFlowFixture = OpticalFlowFixture, Pyramid, NEGaussianPyramidHalf>; - -TEST_SUITE(NEON) -TEST_SUITE(OpticalFlow) - -// *INDENT-OFF* -// clang-format off -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, NEOpticalFlowFixture, framework::DatasetMode::PRECOMMIT, - combine(combine( - datasets::SmallOpticalFlowDataset(), - framework::dataset::make("Format", Format::U8)), - datasets::BorderModes())); - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, NEOpticalFlowFixture, framework::DatasetMode::NIGHTLY, - combine(combine( - datasets::LargeOpticalFlowDataset(), - framework::dataset::make("Format", Format::U8)), - datasets::BorderModes())); -// clang-format on -// *INDENT-ON* - -TEST_SUITE_END() // OpticalFlow -TEST_SUITE_END() // NEON -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/NEON/PadLayer.cpp b/tests/benchmark/NEON/PadLayer.cpp deleted file mode 100644 index c55c93b8a6..0000000000 --- a/tests/benchmark/NEON/PadLayer.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2019 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/NEON/functions/NEPadLayer.h" -#include "arm_compute/runtime/Tensor.h" -#include "arm_compute/runtime/TensorAllocator.h" -#include "tests/NEON/Accessor.h" -#include "tests/benchmark/fixtures/PadLayerFixture.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/datasets/SplitDataset.h" -#include "tests/framework/Asserts.h" -#include "tests/framework/Macros.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto Fssd_25_8bit_ShapesDataset = framework::dataset::make("TensorShape", -{ - TensorShape{ 320U, 320U, 3U }, - TensorShape{ 160U, 160U, 16U }, - TensorShape{ 80U, 80U, 32U }, - TensorShape{ 40U, 40U, 64U }, - TensorShape{ 20U, 20U, 128U }, - TensorShape{ 10U, 10U, 256U }, - TensorShape{ 10U, 10U, 64U }, - TensorShape{ 5U, 5U, 32U }, - TensorShape{ 3U, 3U, 32U }, - TensorShape{ 2U, 2U, 32U } -}); - -const auto PaddingSizesDataset = framework::dataset::make("PaddingSize", -{ - PaddingList{ { 1, 1 }, { 1, 1 } }, -}); -} // namespace - -TEST_SUITE(NEON) -TEST_SUITE(PadLayer) - -template -using NEPaddingFixture = PaddingFixture; - -REGISTER_FIXTURE_DATA_TEST_CASE(RunF32, NEPaddingFixture, framework::DatasetMode::ALL, - combine(combine(combine( - Fssd_25_8bit_ShapesDataset, - framework::dataset::make("DataType", { DataType::F32 })), - PaddingSizesDataset), - framework::dataset::make("PaddingMode", { PaddingMode::CONSTANT, PaddingMode::REFLECT }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(RunQASYMM8, NEPaddingFixture, framework::DatasetMode::ALL, - combine(combine(combine( - Fssd_25_8bit_ShapesDataset, - framework::dataset::make("DataType", { DataType::QASYMM8 })), - PaddingSizesDataset), - framework::dataset::make("PaddingMode", { PaddingMode::CONSTANT, PaddingMode::REFLECT }))); - -TEST_SUITE_END() // PadLayer -TEST_SUITE_END() // NEON -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/NEON/Phase.cpp b/tests/benchmark/NEON/Phase.cpp deleted file mode 100644 index 90cf30cdca..0000000000 --- a/tests/benchmark/NEON/Phase.cpp +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/NEON/functions/NEPhase.h" -#include "arm_compute/runtime/Tensor.h" -#include "tests/NEON/Accessor.h" -#include "tests/benchmark/fixtures/PhaseFixture.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto phase_types = framework::dataset::make("PhaseType", { PhaseType::SIGNED, PhaseType::UNSIGNED }); -} // namespace - -using NEPhaseFixture = PhaseFixture; - -TEST_SUITE(NEON) -TEST_SUITE(Phase) - -// *INDENT-OFF* -// clang-format off -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, NEPhaseFixture, framework::DatasetMode::PRECOMMIT, - combine(combine( - datasets::SmallImageShapes(), - framework::dataset::make("Format", { Format::S16 })), - phase_types)); - - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, NEPhaseFixture, framework::DatasetMode::NIGHTLY, - combine(combine( - datasets::LargeImageShapes(), - framework::dataset::make("Format", { Format::S16 })), - phase_types)); -// clang-format on -// *INDENT-ON* -TEST_SUITE_END() // Phase -TEST_SUITE_END() // NEON -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/NEON/PoolingLayer.cpp b/tests/benchmark/NEON/PoolingLayer.cpp deleted file mode 100644 index 8b7ee84304..0000000000 --- a/tests/benchmark/NEON/PoolingLayer.cpp +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (c) 2017-2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/NEON/functions/NEPoolingLayer.h" -#include "arm_compute/runtime/Tensor.h" -#include "arm_compute/runtime/TensorAllocator.h" -#include "tests/NEON/Accessor.h" -#include "tests/benchmark/fixtures/PoolingLayerFixture.h" -#include "tests/datasets/system_tests/alexnet/AlexNetPoolingLayerDataset.h" -#include "tests/datasets/system_tests/googlenet/inceptionv1/GoogLeNetInceptionV1PoolingLayerDataset.h" -#include "tests/datasets/system_tests/googlenet/inceptionv4/GoogLeNetInceptionV4PoolingLayerDataset.h" -#include "tests/datasets/system_tests/lenet5/LeNet5PoolingLayerDataset.h" -#include "tests/datasets/system_tests/squeezenet/SqueezeNetPoolingLayerDataset.h" -#include "tests/datasets/system_tests/vgg/vgg16/VGG16PoolingLayerDataset.h" -#include "tests/datasets/system_tests/yolo/v2/YOLOV2PoolingLayerDataset.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_layouts = framework::dataset::make("DataLayout", { DataLayout::NCHW, DataLayout::NHWC }); -#ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC -const auto data_types = framework::dataset::make("DataType", { DataType::F16, DataType::F32, DataType::QASYMM8 }); -#else /* __ARM_FEATURE_FP16_VECTOR_ARITHMETIC */ -const auto data_types = framework::dataset::make("DataType", { DataType::F32, DataType::QASYMM8 }); -#endif /* __ARM_FEATURE_FP16_VECTOR_ARITHMETIC */ -} // namespace - -using NEPoolingLayerFixture = PoolingLayerFixture; - -TEST_SUITE(NEON) - -REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetPoolingLayer, NEPoolingLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::AlexNetPoolingLayerDataset(), data_types), data_layouts), framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(LeNet5PoolingLayer, NEPoolingLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::LeNet5PoolingLayerDataset(), data_types), data_layouts), framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV1PoolingLayer, NEPoolingLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV1PoolingLayerDataset(), data_types), data_layouts), framework::dataset::make("Batches", - 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV4PoolingLayer, NEPoolingLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV4PoolingLayerDataset(), data_types), data_layouts), framework::dataset::make("Batches", - 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(SqueezeNetPoolingLayer, NEPoolingLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::SqueezeNetPoolingLayerDataset(), data_types), data_layouts), framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(VGG16PoolingLayer, NEPoolingLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::VGG16PoolingLayerDataset(), data_types), data_layouts), framework::dataset::make("Batches", 1))); - -REGISTER_FIXTURE_DATA_TEST_CASE(YOLOV2PoolingLayer, NEPoolingLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::YOLOV2PoolingLayerDataset(), data_types), data_layouts), framework::dataset::make("Batches", 1))); - -TEST_SUITE(NIGHTLY) -REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetPoolingLayer, NEPoolingLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::AlexNetPoolingLayerDataset(), data_types), data_layouts), framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(LeNet5PoolingLayer, NEPoolingLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::LeNet5PoolingLayerDataset(), data_types), data_layouts), framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV1PoolingLayer, NEPoolingLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV1PoolingLayerDataset(), data_types), data_layouts), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV4PoolingLayer, NEPoolingLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV4PoolingLayerDataset(), data_types), data_layouts), - framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(SqueezeNetPoolingLayer, NEPoolingLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::SqueezeNetPoolingLayerDataset(), data_types), data_layouts), framework::dataset::make("Batches", { 4, 8 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(VGG16PoolingLayer, NEPoolingLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::VGG16PoolingLayerDataset(), data_types), data_layouts), framework::dataset::make("Batches", { 2 }))); - -REGISTER_FIXTURE_DATA_TEST_CASE(YOLOV2PoolingLayer, NEPoolingLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::combine(framework::dataset::combine(datasets::YOLOV2PoolingLayerDataset(), data_types), data_layouts), framework::dataset::make("Batches", { 4, 8 }))); -TEST_SUITE_END() -TEST_SUITE_END() -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/NEON/QuantizationLayer.cpp b/tests/benchmark/NEON/QuantizationLayer.cpp deleted file mode 100644 index 8db67287d2..0000000000 --- a/tests/benchmark/NEON/QuantizationLayer.cpp +++ /dev/null @@ -1,56 +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. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/NEON/functions/NEQuantizationLayer.h" -#include "arm_compute/runtime/Tensor.h" -#include "arm_compute/runtime/TensorAllocator.h" -#include "tests/NEON/Accessor.h" -#include "tests/benchmark/fixtures/QuantizationLayerFixture.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_types = framework::dataset::make("DataType", { DataType::F32 }); -} // namespace - -using NEQuantizationLayerFixture = QuantizationLayerFixture; - -TEST_SUITE(NEON) - -REGISTER_FIXTURE_DATA_TEST_CASE(QuantizationLayer, NEQuantizationLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(datasets::Small3DShapes(), data_types)); - -TEST_SUITE_END() -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/NEON/ROIPoolingLayer.cpp b/tests/benchmark/NEON/ROIPoolingLayer.cpp deleted file mode 100644 index 10652a5606..0000000000 --- a/tests/benchmark/NEON/ROIPoolingLayer.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2017-2019 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/Array.h" -#include "arm_compute/runtime/NEON/functions/NEROIPoolingLayer.h" -#include "arm_compute/runtime/Tensor.h" -#include "arm_compute/runtime/TensorAllocator.h" -#include "tests/NEON/Accessor.h" -#include "tests/NEON/ArrayAccessor.h" -#include "tests/benchmark/fixtures/ROIPoolingLayerFixture.h" -#include "tests/datasets/ROIDataset.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -template -using NEROIPoolingLayerFixture = ROIPoolingLayerFixture; - -TEST_SUITE(NEON) - -REGISTER_FIXTURE_DATA_TEST_CASE(SmallROIPoolingLayerFloat, NEROIPoolingLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::SmallROIDataset(), - framework::dataset::make("DataType", { DataType::F32 })), - framework::dataset::make("Batches", { 1, 4, 8 }))); - -TEST_SUITE_END() // NEON -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/NEON/Remap.cpp b/tests/benchmark/NEON/Remap.cpp deleted file mode 100644 index 187aeb7927..0000000000 --- a/tests/benchmark/NEON/Remap.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/NEON/functions/NERemap.h" -#include "arm_compute/runtime/Tensor.h" -#include "tests/NEON/Accessor.h" -#include "tests/benchmark/fixtures/RemapFixture.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto interpolation_policies = framework::dataset::make("InterpolationPolicy", { InterpolationPolicy::NEAREST_NEIGHBOR, InterpolationPolicy::BILINEAR }); -const auto border_modes = framework::dataset::make("BorderModes", { BorderMode::UNDEFINED, BorderMode::CONSTANT }); -const auto remap_data = interpolation_policies * framework::dataset::make("DataType", DataType::U8) * border_modes; -} // namespace - -using NERemapFixture = RemapFixture; - -TEST_SUITE(NEON) -TEST_SUITE(Remap) - -// *INDENT-OFF* -// clang-format off -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, NERemapFixture, framework::DatasetMode::PRECOMMIT, - combine( datasets::SmallShapes(), remap_data)); - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, NERemapFixture, framework::DatasetMode::NIGHTLY, - combine( datasets::LargeShapes(), remap_data)); -// clang-format on -// *INDENT-ON* - -TEST_SUITE_END() // Remap -TEST_SUITE_END() // NEON -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/NEON/ReshapeLayer.cpp b/tests/benchmark/NEON/ReshapeLayer.cpp deleted file mode 100644 index 46985e020a..0000000000 --- a/tests/benchmark/NEON/ReshapeLayer.cpp +++ /dev/null @@ -1,57 +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. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/NEON/functions/NEReshapeLayer.h" -#include "arm_compute/runtime/Tensor.h" -#include "arm_compute/runtime/TensorAllocator.h" -#include "tests/NEON/Accessor.h" -#include "tests/benchmark/fixtures/ReshapeLayerFixture.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_types = framework::dataset::make("DataType", { DataType::U8, DataType::U16, DataType::U32, DataType::F16, DataType::F32 }); -} // namespace - -using NEReshapeLayerFixture = ReshapeLayerFixture; - -TEST_SUITE(NEON) - -REGISTER_FIXTURE_DATA_TEST_CASE(Reshape, NEReshapeLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(datasets::SmallShapes(), data_types)); - -TEST_SUITE_END() -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/NEON/Scale.cpp b/tests/benchmark/NEON/Scale.cpp index b75d1a6464..3a6ebcdade 100644 --- a/tests/benchmark/NEON/Scale.cpp +++ b/tests/benchmark/NEON/Scale.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 ARM Limited. + * Copyright (c) 2017-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -54,11 +54,6 @@ REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, NEScaleFixture, framework::DatasetMode interpolation_types), datasets::BorderModes()), framework::dataset::make("SamplingPolicy", { SamplingPolicy::CENTER }))); -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, NEScaleFixture, framework::DatasetMode::NIGHTLY, combine(combine(combine(combine(combine(datasets::LargeImageShapes(), framework::dataset::make("DataType", { DataType::U8, DataType::S16, DataType::F32 })), - framework::dataset::make("DataLayout", { DataLayout::NCHW })), - interpolation_types), - datasets::BorderModes()), - framework::dataset::make("SamplingPolicy", { SamplingPolicy::CENTER }))); TEST_SUITE_END() // Scale TEST_SUITE_END() // NEON } // namespace benchmark diff --git a/tests/benchmark/NEON/Sobel.cpp b/tests/benchmark/NEON/Sobel.cpp deleted file mode 100644 index 8afda38c01..0000000000 --- a/tests/benchmark/NEON/Sobel.cpp +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/NEON/functions/NESobel3x3.h" -#include "arm_compute/runtime/NEON/functions/NESobel5x5.h" -#include "arm_compute/runtime/NEON/functions/NESobel7x7.h" -#include "arm_compute/runtime/Tensor.h" -#include "tests/NEON/Accessor.h" -#include "tests/benchmark/fixtures/SobelFixture.h" -#include "tests/datasets/BorderModeDataset.h" -#include "tests/datasets/GradientDimensionDataset.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -using NESobel3x3Fixture = SobelFixture; - -TEST_SUITE(NEON) -TEST_SUITE(Sobel) - -// *INDENT-OFF* -// clang-format off -TEST_SUITE(W3x3) -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, NESobel3x3Fixture, framework::DatasetMode::PRECOMMIT, - combine(combine(combine( - datasets::Small2DShapes(), - datasets::BorderModes()), - datasets::GradientDimensions()), - framework::dataset::make("Format", Format::U8))); - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, NESobel3x3Fixture, framework::DatasetMode::NIGHTLY, - combine(combine(combine( - datasets::Large2DShapes(), - datasets::BorderModes()), - datasets::GradientDimensions()), - framework::dataset::make("Format", Format::U8))); -TEST_SUITE_END() // W3x3 - -using NESobel5x5Fixture = SobelFixture; - -TEST_SUITE(W5x5) -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, NESobel5x5Fixture, framework::DatasetMode::PRECOMMIT, - combine(combine(combine( - datasets::Small2DShapes(), - datasets::BorderModes()), - datasets::GradientDimensions()), - framework::dataset::make("Format", Format::U8))); - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, NESobel5x5Fixture, framework::DatasetMode::NIGHTLY, - combine(combine(combine( - datasets::Large2DShapes(), - datasets::BorderModes()), - datasets::GradientDimensions()), - framework::dataset::make("Format", Format::U8))); -TEST_SUITE_END() // W5x5 - -using NESobel7x7Fixture = SobelFixture; - -TEST_SUITE(W7x7) -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, NESobel7x7Fixture, framework::DatasetMode::PRECOMMIT, - combine(combine(combine( - datasets::Small2DShapes(), - datasets::BorderModes()), - datasets::GradientDimensions()), - framework::dataset::make("Format", Format::U8))); - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, NESobel7x7Fixture, framework::DatasetMode::NIGHTLY, - combine(combine(combine( - datasets::Large2DShapes(), - datasets::BorderModes()), - datasets::GradientDimensions()), - framework::dataset::make("Format", Format::U8))); -TEST_SUITE_END() // W7x7 -// clang-format on -// *INDENT-ON* - -TEST_SUITE_END() // Sobel -TEST_SUITE_END() // NEON -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/NEON/SoftmaxLayer.cpp b/tests/benchmark/NEON/SoftmaxLayer.cpp deleted file mode 100644 index 06c990b561..0000000000 --- a/tests/benchmark/NEON/SoftmaxLayer.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2017-2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/NEON/functions/NESoftmaxLayer.h" -#include "arm_compute/runtime/Tensor.h" -#include "arm_compute/runtime/TensorAllocator.h" -#include "tests/NEON/Accessor.h" -#include "tests/benchmark/fixtures/SoftmaxLayerFixture.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_types = framework::dataset::make("DataType", { DataType::F32 }); -} // namespace - -using NESoftmaxLayerFixture = SoftmaxLayerFixture; - -TEST_SUITE(NEON) - -REGISTER_FIXTURE_DATA_TEST_CASE(SoftmaxLayerSmall, NESoftmaxLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(datasets::SoftmaxLayerSmallShapes(), data_types)); - -REGISTER_FIXTURE_DATA_TEST_CASE(SoftmaxLayerLarge, NESoftmaxLayerFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(datasets::SoftmaxLayerLargeShapes(), data_types)); - -TEST_SUITE_END() -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/NEON/Transpose.cpp b/tests/benchmark/NEON/Transpose.cpp deleted file mode 100644 index d60a1ba023..0000000000 --- a/tests/benchmark/NEON/Transpose.cpp +++ /dev/null @@ -1,62 +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. - */ -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/NEON/functions/NETranspose.h" -#include "arm_compute/runtime/Tensor.h" -#include "arm_compute/runtime/TensorAllocator.h" -#include "tests/NEON/Accessor.h" -#include "tests/benchmark/fixtures/TransposeFixture.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_types = framework::dataset::make("DataType", { DataType::U8, DataType::U16, DataType::U32 }); -} // namespace - -using NETransposeFixture = TransposeFixture; - -TEST_SUITE(NEON) -TEST_SUITE(Transpose) - -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, NETransposeFixture, framework::DatasetMode::PRECOMMIT, - framework::dataset::combine(framework::dataset::concat(datasets::Small1DShapes(), datasets::Small2DShapes()), data_types)); - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, NETransposeFixture, framework::DatasetMode::NIGHTLY, - framework::dataset::combine(framework::dataset::concat(datasets::Large1DShapes(), datasets::Large2DShapes()), data_types)); - -TEST_SUITE_END() -TEST_SUITE_END() -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/NEON/WarpAffine.cpp b/tests/benchmark/NEON/WarpAffine.cpp deleted file mode 100644 index e1da874881..0000000000 --- a/tests/benchmark/NEON/WarpAffine.cpp +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2018 ARM Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/NEON/functions/NEWarpAffine.h" -#include "arm_compute/runtime/Tensor.h" -#include "tests/NEON/Accessor.h" -#include "tests/benchmark/fixtures/WarpAffineFixture.h" -#include "tests/datasets/BorderModeDataset.h" -#include "tests/datasets/ShapeDatasets.h" -#include "tests/framework/Macros.h" -#include "tests/framework/datasets/Datasets.h" -#include "utils/TypePrinter.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -namespace -{ -const auto data_type = framework::dataset::make("DataType", DataType::U8); -const auto interpolation_types = framework::dataset::make("InterpolationPolicy", { InterpolationPolicy::NEAREST_NEIGHBOR, InterpolationPolicy::BILINEAR }); -} // namespace - -using NEWarpAffineFixture = WarpAffineFixture; - -TEST_SUITE(NEON) -TEST_SUITE(WarpAffine) - -// *INDENT-OFF* -// clang-format off -REGISTER_FIXTURE_DATA_TEST_CASE(RunSmall, NEWarpAffineFixture, framework::DatasetMode::PRECOMMIT, - combine(combine(combine( - datasets::SmallShapes(), - data_type), - interpolation_types), - datasets::BorderModes())); - -REGISTER_FIXTURE_DATA_TEST_CASE(RunLarge, NEWarpAffineFixture, framework::DatasetMode::NIGHTLY, - combine(combine(combine( - datasets::LargeShapes(), - data_type), - interpolation_types), - datasets::BorderModes())); -// clang-format on -// *INDENT-ON* - -TEST_SUITE_END() // WarpAffine -TEST_SUITE_END() // NEON -} // namespace benchmark -} // namespace test -} // namespace arm_compute diff --git a/tests/benchmark/fixtures/ActivationLayerFixture.h b/tests/benchmark/fixtures/ActivationLayerFixture.h deleted file mode 100644 index 2ac10b2746..0000000000 --- a/tests/benchmark/fixtures/ActivationLayerFixture.h +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 2017-2019 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 "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/framework/Fixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -/** Fixture that can be used for NEON and CL */ -template -class ActivationLayerFixture : public framework::Fixture -{ -public: - ActivationLayerFixture() - : src(), dst(), act_layer(parameters->get_ctx()) - { - } - - template - 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 QuantizationInfo q_info(0.5f, -10); - src = create_tensor(shape, data_type, 1, q_info); - dst = create_tensor(shape, data_type, 1, q_info); - - // Create and configure function - act_layer.configure(&src, &dst, info); - - // Allocate tensors - src.allocator()->allocate(); - dst.allocator()->allocate(); - } - - void run() - { - act_layer.run(); - } - - void sync() - { - sync_if_necessary(); - sync_tensor_if_necessary(dst); - } - - void teardown() - { - src.allocator()->free(); - dst.allocator()->free(); - } - -private: - TensorType src; - TensorType dst; - Function act_layer; -}; -} // namespace benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_ACTIVATIONLAYERFIXTURE */ diff --git a/tests/benchmark/fixtures/BatchNormalizationLayerFixture.h b/tests/benchmark/fixtures/BatchNormalizationLayerFixture.h deleted file mode 100644 index 42adefeef6..0000000000 --- a/tests/benchmark/fixtures/BatchNormalizationLayerFixture.h +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (c) 2017-2018 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 "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/framework/Fixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -/** Fixture that can be used for NEON and CL */ -template -class BatchNormalizationLayerFixture : public framework::Fixture -{ -public: - template - void setup(TensorShape tensor_shape, TensorShape param_shape, float epsilon, bool use_gamma, bool use_beta, ActivationLayerInfo act_info, DataType data_type, DataLayout data_layout, int batches) - { - // Set batched in source and destination shapes - - tensor_shape.set(tensor_shape.num_dimensions(), batches); - if(data_layout == DataLayout::NHWC) - { - permute(tensor_shape, PermutationVector(2U, 0U, 1U)); - } - - // Create tensors - src = create_tensor(tensor_shape, data_type, 1, QuantizationInfo(), data_layout); - dst = create_tensor(tensor_shape, data_type, 1, QuantizationInfo(), data_layout); - mean = create_tensor(param_shape, data_type, 1); - variance = create_tensor(param_shape, data_type, 1); - beta = create_tensor(param_shape, data_type, 1); - gamma = create_tensor(param_shape, data_type, 1); - - // Create and configure function - TensorType *beta_ptr = use_beta ? &beta : nullptr; - TensorType *gamma_ptr = use_gamma ? &gamma : nullptr; - batch_norm_layer.configure(&src, &dst, &mean, &variance, beta_ptr, gamma_ptr, epsilon, act_info); - - // Allocate tensors - src.allocator()->allocate(); - dst.allocator()->allocate(); - mean.allocator()->allocate(); - variance.allocator()->allocate(); - beta.allocator()->allocate(); - gamma.allocator()->allocate(); - } - - void run() - { - batch_norm_layer.run(); - } - - void sync() - { - sync_if_necessary(); - sync_tensor_if_necessary(dst); - } - - 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 benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_BATCHNORMALIZATIONLAYERFIXTURE */ diff --git a/tests/benchmark/fixtures/CannyEdgeFixture.h b/tests/benchmark/fixtures/CannyEdgeFixture.h deleted file mode 100644 index e2aec24b3e..0000000000 --- a/tests/benchmark/fixtures/CannyEdgeFixture.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2018 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_CANNY_EDGE_FIXTURE -#define ARM_COMPUTE_TEST_CANNY_EDGE_FIXTURE - -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/framework/Fixture.h" - -namespace arm_compute -{ -class CLCannyEdge; -class NECannyEdge; - -namespace test -{ -namespace benchmark -{ -template -class CannyEdgeFixture : public framework::Fixture -{ -public: - template - void setup(std::string image, int gradient_size, MagnitudeType norm_type, BorderMode border_mode, Format format) - { - // Load the image (cached by the library if loaded before) - const RawTensor &raw = library->get(image, format); - - src = create_tensor(raw.shape(), format); - dst = create_tensor(raw.shape(), format); - - canny_edge_func.configure(&src, &dst, upper_thresh, lower_thresh, gradient_size, static_cast(norm_type) + 1, border_mode, constant_border_value); - - // Allocate tensors - src.allocator()->allocate(); - dst.allocator()->allocate(); - - library->fill(Accessor(src), raw); - } - - void run() - { - canny_edge_func.run(); - } - - void sync() - { - sync_if_necessary(); - sync_tensor_if_necessary(dst); - } - -private: - static const int32_t lower_thresh = 0; - static const int32_t upper_thresh = 255; - static const uint8_t constant_border_value = 0; - - TensorType src{}; - TensorType dst{}; - Function canny_edge_func{}; -}; -} // namespace benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_CANNY_EDGE_FIXTURE */ diff --git a/tests/benchmark/fixtures/ColorConvertFixture.h b/tests/benchmark/fixtures/ColorConvertFixture.h deleted file mode 100644 index 6656e1482e..0000000000 --- a/tests/benchmark/fixtures/ColorConvertFixture.h +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Copyright (c) 2018 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_COLOR_CONVERT_FIXTURE -#define ARM_COMPUTE_TEST_COLOR_CONVERT_FIXTURE - -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/framework/Fixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -template -class ColorConvertFixture : public framework::Fixture -{ -public: - template - void setup(TensorShape input_shape, Format src_format, Format dst_format) - { - _src_num_planes = num_planes_from_format(src_format); - _dst_num_planes = num_planes_from_format(dst_format); - - TensorShape dst_shape = adjust_odd_shape(input_shape, src_format); - dst_shape = adjust_odd_shape(dst_shape, dst_format); - - // Create tensors - ref_src = create_multi_image(dst_shape, src_format); - ref_dst = create_multi_image(dst_shape, dst_format); - - if(1U == _src_num_planes) - { - const TensorType *plane_src = static_cast(ref_src.plane(0)); - - if(1U == _dst_num_planes) - { - TensorType *plane_dst = static_cast(ref_dst.plane(0)); - colorconvert_func.configure(plane_src, plane_dst); - } - else - { - colorconvert_func.configure(plane_src, &ref_dst); - } - } - else - { - if(1U == _dst_num_planes) - { - TensorType *plane_dst = static_cast(ref_dst.plane(0)); - colorconvert_func.configure(&ref_src, plane_dst); - } - else - { - colorconvert_func.configure(&ref_src, &ref_dst); - } - } - - // Allocate tensors - ref_src.allocate(); - ref_dst.allocate(); - - // Fill tensor planes - for(unsigned int plane_idx = 0; plane_idx < _src_num_planes; ++plane_idx) - { - TensorType *src_plane = static_cast(ref_src.plane(plane_idx)); - - fill(AccessorType(*src_plane), plane_idx); - } - } - - void run() - { - colorconvert_func.run(); - } - - void sync() - { - sync_if_necessary(); - for(unsigned int plane_idx = 0; plane_idx < _dst_num_planes; ++plane_idx) - { - TensorType *dst_plane = static_cast(ref_dst.plane(plane_idx)); - sync_tensor_if_necessary(*dst_plane); - } - } - - void teardown() - { - for(unsigned int plane_idx = 0; plane_idx < _src_num_planes; ++plane_idx) - { - TensorType *src_plane = static_cast(ref_src.plane(plane_idx)); - src_plane->allocator()->free(); - } - for(unsigned int plane_idx = 0; plane_idx < _dst_num_planes; ++plane_idx) - { - TensorType *dst_plane = static_cast(ref_dst.plane(plane_idx)); - dst_plane->allocator()->free(); - } - } - -protected: - template - void fill(U &&tensor, int i) - { - library->fill_tensor_uniform(tensor, i); - } - -private: - MultiImageType ref_src{}; - MultiImageType ref_dst{}; - FunctionType colorconvert_func{}; - - unsigned int _src_num_planes{}; - unsigned int _dst_num_planes{}; -}; -} // namespace benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_COLOR_CONVERT_FIXTURE */ diff --git a/tests/benchmark/fixtures/ConvolutionFixture.h b/tests/benchmark/fixtures/ConvolutionFixture.h deleted file mode 100644 index f355168ec1..0000000000 --- a/tests/benchmark/fixtures/ConvolutionFixture.h +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Copyright (c) 2018-2019 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_CONVOLUTIONFIXTURE -#define ARM_COMPUTE_TEST_CONVOLUTIONFIXTURE - -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/framework/Fixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -/** Parent fixture that can be used for NEON and CL */ -template -class ConvolutionFixture : public framework::Fixture -{ -public: - template - void setup(TensorShape src_shape, DataType output_data_type, BorderMode border_mode, unsigned int width, unsigned int height, bool is_separable = false) - { - std::mt19937 gen(library->seed()); - const uint8_t constant_border_value = 0; - - // Generate random scale value between 1 and 255. - std::uniform_int_distribution distribution_scale(1, 255); - const uint32_t scale = distribution_scale(gen); - - ARM_COMPUTE_ERROR_ON(3 != width && 5 != width && 7 != width && 9 != width); - ARM_COMPUTE_ERROR_ON(3 != height && 5 != height && 7 != height && 9 != height); - - std::vector conv(width * height); - - _width = width; - _height = height; - - if(is_separable) - { - init_separable_conv(conv.data(), width, height, seed); - } - else - { - init_conv(conv.data(), width, height, seed); - } - - // Create tensors - src = create_tensor(src_shape, DataType::U8); - dst = create_tensor(src_shape, output_data_type); - - // Configure function - configure_target(src, dst, conv.data(), scale, border_mode, constant_border_value); - - // Allocate tensors - src.allocator()->allocate(); - dst.allocator()->allocate(); - - // Fill tensors - library->fill_tensor_uniform(Accessor(src), 0); - library->fill_tensor_uniform(Accessor(dst), 1); - } - - void run() - { - convolution_func.run(); - } - - void sync() - { - sync_if_necessary(); - sync_tensor_if_necessary(dst); - } - -protected: - virtual void configure_target(TensorType &src, TensorType &dst, const int16_t *conv, uint32_t scale, - BorderMode border_mode, uint8_t border_value) = 0; - -protected: - unsigned int _width{}; - unsigned int _height{}; - Function convolution_func{}; - -private: - const std::random_device::result_type seed = 0; - TensorType src{}; - TensorType dst{}; -}; - -/** Child fixture used for square convolutions */ -template -class ConvolutionSquareFixture : public ConvolutionFixture -{ -public: - template - void setup(TensorShape src_shape, DataType output_data_type, BorderMode border_mode, unsigned int width) - { - ConvolutionFixture::setup(src_shape, output_data_type, border_mode, width, width); - } - -protected: - void configure_target(TensorType &src, TensorType &dst, const int16_t *conv, uint32_t scale, - BorderMode border_mode, uint8_t constant_border_value) - { - this->convolution_func.configure(&src, &dst, conv, scale, border_mode, constant_border_value); - } -}; - -/** Child fixture used for rectangular convolutions */ -template -class ConvolutionRectangleFixture : public ConvolutionFixture -{ -public: - template - void setup(TensorShape src_shape, DataType output_data_type, BorderMode border_mode, unsigned int width, unsigned int height) - { - ConvolutionFixture::setup(src_shape, output_data_type, border_mode, width, height); - } - -protected: - void configure_target(TensorType &src, TensorType &dst, const int16_t *conv, uint32_t scale, - BorderMode border_mode, uint8_t constant_border_value) - { - this->convolution_func.configure(&src, &dst, conv, this->_width, this->_height, scale, border_mode, constant_border_value); - } -}; - -/** Child fixture used for separable convolutions */ -template -class ConvolutionSeperableFixture : public ConvolutionFixture -{ -public: - template - void setup(TensorShape src_shape, DataType output_data_type, BorderMode border_mode, unsigned int width) - { - ConvolutionFixture::setup(src_shape, output_data_type, border_mode, width, width, true); - } - -protected: - void configure_target(TensorType &src, TensorType &dst, const int16_t *conv, uint32_t scale, - BorderMode border_mode, uint8_t constant_border_value) - { - this->convolution_func.configure(&src, &dst, conv, scale, border_mode, constant_border_value); - } -}; - -} // namespace benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_CONVOLUTIONFIXTURE */ diff --git a/tests/benchmark/fixtures/ConvolutionLayerFixture.h b/tests/benchmark/fixtures/ConvolutionLayerFixture.h deleted file mode 100644 index b23c3457ab..0000000000 --- a/tests/benchmark/fixtures/ConvolutionLayerFixture.h +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (c) 2017-2018 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 "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/framework/Fixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -/** Fixture that can be used for NEON and CL */ -template -class ConvolutionLayerFixture : public framework::Fixture -{ -public: - template - void setup(TensorShape src_shape, TensorShape weights_shape, TensorShape biases_shape, TensorShape dst_shape, PadStrideInfo info, Size2D dilation, ActivationLayerInfo act_info, DataType data_type, - int batches) - { - // Set batched in source and destination shapes - src_shape.set(3 /* batch */, batches); - dst_shape.set(3 /* batch */, batches); - DataType bias_data_type = is_data_type_quantized_asymmetric(data_type) ? DataType::S32 : data_type; - const QuantizationInfo qinfo(2.f / 255.f, 127); - - // Create tensors - src = create_tensor(src_shape, data_type, 1, qinfo); - weights = create_tensor(weights_shape, data_type, 1, qinfo); - biases = create_tensor(biases_shape, bias_data_type, 1); - dst = create_tensor(dst_shape, data_type, 1, qinfo); - - // Create and configure function - conv_layer.configure(&src, &weights, &biases, &dst, info, WeightsInfo(), dilation, act_info); - - // Allocate tensors - src.allocator()->allocate(); - weights.allocator()->allocate(); - biases.allocator()->allocate(); - dst.allocator()->allocate(); - } - - void run() - { - conv_layer.run(); - } - - void sync() - { - sync_if_necessary(); - sync_tensor_if_necessary(dst); - } - - 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 benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_CONVOLUTIONLAYERFIXTURE */ diff --git a/tests/benchmark/fixtures/DepthConcatenateLayerFixture.h b/tests/benchmark/fixtures/DepthConcatenateLayerFixture.h deleted file mode 100644 index 272da38952..0000000000 --- a/tests/benchmark/fixtures/DepthConcatenateLayerFixture.h +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright (c) 2017-2019 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_DEPTHCONCATENATELAYERFIXTURE -#define ARM_COMPUTE_TEST_DEPTHCONCATENATELAYERFIXTURE - -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/core/Utils.h" -#include "arm_compute/core/utils/misc/ShapeCalculator.h" -#include "tests/AssetsLibrary.h" -#include "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/framework/Fixture.h" - -#include - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -/** Fixture that can be used for NE/CL/GC */ -template -class DepthConcatenateLayerFixture : public framework::Fixture -{ -public: - inline std::vector generate_input_shapes(TensorShape shape) - { - // Create input shapes - std::mt19937 gen(library->seed()); - std::uniform_int_distribution<> num_dis(2, 4); - const int num_tensors = num_dis(gen); - - std::vector shapes(num_tensors, shape); - std::uniform_int_distribution<> depth_dis(1, 3); - - // Generate more shapes based on the input - for(auto &s : shapes) - { - // Set the depth of the tensor - s.set(2, depth_dis(gen)); - } - - return shapes; - } - - template - void setup(TensorShape shape, DataType data_type) - { - // Generate input shapes - std::vector src_shapes = generate_input_shapes(shape); - - // Create tensors - _srcs.reserve(src_shapes.size()); - - std::vector src_ptrs; - - for(const auto &shape : src_shapes) - { - _srcs.emplace_back(create_tensor(shape, data_type, 1)); - src_ptrs.emplace_back(&_srcs.back()); - } - - TensorShape dst_shape = misc::shape_calculator::calculate_concatenate_shape(src_ptrs, Window::DimZ); - _dst = create_tensor(dst_shape, data_type, 1); - - _depth_concat.configure(src_ptrs, &_dst, 2); - - for(auto &src : _srcs) - { - src.allocator()->allocate(); - } - - _dst.allocator()->allocate(); - } - - void run() - { - _depth_concat.run(); - } - - void sync() - { - sync_if_necessary(); - sync_tensor_if_necessary(_dst); - } - - void teardown() - { - for(auto &src : _srcs) - { - src.allocator()->free(); - } - - _srcs.clear(); - - _dst.allocator()->free(); - } - -private: - std::vector _srcs{}; - TensorType _dst{}; - Function _depth_concat{}; -}; -} // namespace benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_DEPTHCONCATENATELAYERFIXTURE */ diff --git a/tests/benchmark/fixtures/DepthwiseConvolutionLayerFixture.h b/tests/benchmark/fixtures/DepthwiseConvolutionLayerFixture.h deleted file mode 100644 index 09da816fd4..0000000000 --- a/tests/benchmark/fixtures/DepthwiseConvolutionLayerFixture.h +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (c) 2017-2019 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 "arm_compute/core/utils/misc/ShapeCalculator.h" -#include "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/framework/Fixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -using namespace arm_compute::misc::shape_calculator; - -/** Fixture that can be used for NEON and CL */ -template -class DepthwiseConvolutionLayerFixture : public framework::Fixture -{ -public: - template - void setup(TensorShape src_shape, Size2D kernel_size, PadStrideInfo info, Size2D Dilation, DataType data_type, int batches) - { - ARM_COMPUTE_UNUSED(Dilation); - - // Get shapes - TensorShape weights_shape(kernel_size.width, kernel_size.height); - - const TensorInfo in_info(src_shape, 1, data_type); - const TensorInfo we_info(weights_shape, 1, data_type); - TensorShape dst_shape = compute_depthwise_convolution_shape(in_info, we_info, info, 1); - - weights_shape.set(2, dst_shape.z()); - - // Set batched in source and destination shapes - - src_shape.set(3 /* batch */, batches); - dst_shape.set(3 /* batch */, batches); - - // Create tensors - src = create_tensor(src_shape, data_type, 1, QuantizationInfo(0.5f, 10)); - weights = create_tensor(weights_shape, data_type, 1, QuantizationInfo(0.5f, 10)); - biases = create_tensor(TensorShape(weights_shape[2]), is_data_type_quantized_asymmetric(data_type) ? DataType::S32 : data_type, 1); - dst = create_tensor(dst_shape, data_type, 1, QuantizationInfo(0.5f, 10)); - - // Create and configure function - depth_conv.configure(&src, &weights, &biases, &dst, info); - - // Allocate tensors - src.allocator()->allocate(); - weights.allocator()->allocate(); - biases.allocator()->allocate(); - dst.allocator()->allocate(); - } - - void run() - { - depth_conv.run(); - } - - void sync() - { - sync_if_necessary(); - sync_tensor_if_necessary(dst); - } - - void teardown() - { - src.allocator()->free(); - weights.allocator()->free(); - biases.allocator()->free(); - dst.allocator()->free(); - } - -private: - TensorType src{}; - TensorType weights{}; - TensorType biases{}; - TensorType dst{}; - Function depth_conv{}; -}; -} // namespace benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_DEPTHWISECONVOLUTIONFIXTURE */ diff --git a/tests/benchmark/fixtures/DequantizationLayerFixture.h b/tests/benchmark/fixtures/DequantizationLayerFixture.h deleted file mode 100644 index 316098b220..0000000000 --- a/tests/benchmark/fixtures/DequantizationLayerFixture.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2017-2019 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_DEQUANTIZATION_LAYER_FIXTURE -#define ARM_COMPUTE_TEST_DEQUANTIZATION_LAYER_FIXTURE - -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/framework/Fixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -/** Fixture that can be used for NEON and CL */ -template -class DequantizationLayerFixture : public framework::Fixture -{ -public: - template - void setup(TensorShape shape, DataType data_type_src, DataType data_type_dst) - { - const QuantizationInfo q_info(0.5f, -10); - - // Create tensors - src = create_tensor(shape, data_type_src, 1, q_info); - dst = create_tensor(shape, data_type_dst, 1, q_info); - - // Create and configure function - dequantization_func.configure(&src, &dst); - - // Allocate tensors - src.allocator()->allocate(); - dst.allocator()->allocate(); - } - - void run() - { - dequantization_func.run(); - } - - void sync() - { - sync_if_necessary(); - sync_tensor_if_necessary(dst); - } - - void teardown() - { - src.allocator()->free(); - dst.allocator()->free(); - } - -private: - TensorType src{}; - TensorType dst{}; - Function dequantization_func{}; -}; -} // namespace benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_DEQUANTIZATION_LAYER_FIXTURE */ diff --git a/tests/benchmark/fixtures/DirectConvolutionLayerFixture.h b/tests/benchmark/fixtures/DirectConvolutionLayerFixture.h deleted file mode 100644 index f74f0ece1a..0000000000 --- a/tests/benchmark/fixtures/DirectConvolutionLayerFixture.h +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (c) 2017-2018 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_DIRECTCONVOLUTIONLAYERFIXTURE -#define ARM_COMPUTE_TEST_DIRECTCONVOLUTIONLAYERFIXTURE - -#include "arm_compute/core/Error.h" -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/framework/Fixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -/** Fixture that can be used for NEON and CL */ -template -class DirectConvolutionLayerFixture : public framework::Fixture -{ -public: - template - void setup(TensorShape src_shape, TensorShape weights_shape, TensorShape biases_shape, TensorShape dst_shape, PadStrideInfo info, Size2D dilation, ActivationLayerInfo act_info, DataType data_type, - int batches) - { - ARM_COMPUTE_UNUSED(dilation); - - // Set batched in source and destination shapes - - src_shape.set(3 /* batch */, batches); - dst_shape.set(3 /* batch */, batches); - DataType bias_data_type = is_data_type_quantized_asymmetric(data_type) ? DataType::S32 : data_type; - - // Create tensors - src = create_tensor(src_shape, data_type, 1); - weights = create_tensor(weights_shape, data_type, 1); - biases = create_tensor(biases_shape, bias_data_type, 1); - dst = create_tensor(dst_shape, data_type, 1); - - // Create and configure function - conv_layer.configure(&src, &weights, &biases, &dst, info, act_info); - - // Allocate tensors - src.allocator()->allocate(); - weights.allocator()->allocate(); - biases.allocator()->allocate(); - dst.allocator()->allocate(); - } - - void run() - { - conv_layer.run(); - } - - void sync() - { - sync_if_necessary(); - sync_tensor_if_necessary(dst); - } - - 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 benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_DIRECTCONVOLUTIONLAYERFIXTURE */ diff --git a/tests/benchmark/fixtures/ElementWiseUnaryFixture.h b/tests/benchmark/fixtures/ElementWiseUnaryFixture.h deleted file mode 100644 index a26f7c84c0..0000000000 --- a/tests/benchmark/fixtures/ElementWiseUnaryFixture.h +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright (c) 2019 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_ELEMENTWISE_UNARY_FIXTURE -#define ARM_COMPUTE_TEST_ELEMENTWISE_UNARY_FIXTURE - -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "tests/AssetsLibrary.h" -#include "tests/Globals.h" -#include "tests/IAccessor.h" -#include "tests/framework/Asserts.h" -#include "tests/framework/Fixture.h" -#include "tests/validation/reference/ElementWiseUnary.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -template -class ElementWiseUnaryBenchmarkFixture : public framework::Fixture -{ -public: - template - void setup(TensorShape input_shape, DataType input_data_type) - { - src = create_tensor(input_shape, input_data_type); - dst = create_tensor(input_shape, input_data_type); - - elwiseunary_layer.configure(&src, &dst); - - // Allocate tensors - src.allocator()->allocate(); - dst.allocator()->allocate(); - } - - void run() - { - elwiseunary_layer.run(); - } - - void sync() - { - sync_if_necessary(); - sync_tensor_if_necessary(dst); - } - -private: - TensorType src{}; - TensorType dst{}; - FunctionType elwiseunary_layer{}; -}; - -template -class RsqrtBenchmarkFixture : public ElementWiseUnaryBenchmarkFixture -{ -public: - template - void setup(const TensorShape &shape, DataType data_type) - { - ElementWiseUnaryBenchmarkFixture::setup(shape, data_type); - } -}; - -template -class ExpBenchmarkFixture : public ElementWiseUnaryBenchmarkFixture -{ -public: - template - void setup(const TensorShape &shape, DataType data_type) - { - ElementWiseUnaryBenchmarkFixture::setup(shape, data_type); - } -}; - -template -class NegBenchmarkFixture : public ElementWiseUnaryBenchmarkFixture -{ -public: - template - void setup(const TensorShape &shape, DataType data_type) - { - ElementWiseUnaryBenchmarkFixture::setup(shape, data_type); - } -}; - -template -class LogBenchmarkFixture : public ElementWiseUnaryBenchmarkFixture -{ -public: - template - void setup(const TensorShape &shape, DataType data_type) - { - ElementWiseUnaryBenchmarkFixture::setup(shape, data_type); - } -}; - -template -class AbsBenchmarkFixture : public ElementWiseUnaryBenchmarkFixture -{ -public: - template - void setup(const TensorShape &shape, DataType data_type) - { - ElementWiseUnaryBenchmarkFixture::setup(shape, data_type); - } -}; - -template -class SinBenchmarkFixture : public ElementWiseUnaryBenchmarkFixture -{ -public: - template - void setup(const TensorShape &shape, DataType data_type) - { - ElementWiseUnaryBenchmarkFixture::setup(shape, data_type); - } -}; -} // namespace validation -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_ELEMENTWISE_UNARY_FIXTURE */ diff --git a/tests/benchmark/fixtures/EqualizeHistogramFixture.h b/tests/benchmark/fixtures/EqualizeHistogramFixture.h deleted file mode 100644 index 751415a4e0..0000000000 --- a/tests/benchmark/fixtures/EqualizeHistogramFixture.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) 2018 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_EQUALIZE_HISTOGRAM_FIXTURE -#define ARM_COMPUTE_TEST_EQUALIZE_HISTOGRAM_FIXTURE - -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/framework/Fixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -template -class EqualizeHistogramFixture : public framework::Fixture -{ -public: - template - void setup(const TensorShape &shape, Format format) - { - // Create tensors - src = create_tensor(shape, format); - dst = create_tensor(shape, format); - - // Create and configure function - equalize_histogram_func.configure(&src, &dst); - - // Allocate tensors - src.allocator()->allocate(); - dst.allocator()->allocate(); - } - - void run() - { - equalize_histogram_func.run(); - } - - void sync() - { - sync_if_necessary(); - sync_tensor_if_necessary(dst); - } - - void teardown() - { - src.allocator()->free(); - dst.allocator()->free(); - } - -private: - TensorType src{}; - TensorType dst{}; - Function equalize_histogram_func{}; -}; -} // namespace benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_EQUALIZE_HISTOGRAM_FIXTURE */ diff --git a/tests/benchmark/fixtures/FFTConvolutionLayerFixture.h b/tests/benchmark/fixtures/FFTConvolutionLayerFixture.h deleted file mode 100644 index 2c53e3ad9b..0000000000 --- a/tests/benchmark/fixtures/FFTConvolutionLayerFixture.h +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (c) 2019 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_FFT_CONVOLUTION_LAYER_FIXTURE -#define ARM_COMPUTE_TEST_FFT_CONVOLUTION_LAYER_FIXTURE - -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/framework/Fixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -/** Fixture that can be used for NEON and CL */ -template -class FFTConvolutionLayerFixture : public framework::Fixture -{ -public: - template - void setup(TensorShape src_shape, TensorShape weights_shape, TensorShape biases_shape, TensorShape dst_shape, PadStrideInfo info, Size2D dilation, ActivationLayerInfo act_info, DataType data_type, - int batches) - { - ARM_COMPUTE_UNUSED(dilation); - - // Set batched in source and destination shapes - - src_shape.set(3 /* batch */, batches); - dst_shape.set(3 /* batch */, batches); - - // Create tensors - src = create_tensor(src_shape, data_type, 1); - weights = create_tensor(weights_shape, data_type, 1); - biases = create_tensor(biases_shape, data_type, 1); - dst = create_tensor(dst_shape, data_type, 1); - - // Create and configure function - conv_layer.configure(&src, &weights, &biases, &dst, info, act_info); - - // Allocate tensors - src.allocator()->allocate(); - weights.allocator()->allocate(); - biases.allocator()->allocate(); - dst.allocator()->allocate(); - } - - void run() - { - conv_layer.run(); - } - - void sync() - { - sync_if_necessary(); - sync_tensor_if_necessary(dst); - } - - 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 benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_FFT_CONVOLUTION_LAYER_FIXTURE */ diff --git a/tests/benchmark/fixtures/FFTFixture.h b/tests/benchmark/fixtures/FFTFixture.h deleted file mode 100644 index 53897b1b14..0000000000 --- a/tests/benchmark/fixtures/FFTFixture.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) 2019 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_FFT_FIXTURE -#define ARM_COMPUTE_TEST_FFT_FIXTURE - -#include "arm_compute/core/Types.h" -#include "arm_compute/runtime/FunctionDescriptors.h" -#include "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/framework/Fixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -template -class FFTFixture : public framework::Fixture -{ -public: - template - void setup(TensorShape shape, DataType data_type) - { - // Create tensors - src = create_tensor(shape, data_type, 2); - dst = create_tensor(shape, data_type, 2); - - // Create and configure function - fft_func.configure(&src, &dst, FFTInfo()); - - // Allocate tensors - src.allocator()->allocate(); - dst.allocator()->allocate(); - } - - void run() - { - fft_func.run(); - } - - void sync() - { - sync_if_necessary(); - sync_tensor_if_necessary(dst); - } - - void teardown() - { - src.allocator()->free(); - dst.allocator()->free(); - } - -private: - TensorType src{}; - TensorType dst{}; - Function fft_func{}; -}; -} // namespace benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_FFT_FIXTURE */ diff --git a/tests/benchmark/fixtures/FastCornersFixture.h b/tests/benchmark/fixtures/FastCornersFixture.h deleted file mode 100644 index 636d25819f..0000000000 --- a/tests/benchmark/fixtures/FastCornersFixture.h +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) 2018 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_FAST_CORNERS_FIXTURE -#define ARM_COMPUTE_TEST_FAST_CORNERS_FIXTURE - -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/framework/Fixture.h" - -namespace arm_compute -{ -class CLFastCorners; -class NEFastCorners; - -namespace test -{ -namespace benchmark -{ -template -class FastCornersFixture : public framework::Fixture -{ -public: - template - void setup(std::string image, Format format, float threshold, bool suppress_nonmax, BorderMode border_mode) - { - // Load the image (cached by the library if loaded before) - const RawTensor &raw = library->get(image, format); - - // Create tensor - src = create_tensor(raw.shape(), format); - - // Create and configure function - configure_target(fast_corners_func, src, corners, &num_corners, threshold, suppress_nonmax, border_mode, 0); - - // Allocate tensor - src.allocator()->allocate(); - - // Copy image data to tensor - library->fill(Accessor(src), raw); - } - - void run() - { - fast_corners_func.run(); - } - - void sync() - { - sync_if_necessary(); - } - - void teardown() - { - src.allocator()->free(); - } - -protected: - template ::value, int>::type = 0> - void configure_target(F &func, TensorType &src, ArrayType &corners, unsigned int *num_corners, float threshold, bool suppress_nonmax, BorderMode border_mode, uint8_t constant_border_value) - { - func.configure(&src, threshold, suppress_nonmax, &corners, num_corners, border_mode, constant_border_value); - } - - template ::value, int>::type = 0> - void configure_target(F &func, TensorType &src, ArrayType &corners, unsigned int *num_corners, float threshold, bool suppress_nonmax, BorderMode border_mode, uint8_t constant_border_value) - { - ARM_COMPUTE_UNUSED(num_corners); - func.configure(&src, threshold, suppress_nonmax, &corners, border_mode, constant_border_value); - } - -private: - const static size_t max_corners = 20000; - - TensorType src{}; - ArrayType corners{ max_corners }; - unsigned int num_corners{ max_corners }; - Function fast_corners_func{}; -}; -} // namespace benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_FAST_CORNERS_FIXTURE */ diff --git a/tests/benchmark/fixtures/FlattenLayerFixture.h b/tests/benchmark/fixtures/FlattenLayerFixture.h deleted file mode 100644 index 3d46989f71..0000000000 --- a/tests/benchmark/fixtures/FlattenLayerFixture.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2017-2018 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_FLATTEN_LAYER_FIXTURE -#define ARM_COMPUTE_TEST_FLATTEN_LAYER_FIXTURE - -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/framework/Fixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -template -class FlattenLayerFixture : public framework::Fixture -{ -public: - template - void setup(TensorShape shape, DataType data_type) - { - TensorShape shape_flatten(shape); - shape_flatten.collapse(3); - - // Create tensors - src = create_tensor(shape, data_type, 1); - dst = create_tensor(shape_flatten, data_type, 1); - - // Create and configure function - flatten_func.configure(&src, &dst); - - // Allocate tensors - src.allocator()->allocate(); - dst.allocator()->allocate(); - } - - void run() - { - flatten_func.run(); - } - - void sync() - { - sync_if_necessary(); - sync_tensor_if_necessary(dst); - } - - void teardown() - { - src.allocator()->free(); - dst.allocator()->free(); - } - -private: - TensorType src{}; - TensorType dst{}; - Function flatten_func{}; -}; -} // namespace benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_FLATTEN_LAYER_FIXTURE */ diff --git a/tests/benchmark/fixtures/FloorFixture.h b/tests/benchmark/fixtures/FloorFixture.h deleted file mode 100644 index 8c80fa386f..0000000000 --- a/tests/benchmark/fixtures/FloorFixture.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) 2017-2018 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 "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/framework/Fixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -/** Fixture that can be used for NEON and CL */ -template -class FloorFixture : public framework::Fixture -{ -public: - template - void setup(TensorShape shape, DataType data_type) - { - // Create tensors - src = create_tensor(shape, data_type); - dst = create_tensor(shape, data_type); - - // Create and configure function - floor_func.configure(&src, &dst); - - // Allocate tensors - src.allocator()->allocate(); - dst.allocator()->allocate(); - } - - void run() - { - floor_func.run(); - } - - void sync() - { - sync_if_necessary(); - sync_tensor_if_necessary(dst); - } - - void teardown() - { - src.allocator()->free(); - dst.allocator()->free(); - } - -private: - TensorType src{}; - TensorType dst{}; - Function floor_func{}; -}; -} // namespace benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_FLOORFIXTURE */ diff --git a/tests/benchmark/fixtures/FullyConnectedLayerFixture.h b/tests/benchmark/fixtures/FullyConnectedLayerFixture.h deleted file mode 100644 index caef5bebc9..0000000000 --- a/tests/benchmark/fixtures/FullyConnectedLayerFixture.h +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright (c) 2017-2018 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 "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/framework/Fixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -/** Fixture that can be used for NEON and CL */ -template -class FullyConnectedLayerFixture : public framework::Fixture -{ -public: - template - 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 - - src_shape.set(src_shape.num_dimensions() /* batch */, batches); - dst_shape.set(dst_shape.num_dimensions() /* batch */, batches); - - // Create tensors - src = create_tensor(src_shape, data_type, 1); - weights = create_tensor(weights_shape, data_type, 1); - biases = create_tensor(biases_shape, data_type, 1); - dst = create_tensor(dst_shape, data_type, 1); - - // 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(); - } - - void run() - { - fc_layer.run(); - } - - void sync() - { - sync_if_necessary(); - sync_tensor_if_necessary(dst); - } - - 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 benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_FULLYCONNECTEDLAYERFIXTURE */ diff --git a/tests/benchmark/fixtures/GEMMFixture.h b/tests/benchmark/fixtures/GEMMFixture.h deleted file mode 100644 index 7628abca01..0000000000 --- a/tests/benchmark/fixtures/GEMMFixture.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) 2017-2018 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 "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/framework/Fixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -/** Fixture that can be used for NEON and CL */ -template -class GEMMFixture : public framework::Fixture -{ -public: - template - void setup(TensorShape shape_a, TensorShape shape_b, TensorShape shape_c, TensorShape shape_dst, float alpha, float beta, DataType data_type, bool reshape_b_only_on_first_run) - { - // Create tensors - a = create_tensor(shape_a, data_type, 1); - b = create_tensor(shape_b, data_type, 1); - c = create_tensor(shape_c, data_type, 1); - dst = create_tensor(shape_dst, data_type, 1); - - // Create and configure function - gemm.configure(&a, &b, &c, &dst, alpha, beta, GEMMInfo(false, false, reshape_b_only_on_first_run)); - - // Allocate tensors - a.allocator()->allocate(); - b.allocator()->allocate(); - c.allocator()->allocate(); - dst.allocator()->allocate(); - } - - void run() - { - gemm.run(); - } - - void sync() - { - sync_if_necessary(); - sync_tensor_if_necessary(dst); - } - - 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 benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_GEMMFIXTURE */ diff --git a/tests/benchmark/fixtures/GEMMLowpFixture.h b/tests/benchmark/fixtures/GEMMLowpFixture.h deleted file mode 100644 index 33c6415d20..0000000000 --- a/tests/benchmark/fixtures/GEMMLowpFixture.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (c) 2017-2018 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_GEMMLOWPFIXTURE -#define ARM_COMPUTE_TEST_GEMMLOWPFIXTURE - -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/framework/Fixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -/** Fixture that can be used for NEON and CL */ -template -class GEMMLowpMatrixMultiplyCoreFixture : public framework::Fixture -{ -public: - template - void setup(TensorShape shape_a, TensorShape shape_b, TensorShape shape_c, TensorShape shape_dst, float alpha, float beta) - { - // TODO (COMPMID-717): The interface used for GEMMLowp is the same one used for GEMM in order to re-use the datasets - // However the interface for both GEMM and GEMMLowp should be reworked in order to accepts only the 3 dimensions M, N and K - ARM_COMPUTE_UNUSED(shape_c); - ARM_COMPUTE_UNUSED(alpha); - ARM_COMPUTE_UNUSED(beta); - - // Note: The offsets for matrix A and matrix B are set to 0 in order to skip the computation for the offset contribution - - // Create tensors - a = create_tensor(shape_a, DataType::QASYMM8, 1, QuantizationInfo(1.0f / 255.0f, 0)); - b = create_tensor(shape_b, DataType::QASYMM8, 1, QuantizationInfo(1.0f / 255.0f, 0)); - c = create_tensor(shape_dst, DataType::S32, 1, QuantizationInfo(1.0f / 255.0f, 0)); - - // Create and configure function - gemmlowp.configure(&a, &b, nullptr, &c); - - // Allocate tensors - a.allocator()->allocate(); - b.allocator()->allocate(); - c.allocator()->allocate(); - } - void run() - { - gemmlowp.run(); - } - - void sync() - { - sync_if_necessary(); - sync_tensor_if_necessary(c); - } - - void teardown() - { - a.allocator()->free(); - b.allocator()->free(); - c.allocator()->free(); - } - -private: - TensorType a{}; - TensorType b{}; - TensorType c{}; - Function gemmlowp{}; -}; - -} // namespace benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_GEMMLOWPFIXTURE */ diff --git a/tests/benchmark/fixtures/GaussianPyramidFixture.h b/tests/benchmark/fixtures/GaussianPyramidFixture.h deleted file mode 100644 index 0df7c1afb3..0000000000 --- a/tests/benchmark/fixtures/GaussianPyramidFixture.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2018 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_GAUSSIAN_PYRAMID_HALF_FIXTURE -#define ARM_COMPUTE_GAUSSIAN_PYRAMID_HALF_FIXTURE - -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/framework/Fixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -template -class GaussianPyramidHalfFixture : public framework::Fixture -{ -public: - template - void setup(TensorShape shape, BorderMode border_mode, size_t num_levels) - { - const uint8_t constant_border_value = 0; - - // Create tensors - src = create_tensor(shape, DataType::U8); - PyramidInfo pyramid_info(num_levels, SCALE_PYRAMID_HALF, shape, Format::U8); - pyramid.init(pyramid_info); - - // Configure function - gaussian_pyramid_func.configure(&src, &pyramid, border_mode, constant_border_value); - - // Allocate input tensor and pyramid - src.allocator()->allocate(); - pyramid.allocate(); - - // Fill tensor - library->fill_tensor_uniform(Accessor(src), 0); - } - - void run() - { - gaussian_pyramid_func.run(); - } - - void sync() - { - sync_if_necessary(); - } - -private: - TensorType src{}; - PyramidType pyramid{}; - Function gaussian_pyramid_func{}; -}; -} // namespace benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_GAUSSIAN_PYRAMID_HALF_FIXTURE */ diff --git a/tests/benchmark/fixtures/HOGDescriptorFixture.h b/tests/benchmark/fixtures/HOGDescriptorFixture.h deleted file mode 100644 index 312959347b..0000000000 --- a/tests/benchmark/fixtures/HOGDescriptorFixture.h +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 2018 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_HOG_DESCRIPTOR_FIXTURE -#define ARM_COMPUTE_TEST_HOG_DESCRIPTOR_FIXTURE - -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/framework/Fixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -template -class HOGDescriptorFixture : public framework::Fixture -{ -public: - template - void setup(std::string image, HOGInfo hog_info, Format format, BorderMode border_mode) - { - std::mt19937 generator(library->seed()); - std::uniform_int_distribution distribution_u8(0, 255); - uint8_t constant_border_value = static_cast(distribution_u8(generator)); - - // Load the image (cached by the library if loaded before) - const RawTensor &raw = library->get(image, format); - - // Create tensor info for HOG descriptor - TensorInfo tensor_info_hog_descriptor(hog_info, raw.shape().x(), raw.shape().y()); - - // Create tensor - src = create_tensor(raw.shape(), format); - dst = create_tensor(tensor_info_hog_descriptor.tensor_shape(), - DataType::F32, tensor_info_hog_descriptor.num_channels()); - - // Create HOG - HOGType hog = create_HOG(hog_info); - - // Create and configure function - hog_descriptor_func.configure(&src, &dst, &hog, border_mode, constant_border_value); - - // Allocate tensor - src.allocator()->allocate(); - dst.allocator()->allocate(); - - // Copy image data to tensor - library->fill(Accessor(src), raw); - } - - void run() - { - hog_descriptor_func.run(); - } - - void sync() - { - sync_if_necessary(); - } - -protected: - TensorType dst{}; - -private: - TensorType src{}; - Function hog_descriptor_func{}; -}; -} // namespace benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_HOG_DESCRIPTOR_FIXTURE */ diff --git a/tests/benchmark/fixtures/HOGDetectorFixture.h b/tests/benchmark/fixtures/HOGDetectorFixture.h deleted file mode 100644 index 48404d84ae..0000000000 --- a/tests/benchmark/fixtures/HOGDetectorFixture.h +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (c) 2018 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_HOG_DETECTOR_FIXTURE -#define ARM_COMPUTE_TEST_HOG_DETECTOR_FIXTURE - -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/benchmark/fixtures/HOGDescriptorFixture.h" -#include "tests/framework/Fixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -template -class HOGDetectorFixture : public HOGDescriptorFixture -{ -public: - template - void setup(Size2D detection_window_stride, std::string image, HOGInfo hog_info, Format format, BorderMode border_mode) - { - HDF::setup(image, hog_info, format, border_mode); - HDF::run(); - - // Initialise descriptor (linear SVM coefficients). - // NOTE: Fixed values are used to keep the number of detection windows detected - // consistent in order to have meaningful validation tolerances. - // The values are "unbalanced" to reduce the number of detected objects - const std::random_device::result_type seed = 0; - std::vector descriptor = generate_random_real(hog_info.descriptor_size(), -0.505f, 0.495f, seed); - - // Create HOG - hog = create_HOG(hog_info); - - // Copy HOG descriptor values to HOG memory - { - HOGAccessor hog_accessor(hog); - std::memcpy(hog_accessor.descriptor(), descriptor.data(), descriptor.size() * sizeof(float)); - } - - // Create and configure function - hog_detector_func.configure(&(HDF::dst), &hog, &detection_windows, detection_window_stride); - - // Reset detection windows - detection_windows.clear(); - } - - void run() - { - hog_detector_func.run(); - } - - void sync() - { - sync_if_necessary(); - } - -private: - static const unsigned int max_num_detection_windows = 100000; - - HOGType hog{}; - Function hog_detector_func{}; - ArrayType detection_windows{ max_num_detection_windows }; - - using HDF = HOGDescriptorFixture; -}; -} // namespace benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_HOG_DETECTOR_FIXTURE */ diff --git a/tests/benchmark/fixtures/HOGMultiDetectionFixture.h b/tests/benchmark/fixtures/HOGMultiDetectionFixture.h deleted file mode 100644 index 947646cdfc..0000000000 --- a/tests/benchmark/fixtures/HOGMultiDetectionFixture.h +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright (c) 2018 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_HOG_MULTI_DETECTION_FIXTURE -#define ARM_COMPUTE_TEST_HOG_MULTI_DETECTION_FIXTURE - -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/framework/Fixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -template -class HOGMultiDetectionFixture : public framework::Fixture -{ -public: - template - void setup(std::string image, std::vector models, Format format, BorderMode border_mode, bool non_maxima_suppression) - { - // Only defined borders supported - ARM_COMPUTE_ERROR_ON(border_mode == BorderMode::UNDEFINED); - - std::mt19937 generator(library->seed()); - std::uniform_int_distribution distribution_u8(0, 255); - uint8_t constant_border_value = static_cast(distribution_u8(generator)); - - // Load the image (cached by the library if loaded before) - const RawTensor &raw = library->get(image, format); - - // Initialize descriptors vector - std::vector> descriptors(models.size()); - - // Resize detection window_strides for index access - detection_window_strides.resize(models.size()); - - // Initialiize MultiHOG and detection windows - initialize_batch(models, multi_hog, descriptors, detection_window_strides); - - // Create tensors - src = create_tensor(raw.shape(), format); - - // Use default values for threshold and min_distance - const float threshold = 0.f; - const float min_distance = 1.f; - - hog_multi_detection_func.configure(&src, - &multi_hog, - &detection_windows, - &detection_window_strides, - border_mode, - constant_border_value, - threshold, - non_maxima_suppression, - min_distance); - - // Reset detection windows - detection_windows.clear(); - - // Allocate tensor - src.allocator()->allocate(); - - library->fill(Accessor(src), raw); - } - - void run() - { - hog_multi_detection_func.run(); - } - - void sync() - { - sync_if_necessary(); - } - -private: - void initialize_batch(const std::vector &models, MultiHOGType &multi_hog, - std::vector> &descriptors, DetectionWindowStrideType &detection_window_strides) - { - for(unsigned i = 0; i < models.size(); ++i) - { - auto hog_model = reinterpret_cast(multi_hog.model(i)); - hog_model->init(models[i]); - - // Initialise descriptor (linear SVM coefficients). - std::random_device::result_type seed = 0; - descriptors.at(i) = generate_random_real(models[i].descriptor_size(), -0.505f, 0.495f, seed); - - // Copy HOG descriptor values to HOG memory - { - HOGAccessorType hog_accessor(*hog_model); - std::memcpy(hog_accessor.descriptor(), descriptors.at(i).data(), descriptors.at(i).size() * sizeof(float)); - } - - // Initialize detection window stride - Size2DArrayAccessorType accessor(detection_window_strides); - accessor.at(i) = models[i].block_stride(); - } - } - -private: - static const unsigned int model_size = 4; - static const unsigned int max_num_detection_windows = 100000; - - MultiHOGType multi_hog{ model_size }; - DetectionWindowStrideType detection_window_strides{ model_size }; - DetectionWindowArrayType detection_windows{ max_num_detection_windows }; - - TensorType src{}; - Function hog_multi_detection_func{}; -}; -} // namespace benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_HOG_MULTI_DETECTION_FIXTURE */ diff --git a/tests/benchmark/fixtures/HarrisCornersFixture.h b/tests/benchmark/fixtures/HarrisCornersFixture.h deleted file mode 100644 index 29d1741156..0000000000 --- a/tests/benchmark/fixtures/HarrisCornersFixture.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2018 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_HARRIS_CORNERS_FIXTURE -#define ARM_COMPUTE_TEST_HARRIS_CORNERS_FIXTURE - -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/framework/Fixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -template -class HarrisCornersFixture : public framework::Fixture -{ -public: - template - void setup(std::string image, Format format, float threshold, float min_dist, float sensitivity, - int32_t gradient_size, int32_t block_size, BorderMode border_mode) - { - // Load the image (cached by the library if loaded before) - const RawTensor &raw = library->get(image, format); - - // Create tensor - src = create_tensor(raw.shape(), format); - - // Create and configure function - harris_corners_func.configure(&src, threshold, min_dist, sensitivity, gradient_size, block_size, &out, border_mode, 0); - - // Allocate tensor - src.allocator()->allocate(); - - // Copy image data to tensor - library->fill(Accessor(src), raw); - } - - void run() - { - harris_corners_func.run(); - } - - void sync() - { - sync_if_necessary(); - } - - void teardown() - { - src.allocator()->free(); - } - -private: - TensorType src{}; - ArrayType out{ 20000 }; - Function harris_corners_func{}; -}; -} // namespace benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_HARRIS_CORNERS_FIXTURE */ \ No newline at end of file diff --git a/tests/benchmark/fixtures/HistogramFixture.h b/tests/benchmark/fixtures/HistogramFixture.h deleted file mode 100644 index 355cddb6e7..0000000000 --- a/tests/benchmark/fixtures/HistogramFixture.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2018 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_HISTOGRAM_FIXTURE -#define ARM_COMPUTE_TEST_HISTOGRAM_FIXTURE - -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/framework/Fixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -template -class HistogramFixture : public framework::Fixture -{ -public: - template - void setup(const TensorShape &shape, Format format) - { - // Create tensors - src = create_tensor(shape, format); - - // Create and configure function - histogram_func.configure(&src, &dst); - - // Allocate tensors - src.allocator()->allocate(); - } - - void run() - { - histogram_func.run(); - } - - void sync() - { - sync_if_necessary(); - } - - void teardown() - { - src.allocator()->free(); - } - -private: - TensorType src{}; - DistributionType dst{ 30, 125, 255 }; - Function histogram_func{}; -}; -} // namespace benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_HISTOGRAM_FIXTURE */ diff --git a/tests/benchmark/fixtures/IntegralImageFixture.h b/tests/benchmark/fixtures/IntegralImageFixture.h deleted file mode 100644 index dc6399047d..0000000000 --- a/tests/benchmark/fixtures/IntegralImageFixture.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) 2018 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_INTEGRAL_IMAGE_FIXTURE -#define ARM_COMPUTE_TEST_INTEGRAL_IMAGE_FIXTURE - -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/framework/Fixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -template -class IntegralImageFixture : public framework::Fixture -{ -public: - template - void setup(const TensorShape &shape) - { - // Create tensors - src = create_tensor(shape, DataType::U8); - dst = create_tensor(shape, DataType::U32); - - // Create and configure function - integral_image_func.configure(&src, &dst); - - // Allocate tensors - src.allocator()->allocate(); - dst.allocator()->allocate(); - } - - void run() - { - integral_image_func.run(); - } - - void sync() - { - sync_if_necessary(); - sync_tensor_if_necessary(dst); - } - - void teardown() - { - src.allocator()->free(); - dst.allocator()->free(); - } - -private: - TensorType src{}; - TensorType dst{}; - Function integral_image_func{}; -}; -} // namespace benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_INTEGRAL_IMAGE_FIXTURE */ diff --git a/tests/benchmark/fixtures/L2NormalizeLayerFixture.h b/tests/benchmark/fixtures/L2NormalizeLayerFixture.h deleted file mode 100644 index e68c5a76a4..0000000000 --- a/tests/benchmark/fixtures/L2NormalizeLayerFixture.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) 2017-2018 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 "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/framework/Fixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -/** Fixture that can be used for NEON and CL */ -template -class L2NormalizeLayerFixture : public framework::Fixture -{ -public: - template - void setup(TensorShape shape, DataType data_type, unsigned int axis) - { - // Create tensors - src = create_tensor(shape, data_type); - dst = create_tensor(shape, data_type); - - // Create and configure function - l2norm_func.configure(&src, &dst, axis, 1.f); - - // Allocate tensors - src.allocator()->allocate(); - dst.allocator()->allocate(); - } - - void run() - { - l2norm_func.run(); - } - - void sync() - { - sync_if_necessary(); - sync_tensor_if_necessary(dst); - } - - void teardown() - { - src.allocator()->free(); - dst.allocator()->free(); - } - -private: - TensorType src{}; - TensorType dst{}; - Function l2norm_func{}; -}; -} // namespace benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_FLOORFIXTURE */ diff --git a/tests/benchmark/fixtures/LaplacianPyramidFixture.h b/tests/benchmark/fixtures/LaplacianPyramidFixture.h deleted file mode 100644 index 7bc3370312..0000000000 --- a/tests/benchmark/fixtures/LaplacianPyramidFixture.h +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (c) 2018 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_LAPLACIAN_PYRAMID_FIXTURE -#define ARM_COMPUTE_TEST_LAPLACIAN_PYRAMID_FIXTURE - -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/framework/Fixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -template -class LaplacianPyramidFixture : public framework::Fixture -{ -public: - template - void setup(const TensorShape &input_shape, BorderMode border_mode, size_t num_levels, Format format_in, Format format_out) - { - const uint8_t constant_border_value = 0; - - // Initialize pyramid - PyramidInfo pyramid_info(num_levels, SCALE_PYRAMID_HALF, input_shape, format_out); - - // Use conservative padding strategy to fit all subsequent kernels - pyramid.init_auto_padding(pyramid_info); - - // Create tensor - src = create_tensor(input_shape, format_in); - - // The first two dimensions of the output tensor must match the first - // two dimensions of the tensor in the last level of the pyramid - TensorShape dst_shape(input_shape); - dst_shape.set(0, pyramid.get_pyramid_level(num_levels - 1)->info()->dimension(0)); - dst_shape.set(1, pyramid.get_pyramid_level(num_levels - 1)->info()->dimension(1)); - - // The lowest resolution tensor necessary to reconstruct the input - // tensor from the pyramid. - dst = create_tensor(dst_shape, format_out); - - laplacian_pyramid_func.configure(&src, &pyramid, &dst, border_mode, constant_border_value); - - src.allocator()->allocate(); - dst.allocator()->allocate(); - - pyramid.allocate(); - - // Fill tensor - library->fill_tensor_uniform(Accessor(src), 0); - } - - void run() - { - laplacian_pyramid_func.run(); - } - - void sync() - { - sync_if_necessary(); - sync_tensor_if_necessary(dst); - } - -protected: - TensorType dst{}; - PyramidType pyramid{}; - -private: - TensorType src{}; - Function laplacian_pyramid_func{}; -}; -} // namespace benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_LAPLACIAN_PYRAMID_FIXTURE */ diff --git a/tests/benchmark/fixtures/LaplacianReconstructFixture.h b/tests/benchmark/fixtures/LaplacianReconstructFixture.h deleted file mode 100644 index 39906977a1..0000000000 --- a/tests/benchmark/fixtures/LaplacianReconstructFixture.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2018 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_LAPLACIAN_RECONSTRUCT_FIXTURE -#define ARM_COMPUTE_TEST_LAPLACIAN_RECONSTRUCT_FIXTURE - -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/benchmark/fixtures/LaplacianPyramidFixture.h" -#include "tests/framework/Fixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -template -class LaplacianReconstructFixture : public LaplacianPyramidFixture -{ -public: - template - void setup(TensorShape input_shape, BorderMode border_mode, size_t num_levels, Format format_in, Format format_out) - { - const uint8_t constant_border_value = 0; - - LPF::setup(input_shape, border_mode, num_levels, format_out, format_in); - LPF::run(); - - // Create tensor - dst = create_tensor(input_shape, DataType::U8); - - laplacian_reconstruct_func.configure(&(LPF::pyramid), &(LPF::dst), &dst, border_mode, constant_border_value); - - dst.allocator()->allocate(); - } - - void run() - { - laplacian_reconstruct_func.run(); - } - - void sync() - { - sync_if_necessary(); - sync_tensor_if_necessary(dst); - } - -private: - TensorType dst{}; - Function laplacian_reconstruct_func{}; - - using LPF = LaplacianPyramidFixture; -}; -} // namespace benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_LAPLACIAN_RECONSTRUCT_FIXTURE */ diff --git a/tests/benchmark/fixtures/LocallyConnectedLayerFixture.h b/tests/benchmark/fixtures/LocallyConnectedLayerFixture.h deleted file mode 100644 index ba511e5ec1..0000000000 --- a/tests/benchmark/fixtures/LocallyConnectedLayerFixture.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) 2018 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_LOCALLYCONNECTEDLAYERFIXTURE -#define ARM_COMPUTE_TEST_LOCALLYCONNECTEDLAYERFIXTURE - -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/framework/Fixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -/** Fixture that can be used for NEON and CL */ -template -class LocallyConnectedLayerFixture : public framework::Fixture -{ -public: - template - void setup(TensorShape src_shape, TensorShape weights_shape, TensorShape biases_shape, TensorShape dst_shape, PadStrideInfo info, Size2D dilation, DataType data_type, int batches) - { - ARM_COMPUTE_UNUSED(dilation); - - // Set batched in source and destination shapes - src_shape.set(src_shape.num_dimensions() /* batch */, batches); - dst_shape.set(dst_shape.num_dimensions() /* batch */, batches); - - // Create tensors - src = create_tensor(src_shape, data_type); - weights = create_tensor(weights_shape, data_type); - biases = create_tensor(biases_shape, data_type); - dst = create_tensor(dst_shape, data_type); - - // Create and configure function - lc_layer.configure(&src, &weights, &biases, &dst, info); - - // Allocate tensors - src.allocator()->allocate(); - weights.allocator()->allocate(); - biases.allocator()->allocate(); - dst.allocator()->allocate(); - } - - void run() - { - lc_layer.run(); - } - - void sync() - { - sync_if_necessary(); - sync_tensor_if_necessary(dst); - } - -private: - TensorType src{}; - TensorType weights{}; - TensorType biases{}; - TensorType dst{}; - Function lc_layer{}; -}; -} // namespace benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_LOCALLYCONNECTEDLAYERFIXTURE */ diff --git a/tests/benchmark/fixtures/MagnitudeFixture.h b/tests/benchmark/fixtures/MagnitudeFixture.h deleted file mode 100644 index a1b8054529..0000000000 --- a/tests/benchmark/fixtures/MagnitudeFixture.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2017-2018 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_MAGNITUDE_FIXTURE -#define ARM_COMPUTE_TEST_MAGNITUDE_FIXTURE - -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/framework/Fixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -template -class MagnitudeFixture : public framework::Fixture -{ -public: - template - void setup(const TensorShape &shape, Format format, MagnitudeType magnitude_type) - { - // Create tensors - src1 = create_tensor(shape, format); - src2 = create_tensor(shape, format); - dst = create_tensor(shape, format); - - // Create and configure function - magnitude_func.configure(&src1, &src2, &dst, magnitude_type); - - // Allocate tensors - src1.allocator()->allocate(); - src2.allocator()->allocate(); - dst.allocator()->allocate(); - } - - void run() - { - magnitude_func.run(); - } - - void sync() - { - sync_if_necessary(); - sync_tensor_if_necessary(dst); - } - - void teardown() - { - src1.allocator()->free(); - src2.allocator()->free(); - dst.allocator()->free(); - } - -private: - TensorType src1{}; - TensorType src2{}; - TensorType dst{}; - Function magnitude_func{}; -}; -} // namespace benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_MAGNITUDE_FIXTURE */ diff --git a/tests/benchmark/fixtures/MeanStdDevFixture.h b/tests/benchmark/fixtures/MeanStdDevFixture.h deleted file mode 100644 index 95ff17d2fb..0000000000 --- a/tests/benchmark/fixtures/MeanStdDevFixture.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2018 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_MEAN_STD_DEV_FIXTURE -#define ARM_COMPUTE_TEST_MEAN_STD_DEV_FIXTURE - -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/framework/Fixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -template -class MeanStdDevFixture : public framework::Fixture -{ -public: - template - void setup(const TensorShape &shape, Format format) - { - // Create tensors - src = create_tensor(shape, format); - - // Create and configure function - mean_std_dev_func.configure(&src, &mean, &std_dev); - - // Allocate tensors - src.allocator()->allocate(); - } - - void run() - { - mean_std_dev_func.run(); - } - - void sync() - { - sync_if_necessary(); - } - - void teardown() - { - src.allocator()->free(); - } - -private: - TensorType src{}; - Function mean_std_dev_func{}; - float mean{ 0.0f }; - float std_dev{ 0.0f }; -}; -} // namespace benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_MEAN_STD_DEV_FIXTURE */ diff --git a/tests/benchmark/fixtures/Median3x3Fixture.h b/tests/benchmark/fixtures/Median3x3Fixture.h deleted file mode 100644 index 5d89b221a9..0000000000 --- a/tests/benchmark/fixtures/Median3x3Fixture.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2018 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_MEDIAN3x3_FIXTURE -#define ARM_COMPUTE_TEST_MEDIAN3x3_FIXTURE - -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/framework/Fixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -template -class Median3x3Fixture : public framework::Fixture -{ -public: - template - void setup(const TensorShape &shape, BorderMode border_mode) - { - std::mt19937 gen(library->seed()); - std::uniform_int_distribution distribution(0, 255); - const uint8_t constant_border_value = distribution(gen); - - // Create tensors - src = create_tensor(shape, DataType::U8); - dst = create_tensor(shape, DataType::U8); - - // Create and configure function - median3x3_func.configure(&src, &dst, border_mode, constant_border_value); - - // Allocate tensors - src.allocator()->allocate(); - dst.allocator()->allocate(); - } - - void run() - { - median3x3_func.run(); - } - - void sync() - { - sync_if_necessary(); - sync_tensor_if_necessary(dst); - } - - void teardown() - { - src.allocator()->free(); - dst.allocator()->free(); - } - -private: - TensorType src{}; - TensorType dst{}; - Function median3x3_func{}; -}; -} // namespace benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_MEDIAN3x3_FIXTURE */ diff --git a/tests/benchmark/fixtures/MinMaxLocationFixture.h b/tests/benchmark/fixtures/MinMaxLocationFixture.h deleted file mode 100644 index 384dce5a3f..0000000000 --- a/tests/benchmark/fixtures/MinMaxLocationFixture.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) 2018 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_MIN_MAX_LOCATION_FIXTURE -#define ARM_COMPUTE_TEST_MIN_MAX_LOCATION_FIXTURE - -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "tests/Globals.h" -#include "tests/Types.h" -#include "tests/Utils.h" -#include "tests/framework/Fixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -template -class MinMaxLocationFixture : public framework::Fixture -{ -public: - template - void setup(const TensorShape &shape, DataType data_type) - { - // Create tensors - src = create_tensor(shape, data_type); - - // Create and configure function - min_max_location_func.configure(&src, &min, &max, &min_loc, &max_loc); - - // Allocate tensors - src.allocator()->allocate(); - } - - void run() - { - min_max_location_func.run(); - } - - void sync() - { - sync_if_necessary(); - } - - void teardown() - { - src.allocator()->free(); - } - -private: - TensorType src{}; - int32_t min{ 0 }; - int32_t max{ 0 }; - ArrayType min_loc{ 20000 }; - ArrayType max_loc{ 20000 }; - Function min_max_location_func{}; -}; -} // namespace benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_MIN_MAX_LOCATION_FIXTURE */ diff --git a/tests/benchmark/fixtures/NormalizationLayerFixture.h b/tests/benchmark/fixtures/NormalizationLayerFixture.h deleted file mode 100644 index 4331506250..0000000000 --- a/tests/benchmark/fixtures/NormalizationLayerFixture.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2017-2018 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 "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/framework/Fixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -/** Fixture that can be used for NEON and CL */ -template -class NormalizationLayerFixture : public framework::Fixture -{ -public: - template - void setup(TensorShape shape, NormalizationLayerInfo info, DataType data_type, int batches) - { - // Set batched in source and destination shapes - - shape.set(shape.num_dimensions(), batches); - - // Create tensors - src = create_tensor(shape, data_type, 1); - dst = create_tensor(shape, data_type, 1); - - // Create and configure function - norm_layer.configure(&src, &dst, info); - - // Allocate tensors - src.allocator()->allocate(); - dst.allocator()->allocate(); - } - - void run() - { - norm_layer.run(); - } - - void sync() - { - sync_if_necessary(); - sync_tensor_if_necessary(dst); - } - - void teardown() - { - src.allocator()->free(); - dst.allocator()->free(); - } - -private: - TensorType src{}; - TensorType dst{}; - Function norm_layer{}; -}; -} // namespace benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_NORMALIZATIONLAYERFIXTURE */ diff --git a/tests/benchmark/fixtures/NormalizePlanarYUVLayerFixture.h b/tests/benchmark/fixtures/NormalizePlanarYUVLayerFixture.h deleted file mode 100644 index af42ba7f9a..0000000000 --- a/tests/benchmark/fixtures/NormalizePlanarYUVLayerFixture.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) 2017-2018 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_NORMALIZEPLANARYUVLAYERFIXTURE -#define ARM_COMPUTE_TEST_NORMALIZEPLANARYUVLAYERFIXTURE - -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/framework/Fixture.h" - -namespace arm_compute -{ -namespace test -{ -/** Fixture that can be used for NEON and CL */ -template -class NormalizePlanarYUVLayerFixture : public framework::Fixture -{ -public: - template - void setup(TensorShape tensor_shape, TensorShape param_shape, DataType data_type, int batches) - { - // Set batched in source and destination shapes - tensor_shape.set(tensor_shape.num_dimensions(), batches); - - // Create tensors - src = create_tensor(tensor_shape, data_type, 1); - dst = create_tensor(tensor_shape, data_type, 1); - mean = create_tensor(param_shape, data_type, 1); - sd = create_tensor(param_shape, data_type, 1); - - // Create and configure function - normalize_planar_yuv_layer.configure(&src, &dst, &mean, &sd); - - // Allocate tensors - src.allocator()->allocate(); - dst.allocator()->allocate(); - mean.allocator()->allocate(); - sd.allocator()->allocate(); - } - - void run() - { - normalize_planar_yuv_layer.run(); - } - - void sync() - { - sync_if_necessary(); - sync_tensor_if_necessary(dst); - } - - void teardown() - { - src.allocator()->free(); - dst.allocator()->free(); - mean.allocator()->free(); - sd.allocator()->free(); - } - -private: - TensorType src{}; - TensorType dst{}; - TensorType mean{}; - TensorType sd{}; - Function normalize_planar_yuv_layer{}; -}; -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_NORMALIZEPLANARYUVLAYERFIXTURE */ diff --git a/tests/benchmark/fixtures/OpticalFlowFixture.h b/tests/benchmark/fixtures/OpticalFlowFixture.h deleted file mode 100644 index f78187570a..0000000000 --- a/tests/benchmark/fixtures/OpticalFlowFixture.h +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright (c) 2018 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_OPTICAL_FLOW_FIXTURE -#define ARM_COMPUTE_TEST_OPTICAL_FLOW_FIXTURE - -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "tests/Globals.h" -#include "tests/Types.h" -#include "tests/Utils.h" -#include "tests/framework/Fixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -template -class OpticalFlowFixture : public framework::Fixture -{ -public: - template - void setup(std::string old_image_name, std::string new_image_name, OpticalFlowParameters params, - size_t num_levels, size_t num_keypoints, Format format, BorderMode border_mode) - { - const uint8_t constant_border_value = 0; - const std::random_device::result_type seed = 0; - - // Create keypoints - old_keypoints = generate_random_keypoints(library->get_image_shape(old_image_name), num_keypoints, seed, num_levels); - new_keypoints_estimates = old_keypoints; - - // Create tensors - old_image = create_tensor(library->get_image_shape(old_image_name), format); - new_image = create_tensor(library->get_image_shape(new_image_name), format); - - // Load keypoints - fill_array(ArrayAccessor(old_points), old_keypoints); - fill_array(ArrayAccessor(new_points_estimates), new_keypoints_estimates); - - // Create pyramid images - PyramidInfo pyramid_info(num_levels, SCALE_PYRAMID_HALF, old_image.info()->tensor_shape(), format); - old_pyramid = create_pyramid(pyramid_info); - new_pyramid = create_pyramid(pyramid_info); - - // Create and configure pyramid functions - old_gaussian_pyramid_func.configure(&old_image, &old_pyramid, border_mode, constant_border_value); - new_gaussian_pyramid_func.configure(&new_image, &new_pyramid, border_mode, constant_border_value); - - optical_flow_func.configure(&old_pyramid, - &new_pyramid, - &old_points, - &new_points_estimates, - &new_points, - params.termination, - params.epsilon, - params.num_iterations, - params.window_dimension, - params.use_initial_estimate, - border_mode, - constant_border_value); - - // Allocate input tensors - old_image.allocator()->allocate(); - new_image.allocator()->allocate(); - - // Allocate pyramids - old_pyramid.allocate(); - new_pyramid.allocate(); - - // Copy image data to tensors - library->fill(Accessor(old_image), old_image_name, format); - library->fill(Accessor(new_image), new_image_name, format); - - // Compute gaussian pyramids - old_gaussian_pyramid_func.run(); - new_gaussian_pyramid_func.run(); - } - - void run() - { - optical_flow_func.run(); - } - - void sync() - { - sync_if_necessary(); - } - - void teardown() - { - old_image.allocator()->free(); - new_image.allocator()->free(); - } - -private: - static const size_t max_keypoints = 10000; - - std::vector old_keypoints{}; - std::vector new_keypoints_estimates{}; - - TensorType old_image{}; - TensorType new_image{}; - - ArrayType old_points{ max_keypoints }; - ArrayType new_points{ max_keypoints }; - ArrayType new_points_estimates{ max_keypoints }; - - PyramidType old_pyramid{}; - PyramidType new_pyramid{}; - - PyramidFunctionType old_gaussian_pyramid_func{}; - PyramidFunctionType new_gaussian_pyramid_func{}; - - Function optical_flow_func{}; -}; -} // namespace benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_OPTICAL_FLOW_FIXTURE */ diff --git a/tests/benchmark/fixtures/PadLayerFixture.h b/tests/benchmark/fixtures/PadLayerFixture.h deleted file mode 100644 index 2f482a0abf..0000000000 --- a/tests/benchmark/fixtures/PadLayerFixture.h +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (c) 2019 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_PADLAYERFIXTURE -#define ARM_COMPUTE_TEST_PADLAYERFIXTURE - -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "arm_compute/core/utils/misc/ShapeCalculator.h" -#include "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/framework/Fixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -/** Fixture that can be used for NEON and CL */ - -template -class PaddingFixture : public framework::Fixture -{ -public: - template - void setup(TensorShape shape, DataType data_type, const PaddingList &paddings, const PaddingMode mode) - { - PaddingList clamped_padding = paddings; - if(mode != PaddingMode::CONSTANT) - { - // Clamp padding to prevent applying more than is possible. - for(uint32_t i = 0; i < paddings.size(); ++i) - { - if(mode == PaddingMode::REFLECT) - { - clamped_padding[i].first = std::min(static_cast(paddings[i].first), static_cast(shape[i] - 1)); - clamped_padding[i].second = std::min(static_cast(paddings[i].second), static_cast(shape[i] - 1)); - } - else - { - clamped_padding[i].first = std::min(static_cast(paddings[i].first), static_cast(shape[i])); - clamped_padding[i].second = std::min(static_cast(paddings[i].second), static_cast(shape[i])); - } - } - } - - const PixelValue const_value = PixelValue(static_cast(0)); - - TensorShape output_shape = arm_compute::misc::shape_calculator::compute_padded_shape(shape, paddings); - - // Create tensors - src = create_tensor(shape, data_type); - dst = create_tensor(output_shape, data_type); - - // Create and configure function - pad_layer.configure(&src, &dst, paddings, const_value, mode); - - // Allocate tensors - src.allocator()->allocate(); - dst.allocator()->allocate(); - } - - void run() - { - pad_layer.run(); - } - - void sync() - { - sync_if_necessary(); - sync_tensor_if_necessary(dst); - } - - void teardown() - { - src.allocator()->free(); - dst.allocator()->free(); - } - -private: - TensorType src{}; - TensorType dst{}; - Function pad_layer{}; -}; -} // namespace benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_PADLAYERFIXTURE */ diff --git a/tests/benchmark/fixtures/PhaseFixture.h b/tests/benchmark/fixtures/PhaseFixture.h deleted file mode 100644 index be0bd8d6e5..0000000000 --- a/tests/benchmark/fixtures/PhaseFixture.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2018 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_PHASE_FIXTURE -#define ARM_COMPUTE_TEST_PHASE_FIXTURE - -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/framework/Fixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -template -class PhaseFixture : public framework::Fixture -{ -public: - template - void setup(const TensorShape &shape, Format format, PhaseType phase_type) - { - // Create tensors - src1 = create_tensor(shape, format); - src2 = create_tensor(shape, format); - dst = create_tensor(shape, DataType::U8); - - // Create and configure function - phase_func.configure(&src1, &src2, &dst, phase_type); - - // Allocate tensors - src1.allocator()->allocate(); - src2.allocator()->allocate(); - dst.allocator()->allocate(); - } - - void run() - { - phase_func.run(); - } - - void sync() - { - sync_if_necessary(); - sync_tensor_if_necessary(dst); - } - - void teardown() - { - src1.allocator()->free(); - src2.allocator()->free(); - dst.allocator()->free(); - } - -private: - TensorType src1{}; - TensorType src2{}; - TensorType dst{}; - Function phase_func{}; -}; -} // namespace benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_PHASE_FIXTURE */ diff --git a/tests/benchmark/fixtures/PoolingLayerFixture.h b/tests/benchmark/fixtures/PoolingLayerFixture.h deleted file mode 100644 index cbcfe2e869..0000000000 --- a/tests/benchmark/fixtures/PoolingLayerFixture.h +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) 2017-2018 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 "arm_compute/core/utils/misc/ShapeCalculator.h" -#include "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/framework/Fixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -using namespace arm_compute::misc::shape_calculator; - -/** Fixture that can be used for NEON and CL */ -template -class PoolingLayerFixture : public framework::Fixture -{ -public: - template - void setup(TensorShape src_shape, PoolingLayerInfo info, DataType data_type, DataLayout data_layout, int batches) - { - // Set batched in source and destination shapes - - // Permute shape if NHWC format - if(data_layout == DataLayout::NHWC) - { - permute(src_shape, PermutationVector(2U, 0U, 1U)); - } - - TensorInfo src_info(src_shape, 1, data_type); - src_info.set_data_layout(data_layout); - - TensorShape dst_shape = compute_pool_shape(src_info, info); - - src_shape.set(src_shape.num_dimensions(), batches); - dst_shape.set(dst_shape.num_dimensions(), batches); - - // Create tensors - src = create_tensor(src_shape, data_type, 1, QuantizationInfo(), data_layout); - dst = create_tensor(dst_shape, data_type, 1, QuantizationInfo(), data_layout); - - // Create and configure function - pool_layer.configure(&src, &dst, info); - - // Allocate tensors - src.allocator()->allocate(); - dst.allocator()->allocate(); - } - - void run() - { - pool_layer.run(); - } - - void sync() - { - sync_if_necessary(); - sync_tensor_if_necessary(dst); - } - - void teardown() - { - src.allocator()->free(); - dst.allocator()->free(); - } - -private: - TensorType src{}; - TensorType dst{}; - Function pool_layer{}; -}; -} // namespace benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_POOLINGLAYERFIXTURE */ diff --git a/tests/benchmark/fixtures/QuantizationLayerFixture.h b/tests/benchmark/fixtures/QuantizationLayerFixture.h deleted file mode 100644 index f2e8889423..0000000000 --- a/tests/benchmark/fixtures/QuantizationLayerFixture.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) 2017-2019 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_QUANTIZATION_LAYER_FIXTURE -#define ARM_COMPUTE_TEST_QUANTIZATION_LAYER_FIXTURE - -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/framework/Fixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -template -class QuantizationLayerFixture : public framework::Fixture -{ -public: - template - void setup(TensorShape shape, DataType data_type) - { - const QuantizationInfo q_info(0.5f, -10); - - // Create tensors - src = create_tensor(shape, data_type); - dst = create_tensor(shape, DataType::QASYMM8, 1, q_info); - - // Create and configure function - quantization_func.configure(&src, &dst); - - // Allocate tensors - src.allocator()->allocate(); - dst.allocator()->allocate(); - } - - void run() - { - quantization_func.run(); - } - - void sync() - { - sync_if_necessary(); - sync_tensor_if_necessary(dst); - } - - void teardown() - { - src.allocator()->free(); - dst.allocator()->free(); - } - -private: - TensorType src{}; - TensorType dst{}; - Function quantization_func{}; -}; -} // namespace benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_QUANTIZATION_LAYER_FIXTURE */ diff --git a/tests/benchmark/fixtures/ROIPoolingLayerFixture.h b/tests/benchmark/fixtures/ROIPoolingLayerFixture.h deleted file mode 100644 index 2c828272de..0000000000 --- a/tests/benchmark/fixtures/ROIPoolingLayerFixture.h +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright (c) 2017-2019 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 "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/framework/Fixture.h" - -#include - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -/** Fixture that can be used for NEON and CL */ -template -class ROIPoolingLayerFixture : public framework::Fixture -{ -public: - template - void setup(TensorShape input_shape, const ROIPoolingLayerInfo pool_info, TensorShape rois_shape, DataType data_type, int batches) - { - // Set batched in source and destination shapes - - TensorShape shape_dst; - rois_tensor = create_tensor(rois_shape, DataType::U16); - - input_shape.set(input_shape.num_dimensions(), batches); - shape_dst.set(0, pool_info.pooled_width()); - shape_dst.set(1, pool_info.pooled_height()); - shape_dst.set(2, input_shape.z()); - shape_dst.set(3, rois_shape[1]); - - // Create tensors - src = create_tensor(input_shape, data_type, 1); - dst = create_tensor(shape_dst, data_type, 1); - - // Create and configure function - roi_pool.configure(&src, &rois_tensor, &dst, pool_info); - - // Allocate tensors - rois_tensor.allocator()->allocate(); - src.allocator()->allocate(); - dst.allocator()->allocate(); - - // Create random ROIs - generate_rois(AccessorType(rois_tensor), input_shape, pool_info, rois_shape); - } - - void run() - { - roi_pool.run(); - } - - void sync() - { - sync_if_necessary(); - sync_tensor_if_necessary(dst); - } - - void teardown() - { - src.allocator()->free(); - dst.allocator()->free(); - } - -protected: - template - void generate_rois(U &&rois, const TensorShape &shape, const ROIPoolingLayerInfo &pool_info, TensorShape rois_shape) - { - const size_t values_per_roi = rois_shape.x(); - const size_t num_rois = rois_shape.y(); - - std::mt19937 gen(library->seed()); - uint16_t *rois_ptr = static_cast(rois.data()); - - const float pool_width = pool_info.pooled_width(); - const float pool_height = pool_info.pooled_height(); - const float roi_scale = pool_info.spatial_scale(); - - // Calculate distribution bounds - const auto scaled_width = static_cast((shape.x() / roi_scale) / pool_width); - const auto scaled_height = static_cast((shape.y() / roi_scale) / pool_height); - const auto min_width = static_cast(pool_width / roi_scale); - const auto min_height = static_cast(pool_height / roi_scale); - - // Create distributions - std::uniform_int_distribution dist_batch(0, shape[3] - 1); - std::uniform_int_distribution dist_x1(0, scaled_width); - std::uniform_int_distribution dist_y1(0, scaled_height); - std::uniform_int_distribution dist_w(min_width, std::max(float(min_width), (pool_width - 2) * scaled_width)); - std::uniform_int_distribution dist_h(min_height, std::max(float(min_height), (pool_height - 2) * scaled_height)); - - for(unsigned int pw = 0; pw < num_rois; ++pw) - { - const auto batch_idx = dist_batch(gen); - const auto x1 = dist_x1(gen); - const auto y1 = dist_y1(gen); - const auto x2 = x1 + dist_w(gen); - const auto y2 = y1 + dist_h(gen); - - rois_ptr[values_per_roi * pw] = batch_idx; - rois_ptr[values_per_roi * pw + 1] = x1; - rois_ptr[values_per_roi * pw + 2] = y1; - rois_ptr[values_per_roi * pw + 3] = x2; - rois_ptr[values_per_roi * pw + 4] = y2; - } - } - -private: - TensorType src{}; - TensorType dst{}; - TensorType rois_tensor{}; - Function roi_pool{}; -}; -} // namespace benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_ROIPOOLINGLAYERFIXTURE */ diff --git a/tests/benchmark/fixtures/RemapFixture.h b/tests/benchmark/fixtures/RemapFixture.h deleted file mode 100644 index c0b0c13754..0000000000 --- a/tests/benchmark/fixtures/RemapFixture.h +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (c) 2018 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_REMAP_FIXTURE -#define ARM_COMPUTE_TEST_REMAP_FIXTURE - -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/framework/Fixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -template -class RemapFixture : public framework::Fixture -{ -public: - template - void setup(const TensorShape &input_shape, InterpolationPolicy policy, DataType data_type, BorderMode border_mode) - { - std::mt19937 gen(library->seed()); - std::uniform_int_distribution distribution(0, 255); - const uint8_t constant_border_value = distribution(gen); - - // Create tensors - src = create_tensor(input_shape, data_type); - map_x = create_tensor(input_shape, DataType::F32); - map_y = create_tensor(input_shape, DataType::F32); - dst = create_tensor(input_shape, data_type); - - // Create and configure function - remap_func.configure(&src, &map_x, &map_y, &dst, policy, border_mode, constant_border_value); - - // Allocate tensors - src.allocator()->allocate(); - map_x.allocator()->allocate(); - map_y.allocator()->allocate(); - dst.allocator()->allocate(); - - // Fill tensors - fill(Accessor(src), 0, 0, 255); - fill(Accessor(map_x), 1, -5, input_shape.x() + 5); - fill(Accessor(map_y), 2, -5, input_shape.y() + 5); - } - - void run() - { - remap_func.run(); - } - - void sync() - { - sync_if_necessary(); - sync_tensor_if_necessary(dst); - } - - void teardown() - { - src.allocator()->free(); - map_x.allocator()->free(); - map_y.allocator()->free(); - dst.allocator()->free(); - } - -protected: - template - void fill(U &&tensor, int i, float min, float max) - { - std::uniform_int_distribution<> distribution((int)min, (int)max); - library->fill(tensor, distribution, i); - } - -private: - TensorType src{}; - TensorType map_x{}; - TensorType map_y{}; - TensorType dst{}; - Function remap_func{}; -}; -} // namespace benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_REMAP_FIXTURE */ diff --git a/tests/benchmark/fixtures/ReshapeLayerFixture.h b/tests/benchmark/fixtures/ReshapeLayerFixture.h deleted file mode 100644 index 85a5b80a64..0000000000 --- a/tests/benchmark/fixtures/ReshapeLayerFixture.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) 2017-2018 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_RESHAPEFIXTURE -#define ARM_COMPUTE_TEST_RESHAPEFIXTURE - -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/framework/Fixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -/** Fixture that can be used for NEON and CL */ -template -class ReshapeLayerFixture : public framework::Fixture -{ -public: - template - void setup(TensorShape shape, DataType data_type) - { - // Create tensors - src = create_tensor(shape, data_type); - dst = create_tensor(shape, data_type); - - // Create and configure function - reshape_func.configure(&src, &dst); - - // Allocate tensors - src.allocator()->allocate(); - dst.allocator()->allocate(); - } - - void run() - { - reshape_func.run(); - } - - void sync() - { - sync_if_necessary(); - sync_tensor_if_necessary(dst); - } - - void teardown() - { - src.allocator()->free(); - dst.allocator()->free(); - } - -private: - TensorType src{}; - TensorType dst{}; - Function reshape_func{}; -}; -} // namespace benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_RESHAPEFIXTURE */ diff --git a/tests/benchmark/fixtures/SobelFixture.h b/tests/benchmark/fixtures/SobelFixture.h deleted file mode 100644 index 2717e8146b..0000000000 --- a/tests/benchmark/fixtures/SobelFixture.h +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Copyright (c) 2018 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_SOBEL_FIXTURE -#define ARM_COMPUTE_TEST_SOBEL_FIXTURE - -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "tests/Globals.h" -#include "tests/Types.h" -#include "tests/Utils.h" -#include "tests/framework/Fixture.h" - -namespace arm_compute -{ -class CLSobel3x3; -class CLSobel5x5; -class CLSobel7x7; -class NESobel3x3; -class NESobel5x5; -class NESobel7x7; - -namespace test -{ -namespace benchmark -{ -namespace -{ -template -struct info; - -template <> -struct info -{ - static const Format dst_format = Format::S16; -}; - -template <> -struct info -{ - static const Format dst_format = Format::S16; -}; - -template <> -struct info -{ - static const Format dst_format = Format::S16; -}; - -template <> -struct info -{ - static const Format dst_format = Format::S16; -}; - -template <> -struct info -{ - static const Format dst_format = Format::S32; -}; - -template <> -struct info -{ - static const Format dst_format = Format::S32; -}; -} // namespace - -template -class SobelFixture : public framework::Fixture -{ -public: - template - void setup(const TensorShape &input_shape, BorderMode border_mode, GradientDimension gradient_dimension, Format input_format) - { - // Generate a random constant value - std::mt19937 gen(library->seed()); - std::uniform_int_distribution int_dist(0, 255); - const uint8_t constant_border_value = int_dist(gen); - - // Create source tensor - src = create_tensor(input_shape, input_format); - - // Create destination tensors and configure function - switch(gradient_dimension) - { - case GradientDimension::GRAD_X: - dst_x = create_tensor(input_shape, info::dst_format); - sobel_func.configure(&src, &dst_x, nullptr, border_mode, constant_border_value); - break; - case GradientDimension::GRAD_Y: - dst_y = create_tensor(input_shape, info::dst_format); - sobel_func.configure(&src, nullptr, &dst_y, border_mode, constant_border_value); - break; - case GradientDimension::GRAD_XY: - dst_x = create_tensor(input_shape, info::dst_format); - dst_y = create_tensor(input_shape, info::dst_format); - sobel_func.configure(&src, &dst_x, &dst_y, border_mode, constant_border_value); - break; - default: - ARM_COMPUTE_ERROR("Gradient dimension not supported"); - } - - // Allocate tensors - src.allocator()->allocate(); - dst_x.allocator()->allocate(); - dst_y.allocator()->allocate(); - } - - void run() - { - sobel_func.run(); - } - - void sync() - { - sync_if_necessary(); - sync_tensor_if_necessary(dst_x); - sync_tensor_if_necessary(dst_y); - } - - void teardown() - { - src.allocator()->free(); - dst_x.allocator()->free(); - dst_y.allocator()->free(); - } - -private: - TensorType src{}; - TensorType dst_x{}; - TensorType dst_y{}; - Function sobel_func{}; -}; -} // namespace benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_SOBEL_FIXTURE */ diff --git a/tests/benchmark/fixtures/SoftmaxLayerFixture.h b/tests/benchmark/fixtures/SoftmaxLayerFixture.h deleted file mode 100644 index 4d092f7567..0000000000 --- a/tests/benchmark/fixtures/SoftmaxLayerFixture.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2017-2018 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_SOFTMAXLAYERFIXTURE -#define ARM_COMPUTE_TEST_SOFTMAXLAYERFIXTURE - -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/framework/Asserts.h" -#include "tests/framework/Fixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -/** Fixture that can be used for NEON, CL and OpenGL ES */ -template -class SoftmaxLayerFixture : public framework::Fixture -{ -public: - template - void setup(TensorShape shape, DataType data_type) - { - // Create tensors - src = create_tensor(shape, data_type, 1, QuantizationInfo(1.f / 256, 10)); - dst = create_tensor(shape, data_type, 1, QuantizationInfo(1.f / 256, 0)); - - ARM_COMPUTE_EXPECT(src.info()->is_resizable(), framework::LogLevel::ERRORS); - ARM_COMPUTE_EXPECT(dst.info()->is_resizable(), framework::LogLevel::ERRORS); - - // Create and configure function - smx_layer.configure(&src, &dst); - - // Allocate tensors - src.allocator()->allocate(); - dst.allocator()->allocate(); - } - - void run() - { - smx_layer.run(); - } - - void sync() - { - sync_if_necessary(); - sync_tensor_if_necessary(dst); - } - - void teardown() - { - src.allocator()->free(); - dst.allocator()->free(); - } - -private: - TensorType src{}; - TensorType dst{}; - Function smx_layer{}; -}; -} // namespace benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_SOFTMAXLAYERFIXTURE */ diff --git a/tests/benchmark/fixtures/TransposeFixture.h b/tests/benchmark/fixtures/TransposeFixture.h deleted file mode 100644 index 60643aa5e2..0000000000 --- a/tests/benchmark/fixtures/TransposeFixture.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2017-2018 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_TRANSPOSEFIXTURE -#define ARM_COMPUTE_TEST_TRANSPOSEFIXTURE - -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/framework/Fixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -/** Fixture that can be used for NE/CL/GC */ -template -class TransposeFixture : public framework::Fixture -{ -public: - template - void setup(TensorShape shape, DataType data_type) - { - // Make rows the columns of the original shape - TensorShape output_shape{ shape[1], shape[0] }; - - // Create tensors - src = create_tensor(shape, data_type); - dst = create_tensor(output_shape, data_type); - - // Create and configure function - transpose.configure(&src, &dst); - - // Allocate tensors - src.allocator()->allocate(); - dst.allocator()->allocate(); - } - - void run() - { - transpose.run(); - } - - void sync() - { - sync_if_necessary(); - sync_tensor_if_necessary(dst); - } - - void teardown() - { - src.allocator()->free(); - dst.allocator()->free(); - } - -private: - TensorType src{}; - TensorType dst{}; - Function transpose{}; -}; -} // namespace benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_TRANSPOSEFIXTURE */ diff --git a/tests/benchmark/fixtures/WarpAffineFixture.h b/tests/benchmark/fixtures/WarpAffineFixture.h deleted file mode 100644 index e1d6855c83..0000000000 --- a/tests/benchmark/fixtures/WarpAffineFixture.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) 2018 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_WARP_AFFINE_FIXTURE -#define ARM_COMPUTE_TEST_WARP_AFFINE_FIXTURE - -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/framework/Fixture.h" -#include "tests/validation/reference/Utils.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -template -class WarpAffineFixture : public framework::Fixture -{ -public: - template - void setup(const TensorShape &shape, DataType data_type, InterpolationPolicy policy, BorderMode border_mode) - { - // Generate a random constant value if border_mode is constant - std::mt19937 gen(library->seed()); - std::uniform_int_distribution distribution_u8(0, 255); - uint8_t constant_border_value = distribution_u8(gen); - - // Create tensors - src = create_tensor(shape, data_type); - dst = create_tensor(shape, data_type); - - // Create and configure function - warp_affine_func.configure(&src, &dst, matrix, policy, border_mode, constant_border_value); - - // Allocate tensors - src.allocator()->allocate(); - dst.allocator()->allocate(); - } - - void run() - { - warp_affine_func.run(); - } - - void sync() - { - sync_if_necessary(); - sync_tensor_if_necessary(dst); - } - - void teardown() - { - src.allocator()->free(); - dst.allocator()->free(); - } - -private: - const std::array matrix{ { -0.9f, -0.6f, -0.3f, 0.3f, 0.6f, 0.9f, /* ignored*/ 1.f, 1.f, 1.f } }; - TensorType src{}; - TensorType dst{}; - Function warp_affine_func{}; -}; -} // namespace benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_WARP_AFFINE_FIXTURE */ diff --git a/tests/benchmark/fixtures/WinogradConvolutionLayerFixture.h b/tests/benchmark/fixtures/WinogradConvolutionLayerFixture.h deleted file mode 100644 index 86ea9c4dc1..0000000000 --- a/tests/benchmark/fixtures/WinogradConvolutionLayerFixture.h +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) 2018 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_WINOGRAD_CONVOLUTION_LAYER_FIXTURE -#define ARM_COMPUTE_TEST_WINOGRAD_CONVOLUTION_LAYER_FIXTURE - -#include "arm_compute/core/TensorShape.h" -#include "arm_compute/core/Types.h" -#include "tests/Globals.h" -#include "tests/Utils.h" -#include "tests/framework/Fixture.h" - -namespace arm_compute -{ -namespace test -{ -namespace benchmark -{ -/** Fixture that can be used for NEON and CL */ -template -class WinogradConvolutionLayerFixture : public framework::Fixture -{ -public: - template - void setup(TensorShape src_shape, TensorShape weights_shape, TensorShape biases_shape, TensorShape dst_shape, PadStrideInfo info, Size2D dilation, ActivationLayerInfo act_info, DataType data_type, - int batches) - { - ARM_COMPUTE_UNUSED(dilation); - - // Set batched in source and destination shapes - - src_shape.set(3 /* batch */, batches); - dst_shape.set(3 /* batch */, batches); - DataType bias_data_type = is_data_type_quantized_asymmetric(data_type) ? DataType::S32 : data_type; - - // Create tensors - src = create_tensor(src_shape, data_type, 1); - weights = create_tensor(weights_shape, data_type, 1); - biases = create_tensor(biases_shape, bias_data_type, 1); - dst = create_tensor(dst_shape, data_type, 1); - - // Create and configure function - if(data_type == DataType::F16){ - conv_layer.configure(&src, &weights, &biases, &dst, info, act_info, true); - }else{ - conv_layer.configure(&src, &weights, &biases, &dst, info, act_info); - } - - // Allocate tensors - src.allocator()->allocate(); - weights.allocator()->allocate(); - biases.allocator()->allocate(); - dst.allocator()->allocate(); - } - - void run() - { - conv_layer.run(); - } - - void sync() - { - sync_if_necessary(); - sync_tensor_if_necessary(dst); - } - - 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 benchmark -} // namespace test -} // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_WINOGRAD_CONVOLUTION_LAYER_FIXTURE */ -- cgit v1.2.1