aboutsummaryrefslogtreecommitdiff
path: root/tests/benchmark
diff options
context:
space:
mode:
authorMoritz Pflanzer <moritz.pflanzer@arm.com>2017-06-30 12:48:43 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-09-17 14:15:39 +0100
commit94450f1fc91a89778354c2e1c07a328ba86d9cfc (patch)
tree9a84b1b86f5361027492b6698ea946d2e321baba /tests/benchmark
parentd4f8c27f08c968f608a9e0e9b88df1871f62cdd3 (diff)
downloadComputeLibrary-94450f1fc91a89778354c2e1c07a328ba86d9cfc.tar.gz
COMPMID-417: Use a common create_tensor function
Change-Id: I6b0511484a5b433ebec3fd62d778e64dcb4f89b5 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/79362 Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Diffstat (limited to 'tests/benchmark')
-rw-r--r--tests/benchmark/CL/ActivationLayer.cpp1
-rw-r--r--tests/benchmark/CL/BitwiseAnd.cpp8
-rw-r--r--tests/benchmark/CL/ConvolutionLayer.cpp1
-rw-r--r--tests/benchmark/CL/FullyConnectedLayer.cpp1
-rw-r--r--tests/benchmark/CL/GEMM.cpp1
-rw-r--r--tests/benchmark/CL/GEMM.h8
-rw-r--r--tests/benchmark/CL/NormalizationLayer.cpp1
-rw-r--r--tests/benchmark/CL/PoolingLayer.cpp1
-rw-r--r--tests/benchmark/NEON/ActivationLayer.cpp1
-rw-r--r--tests/benchmark/NEON/BitwiseAnd.cpp8
-rw-r--r--tests/benchmark/NEON/ConvolutionLayer.cpp1
-rw-r--r--tests/benchmark/NEON/ConvolutionLayerDirect.cpp1
-rw-r--r--tests/benchmark/NEON/FullyConnectedLayer.cpp1
-rw-r--r--tests/benchmark/NEON/GEMM.cpp1
-rw-r--r--tests/benchmark/NEON/GEMM.h8
-rw-r--r--tests/benchmark/NEON/NormalizationLayer.cpp1
-rw-r--r--tests/benchmark/NEON/PoolingLayer.cpp1
-rw-r--r--tests/benchmark/common/ActivationLayer.h4
-rw-r--r--tests/benchmark/common/ConvolutionLayer.h8
-rw-r--r--tests/benchmark/common/FullyConnectedLayer.h8
-rw-r--r--tests/benchmark/common/NormalizationLayer.h4
-rw-r--r--tests/benchmark/common/PoolingLayer.h4
-rw-r--r--tests/benchmark/system_tests/CL/AlexNet.cpp1
-rw-r--r--tests/benchmark/system_tests/CL/LeNet5.cpp1
-rw-r--r--tests/benchmark/system_tests/NEON/AlexNet.cpp1
-rw-r--r--tests/benchmark/system_tests/NEON/LeNet5.cpp1
-rw-r--r--tests/benchmark/system_tests/common/AlexNet.h4
-rw-r--r--tests/benchmark/system_tests/common/LeNet5.h6
28 files changed, 35 insertions, 52 deletions
diff --git a/tests/benchmark/CL/ActivationLayer.cpp b/tests/benchmark/CL/ActivationLayer.cpp
index 5180d3d900..52a357b2a6 100644
--- a/tests/benchmark/CL/ActivationLayer.cpp
+++ b/tests/benchmark/CL/ActivationLayer.cpp
@@ -22,7 +22,6 @@
* SOFTWARE.
*/
#include "CL/CLAccessor.h"
-#include "CL/Helper.h"
#include "Globals.h"
#include "TensorLibrary.h"
#include "benchmark/Datasets.h"
diff --git a/tests/benchmark/CL/BitwiseAnd.cpp b/tests/benchmark/CL/BitwiseAnd.cpp
index a3deb3eb5b..4858c73948 100644
--- a/tests/benchmark/CL/BitwiseAnd.cpp
+++ b/tests/benchmark/CL/BitwiseAnd.cpp
@@ -22,7 +22,6 @@
* SOFTWARE.
*/
#include "CL/CLAccessor.h"
-#include "CL/Helper.h"
#include "Globals.h"
#include "TensorLibrary.h"
#include "benchmark/Datasets.h"
@@ -59,11 +58,12 @@ public:
profiler.add(std::make_shared<WallClockTimer>());
const std::string image_name = *(DataSet().begin() + state.range(0));
+ const RawTensor &raw = library->get(image_name);
// Create tensors
- src1 = create_tensor(image_name, DataType::U8);
- src2 = create_tensor(image_name, DataType::U8);
- dst = create_tensor(image_name, DataType::U8);
+ src1 = create_tensor<CLTensor>(raw.shape(), DataType::U8);
+ src2 = create_tensor<CLTensor>(raw.shape(), DataType::U8);
+ dst = create_tensor<CLTensor>(raw.shape(), DataType::U8);
// Create and configure function
band.configure(&src1, &src2, &dst);
diff --git a/tests/benchmark/CL/ConvolutionLayer.cpp b/tests/benchmark/CL/ConvolutionLayer.cpp
index e1f4fabdc3..e790273f9c 100644
--- a/tests/benchmark/CL/ConvolutionLayer.cpp
+++ b/tests/benchmark/CL/ConvolutionLayer.cpp
@@ -22,7 +22,6 @@
* SOFTWARE.
*/
#include "CL/CLAccessor.h"
-#include "CL/Helper.h"
#include "Globals.h"
#include "TensorLibrary.h"
#include "benchmark/Datasets.h"
diff --git a/tests/benchmark/CL/FullyConnectedLayer.cpp b/tests/benchmark/CL/FullyConnectedLayer.cpp
index 6e8c89fa0b..fb8e1bc09f 100644
--- a/tests/benchmark/CL/FullyConnectedLayer.cpp
+++ b/tests/benchmark/CL/FullyConnectedLayer.cpp
@@ -22,7 +22,6 @@
* SOFTWARE.
*/
#include "CL/CLAccessor.h"
-#include "CL/Helper.h"
#include "Globals.h"
#include "TensorLibrary.h"
#include "benchmark/Datasets.h"
diff --git a/tests/benchmark/CL/GEMM.cpp b/tests/benchmark/CL/GEMM.cpp
index a10da09cbe..87dad05f30 100644
--- a/tests/benchmark/CL/GEMM.cpp
+++ b/tests/benchmark/CL/GEMM.cpp
@@ -22,7 +22,6 @@
* SOFTWARE.
*/
#include "CL/CLAccessor.h"
-#include "CL/Helper.h"
#include "Globals.h"
#include "TensorLibrary.h"
#include "benchmark/Datasets.h"
diff --git a/tests/benchmark/CL/GEMM.h b/tests/benchmark/CL/GEMM.h
index 02a339609c..ca3d9ad594 100644
--- a/tests/benchmark/CL/GEMM.h
+++ b/tests/benchmark/CL/GEMM.h
@@ -59,10 +59,10 @@ public:
TensorShape shape_d = gemm_obj.shape_d;
// Create tensors
- a = create_tensor(shape_a, data_type);
- b = create_tensor(shape_b, data_type);
- c = create_tensor(shape_c, data_type);
- d = create_tensor(shape_d, data_type);
+ a = create_tensor<CLTensor>(shape_a, data_type);
+ b = create_tensor<CLTensor>(shape_b, data_type);
+ c = create_tensor<CLTensor>(shape_c, data_type);
+ d = create_tensor<CLTensor>(shape_d, data_type);
// Create and configure function
gemm_layer = std::unique_ptr<Function>(new Function());
diff --git a/tests/benchmark/CL/NormalizationLayer.cpp b/tests/benchmark/CL/NormalizationLayer.cpp
index 81d3c65912..28f89dce1f 100644
--- a/tests/benchmark/CL/NormalizationLayer.cpp
+++ b/tests/benchmark/CL/NormalizationLayer.cpp
@@ -22,7 +22,6 @@
* SOFTWARE.
*/
#include "CL/CLAccessor.h"
-#include "CL/Helper.h"
#include "Globals.h"
#include "TensorLibrary.h"
#include "benchmark/Datasets.h"
diff --git a/tests/benchmark/CL/PoolingLayer.cpp b/tests/benchmark/CL/PoolingLayer.cpp
index 5285f279e7..05764a412a 100644
--- a/tests/benchmark/CL/PoolingLayer.cpp
+++ b/tests/benchmark/CL/PoolingLayer.cpp
@@ -22,7 +22,6 @@
* SOFTWARE.
*/
#include "CL/CLAccessor.h"
-#include "CL/Helper.h"
#include "Globals.h"
#include "TensorLibrary.h"
#include "benchmark/Datasets.h"
diff --git a/tests/benchmark/NEON/ActivationLayer.cpp b/tests/benchmark/NEON/ActivationLayer.cpp
index 8faed9f831..9ea675e515 100644
--- a/tests/benchmark/NEON/ActivationLayer.cpp
+++ b/tests/benchmark/NEON/ActivationLayer.cpp
@@ -22,7 +22,6 @@
* SOFTWARE.
*/
#include "Globals.h"
-#include "NEON/Helper.h"
#include "NEON/NEAccessor.h"
#include "TensorLibrary.h"
#include "benchmark/Datasets.h"
diff --git a/tests/benchmark/NEON/BitwiseAnd.cpp b/tests/benchmark/NEON/BitwiseAnd.cpp
index dba3d1ebea..be68fd39e4 100644
--- a/tests/benchmark/NEON/BitwiseAnd.cpp
+++ b/tests/benchmark/NEON/BitwiseAnd.cpp
@@ -22,7 +22,6 @@
* SOFTWARE.
*/
#include "Globals.h"
-#include "NEON/Helper.h"
#include "NEON/NEAccessor.h"
#include "TensorLibrary.h"
#include "benchmark/Datasets.h"
@@ -56,11 +55,12 @@ public:
profiler.add(std::make_shared<WallClockTimer>());
const std::string image_name = *(DataSet().begin() + state.range(0));
+ const RawTensor &raw = library->get(image_name);
// Create tensors
- src1 = create_tensor(image_name, DataType::U8);
- src2 = create_tensor(image_name, DataType::U8);
- dst = create_tensor(image_name, DataType::U8);
+ src1 = create_tensor<Tensor>(raw.shape(), DataType::U8);
+ src2 = create_tensor<Tensor>(raw.shape(), DataType::U8);
+ dst = create_tensor<Tensor>(raw.shape(), DataType::U8);
// Create and configure function
band.configure(&src1, &src2, &dst);
diff --git a/tests/benchmark/NEON/ConvolutionLayer.cpp b/tests/benchmark/NEON/ConvolutionLayer.cpp
index 0cfff8494b..a0b1236177 100644
--- a/tests/benchmark/NEON/ConvolutionLayer.cpp
+++ b/tests/benchmark/NEON/ConvolutionLayer.cpp
@@ -22,7 +22,6 @@
* SOFTWARE.
*/
#include "Globals.h"
-#include "NEON/Helper.h"
#include "NEON/NEAccessor.h"
#include "TensorLibrary.h"
#include "benchmark/Datasets.h"
diff --git a/tests/benchmark/NEON/ConvolutionLayerDirect.cpp b/tests/benchmark/NEON/ConvolutionLayerDirect.cpp
index bc56e844d8..bbe5707e41 100644
--- a/tests/benchmark/NEON/ConvolutionLayerDirect.cpp
+++ b/tests/benchmark/NEON/ConvolutionLayerDirect.cpp
@@ -22,7 +22,6 @@
* SOFTWARE.
*/
#include "Globals.h"
-#include "NEON/Helper.h"
#include "NEON/NEAccessor.h"
#include "TensorLibrary.h"
#include "benchmark/Datasets.h"
diff --git a/tests/benchmark/NEON/FullyConnectedLayer.cpp b/tests/benchmark/NEON/FullyConnectedLayer.cpp
index 85979203ac..15c2a407e6 100644
--- a/tests/benchmark/NEON/FullyConnectedLayer.cpp
+++ b/tests/benchmark/NEON/FullyConnectedLayer.cpp
@@ -22,7 +22,6 @@
* SOFTWARE.
*/
#include "Globals.h"
-#include "NEON/Helper.h"
#include "NEON/NEAccessor.h"
#include "TensorLibrary.h"
#include "benchmark/Datasets.h"
diff --git a/tests/benchmark/NEON/GEMM.cpp b/tests/benchmark/NEON/GEMM.cpp
index 50131b4998..1655c32e2b 100644
--- a/tests/benchmark/NEON/GEMM.cpp
+++ b/tests/benchmark/NEON/GEMM.cpp
@@ -22,7 +22,6 @@
* SOFTWARE.
*/
#include "Globals.h"
-#include "NEON/Helper.h"
#include "NEON/NEAccessor.h"
#include "TensorLibrary.h"
#include "benchmark/Datasets.h"
diff --git a/tests/benchmark/NEON/GEMM.h b/tests/benchmark/NEON/GEMM.h
index 24d196523f..4f0557d610 100644
--- a/tests/benchmark/NEON/GEMM.h
+++ b/tests/benchmark/NEON/GEMM.h
@@ -63,10 +63,10 @@ public:
TensorShape shape_d = gemm_obj.shape_d;
// Create tensors
- a = create_tensor(shape_a, data_type, 1, 4);
- b = create_tensor(shape_b, data_type, 1, 4);
- c = create_tensor(shape_c, data_type, 1, 4);
- d = create_tensor(shape_d, data_type, 1, 4);
+ a = create_tensor<Tensor>(shape_a, data_type, 1, 4);
+ b = create_tensor<Tensor>(shape_b, data_type, 1, 4);
+ c = create_tensor<Tensor>(shape_c, data_type, 1, 4);
+ d = create_tensor<Tensor>(shape_d, data_type, 1, 4);
// Create and configure function
gemm_layer = std::unique_ptr<Function>(new Function());
diff --git a/tests/benchmark/NEON/NormalizationLayer.cpp b/tests/benchmark/NEON/NormalizationLayer.cpp
index 46dc56b84d..8ea8c95cda 100644
--- a/tests/benchmark/NEON/NormalizationLayer.cpp
+++ b/tests/benchmark/NEON/NormalizationLayer.cpp
@@ -22,7 +22,6 @@
* SOFTWARE.
*/
#include "Globals.h"
-#include "NEON/Helper.h"
#include "NEON/NEAccessor.h"
#include "TensorLibrary.h"
#include "benchmark/Datasets.h"
diff --git a/tests/benchmark/NEON/PoolingLayer.cpp b/tests/benchmark/NEON/PoolingLayer.cpp
index 9b071317b4..dfa75497cd 100644
--- a/tests/benchmark/NEON/PoolingLayer.cpp
+++ b/tests/benchmark/NEON/PoolingLayer.cpp
@@ -22,7 +22,6 @@
* SOFTWARE.
*/
#include "Globals.h"
-#include "NEON/Helper.h"
#include "NEON/NEAccessor.h"
#include "TensorLibrary.h"
#include "benchmark/Datasets.h"
diff --git a/tests/benchmark/common/ActivationLayer.h b/tests/benchmark/common/ActivationLayer.h
index 7edfb6ef3c..8e22281025 100644
--- a/tests/benchmark/common/ActivationLayer.h
+++ b/tests/benchmark/common/ActivationLayer.h
@@ -57,8 +57,8 @@ public:
shape.set(shape.num_dimensions(), batches);
// Create tensors
- src = create_tensor(shape, dt, 1, fixed_point_position);
- dst = create_tensor(shape, dt, 1, fixed_point_position);
+ src = create_tensor<TensorType>(shape, dt, 1, fixed_point_position);
+ dst = create_tensor<TensorType>(shape, dt, 1, fixed_point_position);
// Create and configure function
act_layer.configure(&src, &dst, act_obj.info);
diff --git a/tests/benchmark/common/ConvolutionLayer.h b/tests/benchmark/common/ConvolutionLayer.h
index 594c62c50e..a777a95bde 100644
--- a/tests/benchmark/common/ConvolutionLayer.h
+++ b/tests/benchmark/common/ConvolutionLayer.h
@@ -59,10 +59,10 @@ public:
dst_shape.set(3 /* batch */, batches);
// Create tensors
- src = create_tensor(src_shape, dt, 1, fixed_point_position);
- weights = create_tensor(conv_obj.weights_shape, dt, 1, fixed_point_position);
- bias = create_tensor(conv_obj.bias_shape, dt, 1, fixed_point_position);
- dst = create_tensor(dst_shape, dt, 1, fixed_point_position);
+ src = create_tensor<TensorType>(src_shape, dt, 1, fixed_point_position);
+ weights = create_tensor<TensorType>(conv_obj.weights_shape, dt, 1, fixed_point_position);
+ bias = create_tensor<TensorType>(conv_obj.bias_shape, dt, 1, fixed_point_position);
+ dst = create_tensor<TensorType>(dst_shape, dt, 1, fixed_point_position);
// Create and configure function
conv_layer = std::unique_ptr<Function>(new Function());
diff --git a/tests/benchmark/common/FullyConnectedLayer.h b/tests/benchmark/common/FullyConnectedLayer.h
index 88adf83f2a..eeef1de28a 100644
--- a/tests/benchmark/common/FullyConnectedLayer.h
+++ b/tests/benchmark/common/FullyConnectedLayer.h
@@ -60,10 +60,10 @@ public:
dst_shape.set(dst_shape.num_dimensions(), batches);
// Create tensors
- src = create_tensor(src_shape, dt, 1, fixed_point_position);
- weights = create_tensor(fc_obj.weights_shape, dt, 1, fixed_point_position);
- bias = create_tensor(fc_obj.bias_shape, dt, 1, fixed_point_position);
- dst = create_tensor(dst_shape, dt, 1, fixed_point_position);
+ src = create_tensor<TensorType>(src_shape, dt, 1, fixed_point_position);
+ weights = create_tensor<TensorType>(fc_obj.weights_shape, dt, 1, fixed_point_position);
+ bias = create_tensor<TensorType>(fc_obj.bias_shape, dt, 1, fixed_point_position);
+ dst = create_tensor<TensorType>(dst_shape, dt, 1, fixed_point_position);
// Create and configure function
fc_layer = std::unique_ptr<Function>(new Function());
diff --git a/tests/benchmark/common/NormalizationLayer.h b/tests/benchmark/common/NormalizationLayer.h
index 4593fb7df3..580dca6c48 100644
--- a/tests/benchmark/common/NormalizationLayer.h
+++ b/tests/benchmark/common/NormalizationLayer.h
@@ -58,8 +58,8 @@ public:
shape.set(shape.num_dimensions(), batches);
// Create tensors
- src = create_tensor(shape, dt, 1, fixed_point_position);
- dst = create_tensor(shape, dt, 1, fixed_point_position);
+ src = create_tensor<TensorType>(shape, dt, 1, fixed_point_position);
+ dst = create_tensor<TensorType>(shape, dt, 1, fixed_point_position);
// Create and configure function
norm_layer = std::unique_ptr<Function>(new Function());
diff --git a/tests/benchmark/common/PoolingLayer.h b/tests/benchmark/common/PoolingLayer.h
index 5bb332fd6b..96ff905568 100644
--- a/tests/benchmark/common/PoolingLayer.h
+++ b/tests/benchmark/common/PoolingLayer.h
@@ -59,8 +59,8 @@ public:
dst_shape.set(dst_shape.num_dimensions(), batches);
// Create tensors
- src = create_tensor(src_shape, dt, 1, fixed_point_position);
- dst = create_tensor(dst_shape, dt, 1, fixed_point_position);
+ src = create_tensor<TensorType>(src_shape, dt, 1, fixed_point_position);
+ dst = create_tensor<TensorType>(dst_shape, dt, 1, fixed_point_position);
// Create and configure function
pool_layer.configure(&src, &dst, pool_obj.info);
diff --git a/tests/benchmark/system_tests/CL/AlexNet.cpp b/tests/benchmark/system_tests/CL/AlexNet.cpp
index fe0b9913de..04b65b8c39 100644
--- a/tests/benchmark/system_tests/CL/AlexNet.cpp
+++ b/tests/benchmark/system_tests/CL/AlexNet.cpp
@@ -22,7 +22,6 @@
* SOFTWARE.
*/
#include "CL/CLAccessor.h"
-#include "CL/Helper.h"
#include "Globals.h"
#include "TensorLibrary.h"
#include "benchmark/Datasets.h"
diff --git a/tests/benchmark/system_tests/CL/LeNet5.cpp b/tests/benchmark/system_tests/CL/LeNet5.cpp
index d65a7dde6c..60bb37a35b 100644
--- a/tests/benchmark/system_tests/CL/LeNet5.cpp
+++ b/tests/benchmark/system_tests/CL/LeNet5.cpp
@@ -22,7 +22,6 @@
* SOFTWARE.
*/
#include "CL/CLAccessor.h"
-#include "CL/Helper.h"
#include "Globals.h"
#include "TensorLibrary.h"
#include "benchmark/Datasets.h"
diff --git a/tests/benchmark/system_tests/NEON/AlexNet.cpp b/tests/benchmark/system_tests/NEON/AlexNet.cpp
index 2d222e7309..530c400ae3 100644
--- a/tests/benchmark/system_tests/NEON/AlexNet.cpp
+++ b/tests/benchmark/system_tests/NEON/AlexNet.cpp
@@ -22,7 +22,6 @@
* SOFTWARE.
*/
#include "Globals.h"
-#include "NEON/Helper.h"
#include "NEON/NEAccessor.h"
#include "TensorLibrary.h"
#include "benchmark/Datasets.h"
diff --git a/tests/benchmark/system_tests/NEON/LeNet5.cpp b/tests/benchmark/system_tests/NEON/LeNet5.cpp
index 5170f05a70..8724d8ba3a 100644
--- a/tests/benchmark/system_tests/NEON/LeNet5.cpp
+++ b/tests/benchmark/system_tests/NEON/LeNet5.cpp
@@ -22,7 +22,6 @@
* SOFTWARE.
*/
#include "Globals.h"
-#include "NEON/Helper.h"
#include "NEON/NEAccessor.h"
#include "TensorLibrary.h"
#include "benchmark/Datasets.h"
diff --git a/tests/benchmark/system_tests/common/AlexNet.h b/tests/benchmark/system_tests/common/AlexNet.h
index 9c93dc7228..46e26bf723 100644
--- a/tests/benchmark/system_tests/common/AlexNet.h
+++ b/tests/benchmark/system_tests/common/AlexNet.h
@@ -24,8 +24,8 @@
#ifndef __ARM_COMPUTE_TEST_BENCHMARK_ALEXNET_H__
#define __ARM_COMPUTE_TEST_BENCHMARK_ALEXNET_H__
-#include "TensorLibrary.h"
-#include "Utils.h"
+#include "tests/TensorLibrary.h"
+#include "tests/Utils.h"
#include "benchmark/Profiler.h"
#include "benchmark/WallClockTimer.h"
diff --git a/tests/benchmark/system_tests/common/LeNet5.h b/tests/benchmark/system_tests/common/LeNet5.h
index db34f6813a..cca1bbf3f3 100644
--- a/tests/benchmark/system_tests/common/LeNet5.h
+++ b/tests/benchmark/system_tests/common/LeNet5.h
@@ -24,8 +24,8 @@
#ifndef __ARM_COMPUTE_TEST_BENCHMARK_LENET5_H__
#define __ARM_COMPUTE_TEST_BENCHMARK_LENET5_H__
-#include "TensorLibrary.h"
-#include "Utils.h"
+#include "tests/TensorLibrary.h"
+#include "tests/Utils.h"
#include "benchmark/Profiler.h"
#include "benchmark/WallClockTimer.h"
@@ -79,4 +79,4 @@ public:
} // namespace benchmark
} // namespace test
} // namespace arm_compute
-#endif //__ARM_COMPUTE_TEST_BENCHMARK_LENET5_H__
+#endif