diff options
Diffstat (limited to 'tests/benchmark_new')
-rw-r--r-- | tests/benchmark_new/CL/ActivationLayer.cpp | 59 | ||||
-rw-r--r-- | tests/benchmark_new/CL/BatchNormalizationLayer.cpp | 62 | ||||
-rw-r--r-- | tests/benchmark_new/CL/ConvolutionLayer.cpp | 53 | ||||
-rw-r--r-- | tests/benchmark_new/CL/DirectConvolutionLayer.cpp | 39 | ||||
-rw-r--r-- | tests/benchmark_new/CL/FullyConnectedLayer.cpp | 33 | ||||
-rw-r--r-- | tests/benchmark_new/CL/NormalizationLayer.cpp | 21 | ||||
-rw-r--r-- | tests/benchmark_new/CL/PoolingLayer.cpp | 53 | ||||
-rw-r--r-- | tests/benchmark_new/CL/SYSTEM/AlexNet.cpp | 2 | ||||
-rw-r--r-- | tests/benchmark_new/NEON/ActivationLayer.cpp | 55 | ||||
-rw-r--r-- | tests/benchmark_new/NEON/BatchNormalizationLayer.cpp | 65 | ||||
-rw-r--r-- | tests/benchmark_new/NEON/ConvolutionLayer.cpp | 34 | ||||
-rw-r--r-- | tests/benchmark_new/NEON/DirectConvolutionLayer.cpp | 28 | ||||
-rw-r--r-- | tests/benchmark_new/NEON/FullyConnectedLayer.cpp | 37 | ||||
-rw-r--r-- | tests/benchmark_new/NEON/NormalizationLayer.cpp | 23 | ||||
-rw-r--r-- | tests/benchmark_new/NEON/PoolingLayer.cpp | 36 |
15 files changed, 506 insertions, 94 deletions
diff --git a/tests/benchmark_new/CL/ActivationLayer.cpp b/tests/benchmark_new/CL/ActivationLayer.cpp index bf7b36a9e1..bb0bf3ea2a 100644 --- a/tests/benchmark_new/CL/ActivationLayer.cpp +++ b/tests/benchmark_new/CL/ActivationLayer.cpp @@ -30,37 +30,78 @@ #include "framework/datasets/Datasets.h" #include "tests/CL/CLAccessor.h" #include "tests/TypePrinter.h" -#include "tests/datasets_new/ActivationLayerDataset.h" +#include "tests/datasets_new/AlexNetActivationLayerDataset.h" +#include "tests/datasets_new/GoogLeNetActivationLayerDataset.h" +#include "tests/datasets_new/LeNet5ActivationLayerDataset.h" +#include "tests/datasets_new/SqueezeNetActivationLayerDataset.h" +#include "tests/datasets_new/YOLOV2ActivationLayerDataset.h" #include "tests/fixtures_new/ActivationLayerFixture.h" namespace arm_compute { namespace test { +namespace +{ +const auto data_types = framework::dataset::make("DataType", { DataType::F16, DataType::F32, DataType::QS8, DataType::QS16 }); +} // namespace + using CLActivationLayerFixture = ActivationLayerFixture<CLTensor, CLActivationLayer, CLAccessor>; TEST_SUITE(CL) REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetActivationLayer, CLActivationLayerFixture, framework::DatasetMode::ALL, framework::dataset::combine(framework::dataset::combine(datasets::AlexNetActivationLayerDataset(), - framework::dataset::make("DataType", DataType::F32)), - framework::dataset::make("Batches", { 1, 4, 8 }))); + 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(), - framework::dataset::make("DataType", DataType::F32)), - framework::dataset::make("Batches", { 1, 4, 8 }))); + data_types), + framework::dataset::make("Batches", 1))); REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetActivationLayer, CLActivationLayerFixture, framework::DatasetMode::ALL, framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetActivationLayerDataset(), - framework::dataset::make("DataType", DataType::F32)), - framework::dataset::make("Batches", { 1, 4, 8 }))); + 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(), - framework::dataset::make("DataType", DataType::F32)), - framework::dataset::make("Batches", { 1, 4, 8 }))); + 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(GoogLeNetActivationLayer, CLActivationLayerFixture, framework::DatasetMode::NIGHTLY, + framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetActivationLayerDataset(), + 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(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 test } // namespace arm_compute diff --git a/tests/benchmark_new/CL/BatchNormalizationLayer.cpp b/tests/benchmark_new/CL/BatchNormalizationLayer.cpp new file mode 100644 index 0000000000..d83d5deaf2 --- /dev/null +++ b/tests/benchmark_new/CL/BatchNormalizationLayer.cpp @@ -0,0 +1,62 @@ +/* + * 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, + * 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/CLBatchNormalizationLayer.h" +#include "framework/Macros.h" +#include "framework/datasets/Datasets.h" +#include "tests/CL/CLAccessor.h" +#include "tests/TypePrinter.h" +#include "tests/datasets_new/YOLOV2BatchNormalizationLayerDataset.h" +#include "tests/fixtures_new/BatchNormalizationLayerFixture.h" + +namespace arm_compute +{ +namespace test +{ +namespace +{ +const auto data_types = framework::dataset::make("DataType", { DataType::F32, DataType::QS8, DataType::QS16 }); +} // namespace + +using CLBatchNormalizationLayerFixture = BatchNormalizationLayerFixture<CLTensor, CLBatchNormalizationLayer, CLAccessor>; + +TEST_SUITE(CL) + +REGISTER_FIXTURE_DATA_TEST_CASE(YOLOV2BatchNormalizationLayer, CLBatchNormalizationLayerFixture, framework::DatasetMode::ALL, + framework::dataset::combine(framework::dataset::combine(datasets::YOLOV2BatchNormalizationLayerDataset(), + data_types), + framework::dataset::make("Batches", 1))); + +TEST_SUITE(NIGHTLY) +REGISTER_FIXTURE_DATA_TEST_CASE(YOLOV2BatchNormalizationLayer, CLBatchNormalizationLayerFixture, framework::DatasetMode::NIGHTLY, + framework::dataset::combine(framework::dataset::combine(datasets::YOLOV2BatchNormalizationLayerDataset(), + data_types), + framework::dataset::make("Batches", { 4, 8 }))); +TEST_SUITE_END() +TEST_SUITE_END() +} // namespace test +} // namespace arm_compute diff --git a/tests/benchmark_new/CL/ConvolutionLayer.cpp b/tests/benchmark_new/CL/ConvolutionLayer.cpp index df98538083..25c0048a0f 100644 --- a/tests/benchmark_new/CL/ConvolutionLayer.cpp +++ b/tests/benchmark_new/CL/ConvolutionLayer.cpp @@ -34,33 +34,68 @@ #include "tests/datasets_new/GoogLeNetConvolutionLayerDataset.h" #include "tests/datasets_new/LeNet5ConvolutionLayerDataset.h" #include "tests/datasets_new/SqueezeNetConvolutionLayerDataset.h" +#include "tests/datasets_new/YOLOV2ConvolutionLayerDataset.h" #include "tests/fixtures_new/ConvolutionLayerFixture.h" namespace arm_compute { namespace test { -const auto data_types = framework::dataset::make("DataType", { DataType::QS8, DataType::F16, DataType::F32 }); +namespace +{ +const auto data_types = framework::dataset::make("DataType", { DataType::F16, DataType::F32, DataType::QS8, DataType::QS16 }); +} // namespace + using CLConvolutionLayerFixture = ConvolutionLayerFixture<CLTensor, CLConvolutionLayer, CLAccessor>; TEST_SUITE(CL) REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetConvolutionLayer, CLConvolutionLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::AlexNetConvolutionLayerDataset(), data_types), - framework::dataset::make("Batches", { 1, 4, 8 }))); + framework::dataset::combine(framework::dataset::combine(datasets::AlexNetConvolutionLayerDataset(), + data_types), + framework::dataset::make("Batches", { 1, 4 }))); REGISTER_FIXTURE_DATA_TEST_CASE(LeNet5ConvolutionLayer, CLConvolutionLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::LeNet5ConvolutionLayerDataset(), data_types), - framework::dataset::make("Batches", { 1, 4, 8 }))); + framework::dataset::combine(framework::dataset::combine(datasets::LeNet5ConvolutionLayerDataset(), + data_types), + framework::dataset::make("Batches", { 1, 4 }))); REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetConvolutionLayer, CLConvolutionLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetConvolutionLayerDataset(), data_types), - framework::dataset::make("Batches", { 1, 4, 8 }))); + framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetConvolutionLayerDataset(), + data_types), + framework::dataset::make("Batches", { 1, 4 }))); REGISTER_FIXTURE_DATA_TEST_CASE(SqueezeNetConvolutionLayer, CLConvolutionLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::SqueezeNetConvolutionLayerDataset(), data_types), - framework::dataset::make("Batches", { 1, 4, 8 }))); + framework::dataset::combine(framework::dataset::combine(datasets::SqueezeNetConvolutionLayerDataset(), + data_types), + framework::dataset::make("Batches", { 1, 4 }))); +TEST_SUITE(NIGHTLY) +REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetConvolutionLayer, CLConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, + framework::dataset::combine(framework::dataset::combine(datasets::AlexNetConvolutionLayerDataset(), + data_types), + framework::dataset::make("Batches", 8))); + +REGISTER_FIXTURE_DATA_TEST_CASE(LeNet5ConvolutionLayer, CLConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, + framework::dataset::combine(framework::dataset::combine(datasets::LeNet5ConvolutionLayerDataset(), + data_types), + framework::dataset::make("Batches", 8))); + +REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetConvolutionLayer, CLConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, + framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetConvolutionLayerDataset(), + data_types), + framework::dataset::make("Batches", 8))); + +REGISTER_FIXTURE_DATA_TEST_CASE(SqueezeNetConvolutionLayer, CLConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, + framework::dataset::combine(framework::dataset::combine(datasets::SqueezeNetConvolutionLayerDataset(), + data_types), + framework::dataset::make("Batches", 8))); + +REGISTER_FIXTURE_DATA_TEST_CASE(YOLOV2ConvolutionLayer, CLConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, + framework::dataset::combine(framework::dataset::combine(datasets::YOLOV2ConvolutionLayerDataset(), + data_types), + framework::dataset::make("Batches", { 1, 4, 8 }))); +TEST_SUITE_END() TEST_SUITE_END() } // namespace test } // namespace arm_compute diff --git a/tests/benchmark_new/CL/DirectConvolutionLayer.cpp b/tests/benchmark_new/CL/DirectConvolutionLayer.cpp index 5a4536ceef..82e5ef19ad 100644 --- a/tests/benchmark_new/CL/DirectConvolutionLayer.cpp +++ b/tests/benchmark_new/CL/DirectConvolutionLayer.cpp @@ -33,31 +33,58 @@ #include "tests/datasets_new/AlexNetConvolutionLayerDataset.h" #include "tests/datasets_new/GoogLeNetConvolutionLayerDataset.h" #include "tests/datasets_new/SqueezeNetConvolutionLayerDataset.h" +#include "tests/datasets_new/YOLOV2ConvolutionLayerDataset.h" #include "tests/fixtures_new/ConvolutionLayerFixture.h" namespace arm_compute { namespace test { +namespace +{ +const auto data_types = framework::dataset::make("DataType", { DataType::F16, DataType::F32 }); +} // namespace + using CLConvolutionLayerFixture = ConvolutionLayerFixture<CLTensor, CLDirectConvolutionLayer, CLAccessor>; TEST_SUITE(CL) REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetDirectConvolutionLayer, CLConvolutionLayerFixture, framework::DatasetMode::ALL, framework::dataset::combine(framework::dataset::combine(datasets::AlexNetDirectConvolutionLayerDataset(), - framework::dataset::make("DataType", { DataType::F32 })), - framework::dataset::make("Batches", { 1, 4, 8 }))); + data_types), + framework::dataset::make("Batches", { 1, 4 }))); REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetDirectConvolutionLayer, CLConvolutionLayerFixture, framework::DatasetMode::ALL, framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetDirectConvolutionLayerDataset(), - framework::dataset::make("DataType", DataType::F32)), - framework::dataset::make("Batches", { 1, 4, 8 }))); + data_types), + framework::dataset::make("Batches", { 1, 4 }))); REGISTER_FIXTURE_DATA_TEST_CASE(SqueezeNetDirectConvolutionLayer, CLConvolutionLayerFixture, framework::DatasetMode::ALL, framework::dataset::combine(framework::dataset::combine(datasets::SqueezeNetConvolutionLayerDataset(), - framework::dataset::make("DataType", DataType::F32)), - framework::dataset::make("Batches", { 1, 4, 8 }))); + data_types), + framework::dataset::make("Batches", { 1, 4 }))); + +TEST_SUITE(NIGHTLY) +REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetDirectConvolutionLayer, CLConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, + framework::dataset::combine(framework::dataset::combine(datasets::AlexNetDirectConvolutionLayerDataset(), + data_types), + framework::dataset::make("Batches", 8))); +REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetDirectConvolutionLayer, CLConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, + framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetDirectConvolutionLayerDataset(), + data_types), + framework::dataset::make("Batches", 8))); + +REGISTER_FIXTURE_DATA_TEST_CASE(SqueezeNetDirectConvolutionLayer, CLConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, + framework::dataset::combine(framework::dataset::combine(datasets::SqueezeNetConvolutionLayerDataset(), + data_types), + framework::dataset::make("Batches", 8))); + +REGISTER_FIXTURE_DATA_TEST_CASE(YOLOV2DirectConvolutionLayer, CLConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, + framework::dataset::combine(framework::dataset::combine(datasets::YOLOV2ConvolutionLayerDataset(), + data_types), + framework::dataset::make("Batches", { 1, 4, 8 }))); +TEST_SUITE_END() TEST_SUITE_END() } // namespace test } // namespace arm_compute diff --git a/tests/benchmark_new/CL/FullyConnectedLayer.cpp b/tests/benchmark_new/CL/FullyConnectedLayer.cpp index a71c876ad6..e3404a0044 100644 --- a/tests/benchmark_new/CL/FullyConnectedLayer.cpp +++ b/tests/benchmark_new/CL/FullyConnectedLayer.cpp @@ -39,25 +39,46 @@ namespace arm_compute { namespace test { +namespace +{ +const auto data_types = framework::dataset::make("DataType", { DataType::F16, DataType::F32, DataType::QS8, DataType::QS16 }); +} // namespace + using CLFullyConnectedLayerFixture = FullyConnectedLayerFixture<CLTensor, CLFullyConnectedLayer, CLAccessor>; TEST_SUITE(CL) REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetFullyConnectedLayer, CLFullyConnectedLayerFixture, framework::DatasetMode::ALL, framework::dataset::combine(framework::dataset::combine(datasets::AlexNetFullyConnectedLayerDataset(), - framework::dataset::make("DataType", { DataType::F32 })), - framework::dataset::make("Batches", { 1, 4, 8 }))); + data_types), + framework::dataset::make("Batches", { 1, 4 }))); REGISTER_FIXTURE_DATA_TEST_CASE(LeNet5FullyConnectedLayer, CLFullyConnectedLayerFixture, framework::DatasetMode::ALL, framework::dataset::combine(framework::dataset::combine(datasets::LeNet5FullyConnectedLayerDataset(), - framework::dataset::make("DataType", DataType::F32)), - framework::dataset::make("Batches", { 1, 4, 8 }))); + data_types), + framework::dataset::make("Batches", { 1, 4 }))); REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetFullyConnectedLayer, CLFullyConnectedLayerFixture, framework::DatasetMode::ALL, framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetFullyConnectedLayerDataset(), - framework::dataset::make("DataType", DataType::F32)), - framework::dataset::make("Batches", { 1, 4, 8 }))); + data_types), + framework::dataset::make("Batches", { 1, 4 }))); + +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", 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", 8))); + +REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetFullyConnectedLayer, CLFullyConnectedLayerFixture, framework::DatasetMode::NIGHTLY, + framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetFullyConnectedLayerDataset(), + data_types), + framework::dataset::make("Batches", 8))); +TEST_SUITE_END() TEST_SUITE_END() } // namespace test } // namespace arm_compute diff --git a/tests/benchmark_new/CL/NormalizationLayer.cpp b/tests/benchmark_new/CL/NormalizationLayer.cpp index 7e2380ccc8..d5ae353512 100644 --- a/tests/benchmark_new/CL/NormalizationLayer.cpp +++ b/tests/benchmark_new/CL/NormalizationLayer.cpp @@ -40,7 +40,7 @@ namespace test { namespace { -const auto normalization_layer_data_types = framework::dataset::make("DataType", { DataType::QS8, DataType::QS16, DataType::F16, DataType::F32 }); +const auto data_types = framework::dataset::make("DataType", { DataType::QS8, DataType::QS16, DataType::F16, DataType::F32 }); } // namespace using CLNormalizationLayerFixture = NormalizationLayerFixture<CLTensor, CLNormalizationLayer, CLAccessor>; @@ -49,14 +49,25 @@ TEST_SUITE(CL) REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetNormalizationLayer, CLNormalizationLayerFixture, framework::DatasetMode::ALL, framework::dataset::combine(framework::dataset::combine(datasets::AlexNetNormalizationLayerDataset(), - normalization_layer_data_types), - framework::dataset::make("Batches", { 1, 4, 8 }))); + data_types), + framework::dataset::make("Batches", 1))); REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetNormalizationLayer, CLNormalizationLayerFixture, framework::DatasetMode::ALL, framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetNormalizationLayerDataset(), - normalization_layer_data_types), - framework::dataset::make("Batches", { 1, 4, 8 }))); + 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(GoogLeNetNormalizationLayer, CLNormalizationLayerFixture, framework::DatasetMode::NIGHTLY, + framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetNormalizationLayerDataset(), + data_types), + framework::dataset::make("Batches", { 4, 8 }))); +TEST_SUITE_END() TEST_SUITE_END() } // namespace test } // namespace arm_compute diff --git a/tests/benchmark_new/CL/PoolingLayer.cpp b/tests/benchmark_new/CL/PoolingLayer.cpp index de2299286b..4bbaa2aee2 100644 --- a/tests/benchmark_new/CL/PoolingLayer.cpp +++ b/tests/benchmark_new/CL/PoolingLayer.cpp @@ -34,36 +34,73 @@ #include "tests/datasets_new/GoogLeNetPoolingLayerDataset.h" #include "tests/datasets_new/LeNet5PoolingLayerDataset.h" #include "tests/datasets_new/SqueezeNetPoolingLayerDataset.h" +#include "tests/datasets_new/YOLOV2PoolingLayerDataset.h" #include "tests/fixtures_new/PoolingLayerFixture.h" namespace arm_compute { namespace test { +namespace +{ +const auto data_types = framework::dataset::make("DataType", { DataType::F16, DataType::F32 }); +} // namespace + using CLPoolingLayerFixture = PoolingLayerFixture<CLTensor, CLPoolingLayer, CLAccessor>; TEST_SUITE(CL) REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetPoolingLayer, CLPoolingLayerFixture, framework::DatasetMode::ALL, framework::dataset::combine(framework::dataset::combine(datasets::AlexNetPoolingLayerDataset(), - framework::dataset::make("DataType", { DataType::F32 })), - framework::dataset::make("Batches", { 1, 4, 8 }))); + data_types), + framework::dataset::make("Batches", 1))); REGISTER_FIXTURE_DATA_TEST_CASE(LeNet5PoolingLayer, CLPoolingLayerFixture, framework::DatasetMode::ALL, framework::dataset::combine(framework::dataset::combine(datasets::LeNet5PoolingLayerDataset(), - framework::dataset::make("DataType", DataType::F32)), - framework::dataset::make("Batches", { 1, 4, 8 }))); + data_types), + framework::dataset::make("Batches", 1))); REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetPoolingLayer, CLPoolingLayerFixture, framework::DatasetMode::ALL, framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetPoolingLayerDataset(), - framework::dataset::make("DataType", DataType::F32)), - framework::dataset::make("Batches", { 1, 4, 8 }))); + data_types), + framework::dataset::make("Batches", 1))); REGISTER_FIXTURE_DATA_TEST_CASE(SqueezeNetPoolingLayer, CLPoolingLayerFixture, framework::DatasetMode::ALL, framework::dataset::combine(framework::dataset::combine(datasets::SqueezeNetPoolingLayerDataset(), - framework::dataset::make("DataType", DataType::F32)), - framework::dataset::make("Batches", { 1, 4, 8 }))); + data_types), + framework::dataset::make("Batches", 1))); + +REGISTER_FIXTURE_DATA_TEST_CASE(YOLOV2PoolingLayer, CLPoolingLayerFixture, framework::DatasetMode::ALL, + framework::dataset::combine(framework::dataset::combine(datasets::YOLOV2PoolingLayerDataset(), + data_types), + framework::dataset::make("Batches", 1))); + +TEST_SUITE(NIGHTLY) +REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetPoolingLayer, CLPoolingLayerFixture, framework::DatasetMode::NIGHTLY, + framework::dataset::combine(framework::dataset::combine(datasets::AlexNetPoolingLayerDataset(), + data_types), + framework::dataset::make("Batches", { 4, 8 }))); + +REGISTER_FIXTURE_DATA_TEST_CASE(LeNet5PoolingLayer, CLPoolingLayerFixture, framework::DatasetMode::NIGHTLY, + framework::dataset::combine(framework::dataset::combine(datasets::LeNet5PoolingLayerDataset(), + data_types), + framework::dataset::make("Batches", { 4, 8 }))); + +REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetPoolingLayer, CLPoolingLayerFixture, framework::DatasetMode::NIGHTLY, + framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetPoolingLayerDataset(), + data_types), + framework::dataset::make("Batches", { 4, 8 }))); + +REGISTER_FIXTURE_DATA_TEST_CASE(SqueezeNetPoolingLayer, CLPoolingLayerFixture, framework::DatasetMode::NIGHTLY, + framework::dataset::combine(framework::dataset::combine(datasets::SqueezeNetPoolingLayerDataset(), + data_types), + framework::dataset::make("Batches", { 4, 8 }))); +REGISTER_FIXTURE_DATA_TEST_CASE(YOLOV2PoolingLayer, CLPoolingLayerFixture, framework::DatasetMode::NIGHTLY, + framework::dataset::combine(framework::dataset::combine(datasets::YOLOV2PoolingLayerDataset(), + data_types), + framework::dataset::make("Batches", { 4, 8 }))); +TEST_SUITE_END() TEST_SUITE_END() } // namespace test } // namespace arm_compute diff --git a/tests/benchmark_new/CL/SYSTEM/AlexNet.cpp b/tests/benchmark_new/CL/SYSTEM/AlexNet.cpp index 271ed9904e..4e5e729501 100644 --- a/tests/benchmark_new/CL/SYSTEM/AlexNet.cpp +++ b/tests/benchmark_new/CL/SYSTEM/AlexNet.cpp @@ -59,7 +59,7 @@ TEST_SUITE(CL) TEST_SUITE(SYSTEM_TEST) REGISTER_FIXTURE_DATA_TEST_CASE(AlexNet, CLAlexNetFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::make("DataType", DataType::F32), + framework::dataset::combine(framework::dataset::make("DataType", { DataType::F16, DataType::F32 }), framework::dataset::make("Batches", { 1, 4, 8 }))); TEST_SUITE_END() diff --git a/tests/benchmark_new/NEON/ActivationLayer.cpp b/tests/benchmark_new/NEON/ActivationLayer.cpp index beb98b487a..065d15dcec 100644 --- a/tests/benchmark_new/NEON/ActivationLayer.cpp +++ b/tests/benchmark_new/NEON/ActivationLayer.cpp @@ -30,7 +30,11 @@ #include "framework/datasets/Datasets.h" #include "tests/NEON/Accessor.h" #include "tests/TypePrinter.h" -#include "tests/datasets_new/ActivationLayerDataset.h" +#include "tests/datasets_new/AlexNetActivationLayerDataset.h" +#include "tests/datasets_new/GoogLeNetActivationLayerDataset.h" +#include "tests/datasets_new/LeNet5ActivationLayerDataset.h" +#include "tests/datasets_new/SqueezeNetActivationLayerDataset.h" +#include "tests/datasets_new/YOLOV2ActivationLayerDataset.h" #include "tests/fixtures_new/ActivationLayerFixture.h" namespace arm_compute @@ -40,13 +44,9 @@ namespace test namespace { #ifdef ARM_COMPUTE_ENABLE_FP16 -const auto alexnet_data_types = framework::dataset::make("DataType", { DataType::QS8, DataType::F16, DataType::F32 }); -const auto lenet_data_types = framework::dataset::make("DataType", { DataType::F16, DataType::F32 }); -const auto squeezenet_data_types = framework::dataset::make("DataType", { DataType::F16, DataType::F32 }); +const auto data_types = framework::dataset::make("DataType", { DataType::F16, DataType::F32, DataType::QS8, DataType::QS16 }); #else /* ARM_COMPUTE_ENABLE_FP16 */ -const auto alexnet_data_types = framework::dataset::make("DataType", { DataType::QS8, DataType::F32 }); -const auto lenet_data_types = framework::dataset::make("DataType", { DataType::F32 }); -const auto squeezenet_data_types = framework::dataset::make("DataType", { DataType::F32 }); +const auto data_types = framework::dataset::make("DataType", { DataType::F32, DataType::QS8, DataType::QS16 }); #endif /* ARM_COMPUTE_ENABLE_FP16 */ } // namespace @@ -55,21 +55,46 @@ using NEActivationLayerFixture = ActivationLayerFixture<Tensor, NEActivationLaye TEST_SUITE(NEON) REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetActivationLayer, NEActivationLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::AlexNetActivationLayerDataset(), alexnet_data_types), - framework::dataset::make("Batches", { 1, 4, 8 }))); + 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(), lenet_data_types), - framework::dataset::make("Batches", { 1, 4, 8 }))); + framework::dataset::combine(framework::dataset::combine(datasets::LeNet5ActivationLayerDataset(), data_types), + framework::dataset::make("Batches", 1))); REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetActivationLayer, NEActivationLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetActivationLayerDataset(), lenet_data_types), - framework::dataset::make("Batches", { 1, 4, 8 }))); + framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetActivationLayerDataset(), 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(), squeezenet_data_types), - framework::dataset::make("Batches", { 1, 4, 8 }))); + framework::dataset::combine(framework::dataset::combine(datasets::SqueezeNetActivationLayerDataset(), 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(GoogLeNetActivationLayer, NEActivationLayerFixture, framework::DatasetMode::NIGHTLY, + framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetActivationLayerDataset(), 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(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 test } // namespace arm_compute diff --git a/tests/benchmark_new/NEON/BatchNormalizationLayer.cpp b/tests/benchmark_new/NEON/BatchNormalizationLayer.cpp new file mode 100644 index 0000000000..da0ccd493e --- /dev/null +++ b/tests/benchmark_new/NEON/BatchNormalizationLayer.cpp @@ -0,0 +1,65 @@ +/* + * 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/NEBatchNormalizationLayer.h" +#include "arm_compute/runtime/Tensor.h" +#include "arm_compute/runtime/TensorAllocator.h" +#include "framework/Macros.h" +#include "framework/datasets/Datasets.h" +#include "tests/NEON/Accessor.h" +#include "tests/TypePrinter.h" + +#include "tests/datasets_new/YOLOV2BatchNormalizationLayerDataset.h" +#include "tests/fixtures_new/BatchNormalizationLayerFixture.h" + +namespace arm_compute +{ +namespace test +{ +namespace +{ +#ifdef ARM_COMPUTE_ENABLE_FP16 +const auto data_types = framework::dataset::make("DataType", { DataType::F16, DataType::F32, DataType::QS8 }); +#else /* ARM_COMPUTE_ENABLE_FP16 */ +const auto data_types = framework::dataset::make("DataType", { DataType::F32, DataType::QS8 }); +#endif /* ARM_COMPUTE_ENABLE_FP16 */ +} // namespace + +using NEBatchNormalizationLayerFixture = BatchNormalizationLayerFixture<Tensor, NEBatchNormalizationLayer, Accessor>; + +TEST_SUITE(NEON) + +REGISTER_FIXTURE_DATA_TEST_CASE(YOLOV2BatchNormalizationLayer, NEBatchNormalizationLayerFixture, framework::DatasetMode::ALL, + framework::dataset::combine(framework::dataset::combine(datasets::YOLOV2BatchNormalizationLayerDataset(), data_types), + framework::dataset::make("Batches", 1))); + +TEST_SUITE(NIGHTLY) +REGISTER_FIXTURE_DATA_TEST_CASE(YOLOV2BatchNormalizationLayer, NEBatchNormalizationLayerFixture, framework::DatasetMode::NIGHTLY, + framework::dataset::combine(framework::dataset::combine(datasets::YOLOV2BatchNormalizationLayerDataset(), data_types), + framework::dataset::make("Batches", { 4, 8 }))); +TEST_SUITE_END() +TEST_SUITE_END() +} // namespace test +} // namespace arm_compute diff --git a/tests/benchmark_new/NEON/ConvolutionLayer.cpp b/tests/benchmark_new/NEON/ConvolutionLayer.cpp index c7ffc23729..a26effb7ca 100644 --- a/tests/benchmark_new/NEON/ConvolutionLayer.cpp +++ b/tests/benchmark_new/NEON/ConvolutionLayer.cpp @@ -34,6 +34,7 @@ #include "tests/datasets_new/GoogLeNetConvolutionLayerDataset.h" #include "tests/datasets_new/LeNet5ConvolutionLayerDataset.h" #include "tests/datasets_new/SqueezeNetConvolutionLayerDataset.h" +#include "tests/datasets_new/YOLOV2ConvolutionLayerDataset.h" #include "tests/fixtures_new/ConvolutionLayerFixture.h" namespace arm_compute @@ -43,9 +44,9 @@ namespace test namespace { #ifdef ARM_COMPUTE_ENABLE_FP16 -const auto data_types = framework::dataset::make("DataType", { DataType::QS8, DataType::F16, DataType::F32 }); +const auto data_types = framework::dataset::make("DataType", { DataType::F16, DataType::F32, DataType::QS8, DataType::QS16 }); #else /* ARM_COMPUTE_ENABLE_FP16 */ -const auto data_types = framework::dataset::make("DataType", { DataType::QS8, DataType::F32 }); +const auto data_types = framework::dataset::make("DataType", { DataType::F32, DataType::QS8, DataType::QS16 }); #endif /* ARM_COMPUTE_ENABLE_FP16 */ } // namespace @@ -55,20 +56,41 @@ TEST_SUITE(NEON) REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetConvolutionLayer, NEConvolutionLayerFixture, framework::DatasetMode::ALL, framework::dataset::combine(framework::dataset::combine(datasets::AlexNetConvolutionLayerDataset(), data_types), - framework::dataset::make("Batches", { 1, 4, 8 }))); + framework::dataset::make("Batches", { 1, 4 }))); REGISTER_FIXTURE_DATA_TEST_CASE(LeNet5ConvolutionLayer, NEConvolutionLayerFixture, framework::DatasetMode::ALL, framework::dataset::combine(framework::dataset::combine(datasets::LeNet5ConvolutionLayerDataset(), data_types), - framework::dataset::make("Batches", { 1, 4, 8 }))); + framework::dataset::make("Batches", { 1, 4 }))); REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetConvolutionLayer, NEConvolutionLayerFixture, framework::DatasetMode::ALL, framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetConvolutionLayerDataset(), data_types), - framework::dataset::make("Batches", { 1, 4, 8 }))); + framework::dataset::make("Batches", { 1, 4 }))); REGISTER_FIXTURE_DATA_TEST_CASE(SqueezeNetConvolutionLayer, NEConvolutionLayerFixture, framework::DatasetMode::ALL, framework::dataset::combine(framework::dataset::combine(datasets::SqueezeNetConvolutionLayerDataset(), data_types), - framework::dataset::make("Batches", { 1, 4, 8 }))); + framework::dataset::make("Batches", { 1, 4 }))); + +TEST_SUITE(NIGHTLY) +REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetConvolutionLayer, NEConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, + framework::dataset::combine(framework::dataset::combine(datasets::AlexNetConvolutionLayerDataset(), data_types), + framework::dataset::make("Batches", 8))); + +REGISTER_FIXTURE_DATA_TEST_CASE(LeNet5ConvolutionLayer, NEConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, + framework::dataset::combine(framework::dataset::combine(datasets::LeNet5ConvolutionLayerDataset(), data_types), + framework::dataset::make("Batches", 8))); + +REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetConvolutionLayer, NEConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, + framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetConvolutionLayerDataset(), data_types), + framework::dataset::make("Batches", 8))); +REGISTER_FIXTURE_DATA_TEST_CASE(SqueezeNetConvolutionLayer, NEConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, + framework::dataset::combine(framework::dataset::combine(datasets::SqueezeNetConvolutionLayerDataset(), data_types), + framework::dataset::make("Batches", 8))); + +REGISTER_FIXTURE_DATA_TEST_CASE(YOLOV2ConvolutionLayer, NEConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, + framework::dataset::combine(framework::dataset::combine(datasets::YOLOV2ConvolutionLayerDataset(), data_types), + framework::dataset::make("Batches", { 1, 4, 8 }))); +TEST_SUITE_END() TEST_SUITE_END() } // namespace test } // namespace arm_compute diff --git a/tests/benchmark_new/NEON/DirectConvolutionLayer.cpp b/tests/benchmark_new/NEON/DirectConvolutionLayer.cpp index 892976d316..e6fddba034 100644 --- a/tests/benchmark_new/NEON/DirectConvolutionLayer.cpp +++ b/tests/benchmark_new/NEON/DirectConvolutionLayer.cpp @@ -34,6 +34,7 @@ #include "tests/datasets_new/DirectConvolutionLayerDataset.h" #include "tests/datasets_new/GoogLeNetConvolutionLayerDataset.h" #include "tests/datasets_new/SqueezeNetConvolutionLayerDataset.h" +#include "tests/datasets_new/YOLOV2ConvolutionLayerDataset.h" #include "tests/fixtures_new/ConvolutionLayerFixture.h" namespace arm_compute @@ -53,22 +54,35 @@ using NEConvolutionLayerFixture = ConvolutionLayerFixture<Tensor, NEDirectConvol TEST_SUITE(NEON) -REGISTER_FIXTURE_DATA_TEST_CASE(DirectConvolutionLayer, NEConvolutionLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::DirectConvolutionLayerDataset(), data_types), - framework::dataset::make("Batches", { 1, 4, 8 }))); - REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetDirectConvolutionLayer, NEConvolutionLayerFixture, framework::DatasetMode::ALL, framework::dataset::combine(framework::dataset::combine(datasets::AlexNetDirectConvolutionLayerDataset(), data_types), - framework::dataset::make("Batches", { 1, 4, 8 }))); + framework::dataset::make("Batches", { 1, 4 }))); REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetDirectConvolutionLayer, NEConvolutionLayerFixture, framework::DatasetMode::ALL, framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetDirectConvolutionLayerDataset(), data_types), - framework::dataset::make("Batches", { 1, 4, 8 }))); + framework::dataset::make("Batches", { 1, 4 }))); REGISTER_FIXTURE_DATA_TEST_CASE(SqueezeNetDirectConvolutionLayer, NEConvolutionLayerFixture, framework::DatasetMode::ALL, framework::dataset::combine(framework::dataset::combine(datasets::SqueezeNetConvolutionLayerDataset(), data_types), - framework::dataset::make("Batches", { 1, 4, 8 }))); + framework::dataset::make("Batches", { 1, 4 }))); + +TEST_SUITE(NIGHTLY) +REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetDirectConvolutionLayer, NEConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, + framework::dataset::combine(framework::dataset::combine(datasets::AlexNetDirectConvolutionLayerDataset(), data_types), + framework::dataset::make("Batches", 8))); +REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetDirectConvolutionLayer, NEConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, + framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetDirectConvolutionLayerDataset(), data_types), + framework::dataset::make("Batches", 8))); + +REGISTER_FIXTURE_DATA_TEST_CASE(SqueezeNetDirectConvolutionLayer, NEConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, + framework::dataset::combine(framework::dataset::combine(datasets::SqueezeNetConvolutionLayerDataset(), data_types), + framework::dataset::make("Batches", 8))); + +REGISTER_FIXTURE_DATA_TEST_CASE(YOLOV2DirectConvolutionLayer, NEConvolutionLayerFixture, framework::DatasetMode::NIGHTLY, + framework::dataset::combine(framework::dataset::combine(datasets::YOLOV2ConvolutionLayerDataset(), data_types), + framework::dataset::make("Batches", { 1, 4, 8 }))); +TEST_SUITE_END() TEST_SUITE_END() } // namespace test } // namespace arm_compute diff --git a/tests/benchmark_new/NEON/FullyConnectedLayer.cpp b/tests/benchmark_new/NEON/FullyConnectedLayer.cpp index eb5612348a..daeb791977 100644 --- a/tests/benchmark_new/NEON/FullyConnectedLayer.cpp +++ b/tests/benchmark_new/NEON/FullyConnectedLayer.cpp @@ -39,25 +39,50 @@ namespace arm_compute { namespace test { +namespace +{ +#ifdef ARM_COMPUTE_ENABLE_FP16 +const auto data_types = framework::dataset::make("DataType", { DataType::F16, DataType::F32, DataType::QS8, DataType::QS16 }); +#else /* ARM_COMPUTE_ENABLE_FP16 */ +const auto data_types = framework::dataset::make("DataType", { DataType::F32, DataType::QS8, DataType::QS16 }); +#endif /* ARM_COMPUTE_ENABLE_FP16 */ +} // namespace + using NEFullyConnectedLayerFixture = FullyConnectedLayerFixture<Tensor, NEFullyConnectedLayer, Accessor>; TEST_SUITE(NEON) REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetFullyConnectedLayer, NEFullyConnectedLayerFixture, framework::DatasetMode::ALL, framework::dataset::combine(framework::dataset::combine(datasets::AlexNetFullyConnectedLayerDataset(), - framework::dataset::make("DataType", { DataType::F32, DataType::QS8 })), - framework::dataset::make("Batches", { 1, 4, 8 }))); + data_types), + framework::dataset::make("Batches", { 1, 4 }))); REGISTER_FIXTURE_DATA_TEST_CASE(LeNet5FullyConnectedLayer, NEFullyConnectedLayerFixture, framework::DatasetMode::ALL, framework::dataset::combine(framework::dataset::combine(datasets::LeNet5FullyConnectedLayerDataset(), - framework::dataset::make("DataType", DataType::F32)), - framework::dataset::make("Batches", { 1, 4, 8 }))); + data_types), + framework::dataset::make("Batches", { 1, 4 }))); REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetFullyConnectedLayer, NEFullyConnectedLayerFixture, framework::DatasetMode::ALL, framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetFullyConnectedLayerDataset(), - framework::dataset::make("DataType", DataType::F32)), - framework::dataset::make("Batches", { 1, 4, 8 }))); + data_types), + framework::dataset::make("Batches", { 1, 4 }))); + +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", 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", 8))); + +REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetFullyConnectedLayer, NEFullyConnectedLayerFixture, framework::DatasetMode::NIGHTLY, + framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetFullyConnectedLayerDataset(), + data_types), + framework::dataset::make("Batches", 8))); +TEST_SUITE_END() TEST_SUITE_END() } // namespace test } // namespace arm_compute diff --git a/tests/benchmark_new/NEON/NormalizationLayer.cpp b/tests/benchmark_new/NEON/NormalizationLayer.cpp index de7183d2ec..5496e183ce 100644 --- a/tests/benchmark_new/NEON/NormalizationLayer.cpp +++ b/tests/benchmark_new/NEON/NormalizationLayer.cpp @@ -41,9 +41,9 @@ namespace test namespace { #ifdef ARM_COMPUTE_ENABLE_FP16 -const auto normalization_layer_data_types = framework::dataset::make("DataType", { DataType::QS8, DataType::QS16, DataType::F16, DataType::F32 }); +const auto data_types = framework::dataset::make("DataType", { DataType::QS8, DataType::QS16, DataType::F16, DataType::F32 }); #else /* ARM_COMPUTE_ENABLE_FP16 */ -const auto normalization_layer_data_types = framework::dataset::make("DataType", { DataType::QS8, DataType::QS16, DataType::F32 }); +const auto data_types = framework::dataset::make("DataType", { DataType::QS8, DataType::QS16, DataType::F32 }); #endif /* ARM_COMPUTE_ENABLE_FP16 */ } // namespace using NENormalizationLayerFixture = NormalizationLayerFixture<Tensor, NENormalizationLayer, Accessor>; @@ -52,14 +52,25 @@ TEST_SUITE(NEON) REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetNormalizationLayer, NENormalizationLayerFixture, framework::DatasetMode::ALL, framework::dataset::combine(framework::dataset::combine(datasets::AlexNetNormalizationLayerDataset(), - normalization_layer_data_types), - framework::dataset::make("Batches", { 1, 4, 8 }))); + data_types), + framework::dataset::make("Batches", 1))); REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetNormalizationLayer, NENormalizationLayerFixture, framework::DatasetMode::ALL, framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetNormalizationLayerDataset(), - normalization_layer_data_types), - framework::dataset::make("Batches", { 1, 4, 8 }))); + 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(GoogLeNetNormalizationLayer, NENormalizationLayerFixture, framework::DatasetMode::NIGHTLY, + framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetNormalizationLayerDataset(), + data_types), + framework::dataset::make("Batches", { 4, 8 }))); +TEST_SUITE_END() TEST_SUITE_END() } // namespace test } // namespace arm_compute diff --git a/tests/benchmark_new/NEON/PoolingLayer.cpp b/tests/benchmark_new/NEON/PoolingLayer.cpp index 099102441a..af2a925a7e 100644 --- a/tests/benchmark_new/NEON/PoolingLayer.cpp +++ b/tests/benchmark_new/NEON/PoolingLayer.cpp @@ -34,6 +34,7 @@ #include "tests/datasets_new/GoogLeNetPoolingLayerDataset.h" #include "tests/datasets_new/LeNet5PoolingLayerDataset.h" #include "tests/datasets_new/SqueezeNetPoolingLayerDataset.h" +#include "tests/datasets_new/YOLOV2PoolingLayerDataset.h" #include "tests/fixtures_new/PoolingLayerFixture.h" namespace arm_compute @@ -43,13 +44,9 @@ namespace test namespace { #ifdef ARM_COMPUTE_ENABLE_FP16 -const auto alexnet_data_types = framework::dataset::make("DataType", { DataType::QS8, DataType::F16, DataType::F32 }); -const auto lenet_data_types = framework::dataset::make("DataType", { DataType::F16, DataType::F32 }); -const auto squeezenet_data_types = framework::dataset::make("DataType", { DataType::F16, DataType::F32 }); +const auto data_types = framework::dataset::make("DataType", { DataType::F16, DataType::F32, DataType::QS8 }); #else /* ARM_COMPUTE_ENABLE_FP16 */ -const auto alexnet_data_types = framework::dataset::make("DataType", { DataType::QS8, DataType::F32 }); -const auto lenet_data_types = framework::dataset::make("DataType", { DataType::F32 }); -const auto squeezenet_data_types = framework::dataset::make("DataType", { DataType::F32 }); +const auto data_types = framework::dataset::make("DataType", { DataType::F32, DataType::QS8 }); #endif /* ARM_COMPUTE_ENABLE_FP16 */ } // namespace @@ -58,17 +55,36 @@ using NEPoolingLayerFixture = PoolingLayerFixture<Tensor, NEPoolingLayer, Access TEST_SUITE(NEON) REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetPoolingLayer, NEPoolingLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::AlexNetPoolingLayerDataset(), alexnet_data_types), framework::dataset::make("Batches", { 1, 4, 8 }))); + framework::dataset::combine(framework::dataset::combine(datasets::AlexNetPoolingLayerDataset(), data_types), framework::dataset::make("Batches", 1))); REGISTER_FIXTURE_DATA_TEST_CASE(LeNet5PoolingLayer, NEPoolingLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::LeNet5PoolingLayerDataset(), lenet_data_types), framework::dataset::make("Batches", { 1, 4, 8 }))); + framework::dataset::combine(framework::dataset::combine(datasets::LeNet5PoolingLayerDataset(), data_types), framework::dataset::make("Batches", 1))); REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetPoolingLayer, NEPoolingLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetPoolingLayerDataset(), lenet_data_types), framework::dataset::make("Batches", { 1, 4, 8 }))); + framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetPoolingLayerDataset(), data_types), framework::dataset::make("Batches", 1))); REGISTER_FIXTURE_DATA_TEST_CASE(SqueezeNetPoolingLayer, NEPoolingLayerFixture, framework::DatasetMode::ALL, - framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetPoolingLayerDataset(), squeezenet_data_types), framework::dataset::make("Batches", { 1, 4, 8 }))); + framework::dataset::combine(framework::dataset::combine(datasets::SqueezeNetPoolingLayerDataset(), data_types), framework::dataset::make("Batches", 1))); +REGISTER_FIXTURE_DATA_TEST_CASE(YOLOV2PoolingLayer, NEPoolingLayerFixture, framework::DatasetMode::ALL, + framework::dataset::combine(framework::dataset::combine(datasets::YOLOV2PoolingLayerDataset(), data_types), framework::dataset::make("Batches", 1))); + +TEST_SUITE(NIGHTLY) +REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetPoolingLayer, NEPoolingLayerFixture, framework::DatasetMode::NIGHTLY, + framework::dataset::combine(framework::dataset::combine(datasets::AlexNetPoolingLayerDataset(), data_types), framework::dataset::make("Batches", { 4, 8 }))); + +REGISTER_FIXTURE_DATA_TEST_CASE(LeNet5PoolingLayer, NEPoolingLayerFixture, framework::DatasetMode::NIGHTLY, + framework::dataset::combine(framework::dataset::combine(datasets::LeNet5PoolingLayerDataset(), data_types), framework::dataset::make("Batches", { 4, 8 }))); + +REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetPoolingLayer, NEPoolingLayerFixture, framework::DatasetMode::NIGHTLY, + framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetPoolingLayerDataset(), data_types), framework::dataset::make("Batches", { 4, 8 }))); + +REGISTER_FIXTURE_DATA_TEST_CASE(SqueezeNetPoolingLayer, NEPoolingLayerFixture, framework::DatasetMode::NIGHTLY, + framework::dataset::combine(framework::dataset::combine(datasets::SqueezeNetPoolingLayerDataset(), data_types), framework::dataset::make("Batches", { 4, 8 }))); + +REGISTER_FIXTURE_DATA_TEST_CASE(YOLOV2PoolingLayer, NEPoolingLayerFixture, framework::DatasetMode::NIGHTLY, + framework::dataset::combine(framework::dataset::combine(datasets::YOLOV2PoolingLayerDataset(), data_types), framework::dataset::make("Batches", { 4, 8 }))); +TEST_SUITE_END() TEST_SUITE_END() } // namespace test } // namespace arm_compute |