From 3c520c5a6ca9352560828fdf389d31e38b85afeb Mon Sep 17 00:00:00 2001 From: Giorgio Arena Date: Tue, 1 May 2018 11:47:24 +0100 Subject: COMPMID-1089 CLPoolingLayer fix padding and add output shape computation to ShapeCalculator Change-Id: Ide83424e9fe6b8102ed9e3c355c099c3912e7e61 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/129635 Tested-by: Jenkins Reviewed-by: Michele DiGiorgio Reviewed-by: Georgios Pinitas Reviewed-by: Anthony Barbier --- tests/benchmark/fixtures/PoolingLayerFixture.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'tests/benchmark/fixtures') diff --git a/tests/benchmark/fixtures/PoolingLayerFixture.h b/tests/benchmark/fixtures/PoolingLayerFixture.h index bd7c155348..a8263fbcdc 100644 --- a/tests/benchmark/fixtures/PoolingLayerFixture.h +++ b/tests/benchmark/fixtures/PoolingLayerFixture.h @@ -26,6 +26,7 @@ #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" @@ -36,16 +37,24 @@ 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, TensorShape dst_shape, PoolingLayerInfo info, DataType data_type, DataLayout data_layout, int batches) + void setup(TensorShape src_shape, PoolingLayerInfo info, DataType data_type, DataLayout data_layout, int batches) { // Set batched in source and destination shapes const unsigned int fixed_point_position = 4; + + TensorInfo src_info(src_shape, 1, data_type, fixed_point_position); + 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); -- cgit v1.2.1