From 574775c7fa78a094bbeb7f9f87aca832936884e2 Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Mon, 18 Feb 2019 20:08:02 +0000 Subject: COMPMID-1937: Adds support for DequantizationLayer for NEON/CL. Change-Id: I4b73edd176a277294e0e42e642460bc61210778a Signed-off-by: Georgios Pinitas Reviewed-on: https://review.mlplatform.org/c/744 Tested-by: Arm Jenkins Reviewed-by: Giuseppe Rossini --- tests/benchmark/fixtures/DequantizationLayerFixture.h | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'tests/benchmark/fixtures/DequantizationLayerFixture.h') diff --git a/tests/benchmark/fixtures/DequantizationLayerFixture.h b/tests/benchmark/fixtures/DequantizationLayerFixture.h index 5ea8b2d437..316098b220 100644 --- a/tests/benchmark/fixtures/DequantizationLayerFixture.h +++ b/tests/benchmark/fixtures/DequantizationLayerFixture.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 ARM Limited. + * Copyright (c) 2017-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -44,25 +44,18 @@ public: template void setup(TensorShape shape, DataType data_type_src, DataType data_type_dst) { - TensorShape shape_min_max = shape; - shape_min_max.set(Window::DimX, 2); - - // Remove Y and Z dimensions and keep the batches - shape_min_max.remove_dimension(1); - shape_min_max.remove_dimension(1); + const QuantizationInfo q_info(0.5f, -10); // Create tensors - src = create_tensor(shape, data_type_src); - dst = create_tensor(shape, data_type_dst); - min_max = create_tensor(shape_min_max, data_type_dst); + src = create_tensor(shape, data_type_src, 1, q_info); + dst = create_tensor(shape, data_type_dst, 1, q_info); // Create and configure function - dequantization_func.configure(&src, &dst, &min_max); + dequantization_func.configure(&src, &dst); // Allocate tensors src.allocator()->allocate(); dst.allocator()->allocate(); - min_max.allocator()->allocate(); } void run() @@ -80,13 +73,11 @@ public: { src.allocator()->free(); dst.allocator()->free(); - min_max.allocator()->free(); } private: TensorType src{}; TensorType dst{}; - TensorType min_max{}; Function dequantization_func{}; }; } // namespace benchmark -- cgit v1.2.1