aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Tello <pablo.tello@arm.com>2017-12-01 09:58:32 +0000
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:41:58 +0000
commit8108d2e3c91f400a28ac6236d8d1548ea94bf2be (patch)
treefc6bf39dde84ac4175db0196112f834a76086d39
parent3d4968ac573cc206ac1c6adcfd6f1d4689a715d1 (diff)
downloadComputeLibrary-8108d2e3c91f400a28ac6236d8d1548ea94bf2be.tar.gz
COMPMID-718: Added winograd benchmarking tests.
Change-Id: I2b5fea83eab24471e7e070a09103a350aaada87f Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/111466 Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Tested-by: BSG Visual Compute Jenkins server to access repositories on http://mpd-gerrit.cambridge.arm.com <bsgcomp@arm.com>
-rw-r--r--tests/benchmark/NEON/ConvolutionLayer.cpp38
-rw-r--r--tests/datasets/system_tests/alexnet/AlexNetConvolutionLayerDataset.h11
-rw-r--r--tests/datasets/system_tests/googlenet/inceptionv1/GoogLeNetInceptionV1ConvolutionLayerDataset.h28
-rw-r--r--tests/datasets/system_tests/googlenet/inceptionv4/GoogLeNetInceptionV4ConvolutionLayerDataset.h21
-rw-r--r--tests/datasets/system_tests/squeezenet/SqueezeNetConvolutionLayerDataset.h16
5 files changed, 114 insertions, 0 deletions
diff --git a/tests/benchmark/NEON/ConvolutionLayer.cpp b/tests/benchmark/NEON/ConvolutionLayer.cpp
index 768a2907ae..45138d713e 100644
--- a/tests/benchmark/NEON/ConvolutionLayer.cpp
+++ b/tests/benchmark/NEON/ConvolutionLayer.cpp
@@ -24,6 +24,7 @@
#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/NEWinogradLayer.h"
#include "arm_compute/runtime/Tensor.h"
#include "arm_compute/runtime/TensorAllocator.h"
#include "tests/NEON/Accessor.h"
@@ -55,6 +56,25 @@ const auto data_types = framework::dataset::make("DataType", { DataType::F32, Da
using NEConvolutionLayerFixture = ConvolutionLayerFixture<Tensor, NEConvolutionLayer, Accessor>;
TEST_SUITE(NEON)
+#if defined(__aarch64__)
+using NEWinogradLayerFixture = ConvolutionLayerFixture<Tensor, NEWinogradLayer, Accessor>;
+
+REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetWinogradLayer, NEWinogradLayerFixture, framework::DatasetMode::ALL,
+ framework::dataset::combine(framework::dataset::combine(datasets::AlexNetWinogradLayerDataset(), framework::dataset::make("DataType", DataType::F32)),
+ framework::dataset::make("Batches", 1)));
+
+REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV1WinogradLayer, NEWinogradLayerFixture, framework::DatasetMode::ALL,
+ framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV1WinogradLayerDataset(), framework::dataset::make("DataType", DataType::F32)),
+ framework::dataset::make("Batches", 1)));
+
+REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV4WinogradLayer, NEWinogradLayerFixture, framework::DatasetMode::ALL,
+ framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV4WinogradLayerDataset(), framework::dataset::make("DataType", DataType::F32)),
+ framework::dataset::make("Batches", 1)));
+
+REGISTER_FIXTURE_DATA_TEST_CASE(SqueezeNetWinogradLayer, NEWinogradLayerFixture, framework::DatasetMode::ALL,
+ framework::dataset::combine(framework::dataset::combine(datasets::SqueezeNetWinogradLayerDataset(), framework::dataset::make("DataType", DataType::F32)),
+ framework::dataset::make("Batches", 1)));
+#endif /* __aarch64__ */
REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetConvolutionLayer, NEConvolutionLayerFixture, framework::DatasetMode::ALL,
framework::dataset::combine(framework::dataset::combine(datasets::AlexNetConvolutionLayerDataset(), data_types),
@@ -106,6 +126,24 @@ REGISTER_FIXTURE_DATA_TEST_CASE(YOLOV2ConvolutionLayer, NEConvolutionLayerFixtur
framework::dataset::combine(framework::dataset::combine(datasets::YOLOV2ConvolutionLayerDataset(), data_types),
framework::dataset::make("Batches", { 1, 4, 8 })));
+#if defined(__aarch64__)
+REGISTER_FIXTURE_DATA_TEST_CASE(AlexNetWinogradLayer, NEWinogradLayerFixture, framework::DatasetMode::NIGHTLY,
+ framework::dataset::combine(framework::dataset::combine(datasets::AlexNetWinogradLayerDataset(), framework::dataset::make("DataType", DataType::F32)),
+ framework::dataset::make("Batches", { 4, 8 })));
+
+REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV1WinogradLayer, NEWinogradLayerFixture, framework::DatasetMode::NIGHTLY,
+ framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV1WinogradLayerDataset(), framework::dataset::make("DataType", DataType::F32)),
+ framework::dataset::make("Batches", { 4, 8 })));
+
+REGISTER_FIXTURE_DATA_TEST_CASE(GoogLeNetInceptionV4WinogradLayer, NEWinogradLayerFixture, framework::DatasetMode::NIGHTLY,
+ framework::dataset::combine(framework::dataset::combine(datasets::GoogLeNetInceptionV4WinogradLayerDataset(), framework::dataset::make("DataType", DataType::F32)),
+ framework::dataset::make("Batches", { 4, 8 })));
+
+REGISTER_FIXTURE_DATA_TEST_CASE(SqueezeNetWinogradLayer, NEWinogradLayerFixture, framework::DatasetMode::NIGHTLY,
+ framework::dataset::combine(framework::dataset::combine(datasets::SqueezeNetWinogradLayerDataset(), framework::dataset::make("DataType", DataType::F32)),
+ framework::dataset::make("Batches", { 4, 8 })));
+#endif /* __aarch64__ */
+
TEST_SUITE_END()
TEST_SUITE_END()
} // namespace test
diff --git a/tests/datasets/system_tests/alexnet/AlexNetConvolutionLayerDataset.h b/tests/datasets/system_tests/alexnet/AlexNetConvolutionLayerDataset.h
index 0b2058896f..034e1bbf89 100644
--- a/tests/datasets/system_tests/alexnet/AlexNetConvolutionLayerDataset.h
+++ b/tests/datasets/system_tests/alexnet/AlexNetConvolutionLayerDataset.h
@@ -37,6 +37,17 @@ namespace test
{
namespace datasets
{
+class AlexNetWinogradLayerDataset final : public ConvolutionLayerDataset
+{
+public:
+ AlexNetWinogradLayerDataset()
+ {
+ add_config(TensorShape(13U, 13U, 256U), TensorShape(3U, 3U, 256U, 384U), TensorShape(384U), TensorShape(13U, 13U, 384U), PadStrideInfo(1, 1, 1, 1));
+ add_config(TensorShape(13U, 13U, 192U), TensorShape(3U, 3U, 192U, 192U), TensorShape(192U), TensorShape(13U, 13U, 192U), PadStrideInfo(1, 1, 1, 1));
+ add_config(TensorShape(13U, 13U, 192U), TensorShape(3U, 3U, 192U, 128U), TensorShape(128U), TensorShape(13U, 13U, 128U), PadStrideInfo(1, 1, 1, 1));
+ }
+};
+
class AlexNetConvolutionLayerDataset final : public ConvolutionLayerDataset
{
public:
diff --git a/tests/datasets/system_tests/googlenet/inceptionv1/GoogLeNetInceptionV1ConvolutionLayerDataset.h b/tests/datasets/system_tests/googlenet/inceptionv1/GoogLeNetInceptionV1ConvolutionLayerDataset.h
index c8c5106dde..b494bf439a 100644
--- a/tests/datasets/system_tests/googlenet/inceptionv1/GoogLeNetInceptionV1ConvolutionLayerDataset.h
+++ b/tests/datasets/system_tests/googlenet/inceptionv1/GoogLeNetInceptionV1ConvolutionLayerDataset.h
@@ -37,6 +37,34 @@ namespace test
{
namespace datasets
{
+class GoogLeNetInceptionV1WinogradLayerDataset final : public ConvolutionLayerDataset
+{
+public:
+ // GoogLeNetInceptionV1 inception v1 dataset
+ GoogLeNetInceptionV1WinogradLayerDataset()
+ {
+ add_config(TensorShape(56U, 56U, 64U), TensorShape(3U, 3U, 64U, 192U), TensorShape(192U), TensorShape(56U, 56U, 192U), PadStrideInfo(1, 1, 1, 1));
+ // inception_3a/3x3
+ add_config(TensorShape(28U, 28U, 96U), TensorShape(3U, 3U, 96U, 128U), TensorShape(128U), TensorShape(28U, 28U, 128U), PadStrideInfo(1, 1, 1, 1));
+ // inception_3b/3x3
+ add_config(TensorShape(28U, 28U, 128U), TensorShape(3U, 3U, 128U, 192U), TensorShape(192U), TensorShape(28U, 28U, 192U), PadStrideInfo(1, 1, 1, 1));
+ // inception_4a/3x3
+ add_config(TensorShape(14U, 14U, 96U), TensorShape(3U, 3U, 96U, 208U), TensorShape(208U), TensorShape(14U, 14U, 208U), PadStrideInfo(1, 1, 1, 1));
+ // inception_4b/3x3
+ add_config(TensorShape(14U, 14U, 112U), TensorShape(3U, 3U, 112U, 224U), TensorShape(224U), TensorShape(14U, 14U, 224U), PadStrideInfo(1, 1, 1, 1));
+ // inception_4c/3x3
+ add_config(TensorShape(14U, 14U, 128U), TensorShape(3U, 3U, 128U, 256U), TensorShape(256U), TensorShape(14U, 14U, 256U), PadStrideInfo(1, 1, 1, 1));
+ // inception_4d/3x3
+ add_config(TensorShape(14U, 14U, 144U), TensorShape(3U, 3U, 144U, 288U), TensorShape(288U), TensorShape(14U, 14U, 288U), PadStrideInfo(1, 1, 1, 1));
+ // inception_4e/3x3
+ add_config(TensorShape(14U, 14U, 160U), TensorShape(3U, 3U, 160U, 320U), TensorShape(320U), TensorShape(14U, 14U, 320U), PadStrideInfo(1, 1, 1, 1));
+ // inception_5a/3x3
+ add_config(TensorShape(7U, 7U, 160U), TensorShape(3U, 3U, 160U, 320U), TensorShape(320U), TensorShape(7U, 7U, 320U), PadStrideInfo(1, 1, 1, 1));
+ // inception_5b/3x3
+ add_config(TensorShape(7U, 7U, 192U), TensorShape(3U, 3U, 192U, 384U), TensorShape(384U), TensorShape(7U, 7U, 384U), PadStrideInfo(1, 1, 1, 1));
+ }
+};
+
class GoogLeNetInceptionV1ConvolutionLayerDataset final : public ConvolutionLayerDataset
{
public:
diff --git a/tests/datasets/system_tests/googlenet/inceptionv4/GoogLeNetInceptionV4ConvolutionLayerDataset.h b/tests/datasets/system_tests/googlenet/inceptionv4/GoogLeNetInceptionV4ConvolutionLayerDataset.h
index 3dd8a7c348..03a8629806 100644
--- a/tests/datasets/system_tests/googlenet/inceptionv4/GoogLeNetInceptionV4ConvolutionLayerDataset.h
+++ b/tests/datasets/system_tests/googlenet/inceptionv4/GoogLeNetInceptionV4ConvolutionLayerDataset.h
@@ -37,6 +37,27 @@ namespace test
{
namespace datasets
{
+class GoogLeNetInceptionV4WinogradLayerDataset final : public ConvolutionLayerDataset
+{
+public:
+ // GoogLeNetInceptionV4 inception v1 dataset
+ GoogLeNetInceptionV4WinogradLayerDataset()
+ {
+ // conv2_3x3_s1
+ add_config(TensorShape(149U, 149U, 32U), TensorShape(3U, 3U, 32U, 32U), TensorShape(32U), TensorShape(147U, 147U, 32U), PadStrideInfo(1, 1, 0, 0));
+ // conv3_3x3_s1
+ add_config(TensorShape(147U, 147U, 32U), TensorShape(3U, 3U, 32U, 64U), TensorShape(64U), TensorShape(147U, 147U, 64U), PadStrideInfo(1, 1, 1, 1));
+ // inception_stem2_3x3, inception_stem2_3x3_2
+ add_config(TensorShape(73U, 73U, 64U), TensorShape(3U, 3U, 64U, 96U), TensorShape(96U), TensorShape(71U, 71U, 96U), PadStrideInfo(1, 1, 0, 0));
+ // inception_a1_3x3, inception_a1_3x3_2, inception_a2_3x3, inception_a2_3x3_2, inception_a3_3x3, inception_a3_3x3_2, inception_a4_3x3, inception_a4_3x3_2
+ add_config(TensorShape(35U, 35U, 64U), TensorShape(3U, 3U, 64U, 96U), TensorShape(96U), TensorShape(35U, 35U, 96U), PadStrideInfo(1, 1, 1, 1));
+ // inception_a1_3x3_3, inception_a2_3x3_3, inception_a3_3x3_3, inception_a4_3x3_3
+ add_config(TensorShape(35U, 35U, 96U), TensorShape(3U, 3U, 96U, 96U), TensorShape(96U), TensorShape(35U, 35U, 96U), PadStrideInfo(1, 1, 1, 1));
+ // reduction_a_3x3_2
+ add_config(TensorShape(35U, 35U, 192U), TensorShape(3U, 3U, 192U, 224U), TensorShape(224U), TensorShape(35U, 35U, 224U), PadStrideInfo(1, 1, 1, 1));
+ }
+};
+
class GoogLeNetInceptionV4ConvolutionLayerDataset final : public ConvolutionLayerDataset
{
public:
diff --git a/tests/datasets/system_tests/squeezenet/SqueezeNetConvolutionLayerDataset.h b/tests/datasets/system_tests/squeezenet/SqueezeNetConvolutionLayerDataset.h
index 2bb9db7240..f98d90a9d6 100644
--- a/tests/datasets/system_tests/squeezenet/SqueezeNetConvolutionLayerDataset.h
+++ b/tests/datasets/system_tests/squeezenet/SqueezeNetConvolutionLayerDataset.h
@@ -37,6 +37,22 @@ namespace test
{
namespace datasets
{
+class SqueezeNetWinogradLayerDataset final : public ConvolutionLayerDataset
+{
+public:
+ SqueezeNetWinogradLayerDataset()
+ {
+ // fire2/expand3x3, fire3/expand3x3
+ add_config(TensorShape(55U, 55U, 16U), TensorShape(3U, 3U, 16U, 64U), TensorShape(64U), TensorShape(55U, 55U, 64U), PadStrideInfo(1, 1, 1, 1));
+ // fire4/expand3x3, fire5/expand3x3
+ add_config(TensorShape(27U, 27U, 32U), TensorShape(3U, 3U, 32U, 128U), TensorShape(128U), TensorShape(27U, 27U, 128U), PadStrideInfo(1, 1, 1, 1));
+ // fire6/expand3x3, fire7/expand3x3
+ add_config(TensorShape(13U, 13U, 48U), TensorShape(3U, 3U, 48U, 192U), TensorShape(192U), TensorShape(13U, 13U, 192U), PadStrideInfo(1, 1, 1, 1));
+ // fire8/expand3x3, fire9/expand3x3
+ add_config(TensorShape(13U, 13U, 64U), TensorShape(3U, 3U, 64U, 256U), TensorShape(256U), TensorShape(13U, 13U, 256U), PadStrideInfo(1, 1, 1, 1));
+ }
+};
+
class SqueezeNetConvolutionLayerDataset final : public ConvolutionLayerDataset
{
public: