From 57dac8400d56a4b68975d5563a9540c96d49fe5f Mon Sep 17 00:00:00 2001 From: Michalis Spyrou Date: Thu, 1 Mar 2018 16:03:50 +0000 Subject: COMPMID-806 Add NHWC data format support format for NEON pooling Change-Id: I7ab174c72f3d56134fcec259a137739061fd12e9 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/123065 Reviewed-by: Georgios Pinitas Tested-by: Jenkins --- tests/benchmark/CL/PoolingLayer.cpp | 73 ++++++++++++++++---------- tests/benchmark/GLES_COMPUTE/PoolingLayer.cpp | 73 ++++++++++++++++---------- tests/benchmark/NEON/PoolingLayer.cpp | 33 +++++++----- tests/benchmark/fixtures/PoolingLayerFixture.h | 6 +-- 4 files changed, 110 insertions(+), 75 deletions(-) (limited to 'tests/benchmark') diff --git a/tests/benchmark/CL/PoolingLayer.cpp b/tests/benchmark/CL/PoolingLayer.cpp index 9c567202de..f9fefaf141 100644 --- a/tests/benchmark/CL/PoolingLayer.cpp +++ b/tests/benchmark/CL/PoolingLayer.cpp @@ -47,7 +47,8 @@ namespace benchmark { namespace { -const auto data_types = framework::dataset::make("DataType", { DataType::F16, DataType::F32 }); +const auto data_types = framework::dataset::make("DataType", { DataType::F16, DataType::F32 }); +const auto data_layouts = framework::dataset::make("DataLayout", { DataLayout::NCHW }); } // namespace using CLPoolingLayerFixture = PoolingLayerFixture; @@ -55,74 +56,88 @@ using CLPoolingLayerFixture = PoolingLayerFixture; @@ -55,74 +56,88 @@ using GCPoolingLayerFixture = PoolingLayerFixture - void setup(TensorShape src_shape, TensorShape dst_shape, PoolingLayerInfo info, DataType data_type, int batches) + void setup(TensorShape src_shape, TensorShape dst_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; @@ -50,8 +50,8 @@ public: dst_shape.set(dst_shape.num_dimensions(), batches); // Create tensors - src = create_tensor(src_shape, data_type, 1, fixed_point_position); - dst = create_tensor(dst_shape, data_type, 1, fixed_point_position); + src = create_tensor(src_shape, data_type, 1, fixed_point_position, QuantizationInfo(), data_layout); + dst = create_tensor(dst_shape, data_type, 1, fixed_point_position, QuantizationInfo(), data_layout); // Create and configure function pool_layer.configure(&src, &dst, info); -- cgit v1.2.1