diff options
author | Giorgio Arena <giorgio.arena@arm.com> | 2018-05-01 11:47:24 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:50:48 +0000 |
commit | 3c520c5a6ca9352560828fdf389d31e38b85afeb (patch) | |
tree | 9a7cbbb2fdf0f9f6c8e42cfd36d2ea8b842fe3d4 /tests/benchmark/fixtures/PoolingLayerFixture.h | |
parent | 6c4212789a530c3655258779219c4ed7f0397b86 (diff) | |
download | ComputeLibrary-3c520c5a6ca9352560828fdf389d31e38b85afeb.tar.gz |
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 <bsgcomp@arm.com>
Reviewed-by: Michele DiGiorgio <michele.digiorgio@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'tests/benchmark/fixtures/PoolingLayerFixture.h')
-rw-r--r-- | tests/benchmark/fixtures/PoolingLayerFixture.h | 11 |
1 files changed, 10 insertions, 1 deletions
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 <typename TensorType, typename Function, typename Accessor> class PoolingLayerFixture : public framework::Fixture { public: template <typename...> - 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); |