From 014333d73883c3872e458cedda5ccef586a7ccd4 Mon Sep 17 00:00:00 2001 From: Vidhya Sudhan Loganathan Date: Mon, 2 Jul 2018 09:13:49 +0100 Subject: COMPMID-970 : Remove QS8 / QS16 support Removed Fixed point position arguments from test sources Change-Id: I8343724723b71611fd501ed34de0866d3fb60e7e Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/136382 Tested-by: Jenkins Reviewed-by: Michele DiGiorgio Reviewed-by: Anthony Barbier --- tests/validation/fixtures/ActivationLayerFixture.h | 37 +++++++--------------- 1 file changed, 12 insertions(+), 25 deletions(-) (limited to 'tests/validation/fixtures/ActivationLayerFixture.h') diff --git a/tests/validation/fixtures/ActivationLayerFixture.h b/tests/validation/fixtures/ActivationLayerFixture.h index e212c7bd9b..d29d67c8e6 100644 --- a/tests/validation/fixtures/ActivationLayerFixture.h +++ b/tests/validation/fixtures/ActivationLayerFixture.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -47,17 +47,16 @@ class ActivationValidationGenericFixture : public framework::Fixture { public: template - void setup(TensorShape shape, bool in_place, ActivationLayerInfo::ActivationFunction function, float alpha_beta, DataType data_type, int fractional_bits, QuantizationInfo quantization_info) + void setup(TensorShape shape, bool in_place, ActivationLayerInfo::ActivationFunction function, float alpha_beta, DataType data_type, QuantizationInfo quantization_info) { - _fractional_bits = fractional_bits; _quantization_info = quantization_info; _data_type = data_type; _function = function; ActivationLayerInfo info(function, alpha_beta, alpha_beta); - _target = compute_target(shape, in_place, info, data_type, fractional_bits, quantization_info); - _reference = compute_reference(shape, info, data_type, fractional_bits, quantization_info); + _target = compute_target(shape, in_place, info, data_type, quantization_info); + _reference = compute_reference(shape, info, data_type, quantization_info); } protected: @@ -80,17 +79,17 @@ protected: { int min_bound = 0; int max_bound = 0; - std::tie(min_bound, max_bound) = get_activation_layer_test_bounds(_function, _data_type, _fractional_bits); + std::tie(min_bound, max_bound) = get_activation_layer_test_bounds(_function, _data_type); std::uniform_int_distribution<> distribution(min_bound, max_bound); library->fill(tensor, distribution, 0); } } - TensorType compute_target(const TensorShape &shape, bool in_place, ActivationLayerInfo info, DataType data_type, int fixed_point_position, QuantizationInfo quantization_info) + TensorType compute_target(const TensorShape &shape, bool in_place, ActivationLayerInfo info, DataType data_type, QuantizationInfo quantization_info) { // Create tensors - TensorType src = create_tensor(shape, data_type, 1, fixed_point_position, quantization_info); - TensorType dst = create_tensor(shape, data_type, 1, fixed_point_position, quantization_info); + TensorType src = create_tensor(shape, data_type, 1, quantization_info); + TensorType dst = create_tensor(shape, data_type, 1, quantization_info); // Create and configure function FunctionType act_layer; @@ -128,10 +127,10 @@ protected: } } - SimpleTensor compute_reference(const TensorShape &shape, ActivationLayerInfo info, DataType data_type, int fixed_point_position, QuantizationInfo quantization_info) + SimpleTensor compute_reference(const TensorShape &shape, ActivationLayerInfo info, DataType data_type, QuantizationInfo quantization_info) { // Create reference - SimpleTensor src{ shape, data_type, 1, fixed_point_position, quantization_info }; + SimpleTensor src{ shape, data_type, 1, quantization_info }; // Fill reference fill(src); @@ -141,7 +140,6 @@ protected: TensorType _target{}; SimpleTensor _reference{}; - int _fractional_bits{}; QuantizationInfo _quantization_info{}; DataType _data_type{}; ActivationLayerInfo::ActivationFunction _function{}; @@ -154,18 +152,7 @@ public: template void setup(TensorShape shape, bool in_place, ActivationLayerInfo::ActivationFunction function, float alpha_beta, DataType data_type) { - ActivationValidationGenericFixture::setup(shape, in_place, function, alpha_beta, data_type, 0, QuantizationInfo()); - } -}; - -template -class ActivationValidationFixedPointFixture : public ActivationValidationGenericFixture -{ -public: - template - void setup(TensorShape shape, bool in_place, ActivationLayerInfo::ActivationFunction function, float alpha_beta, DataType data_type, int fractional_bits) - { - ActivationValidationGenericFixture::setup(shape, in_place, function, alpha_beta, data_type, fractional_bits, QuantizationInfo()); + ActivationValidationGenericFixture::setup(shape, in_place, function, alpha_beta, data_type, QuantizationInfo()); } }; @@ -176,7 +163,7 @@ public: template void setup(TensorShape shape, bool in_place, ActivationLayerInfo::ActivationFunction function, float alpha_beta, DataType data_type, QuantizationInfo quantization_info) { - ActivationValidationGenericFixture::setup(shape, in_place, function, alpha_beta, data_type, 0, quantization_info); + ActivationValidationGenericFixture::setup(shape, in_place, function, alpha_beta, data_type, quantization_info); } }; -- cgit v1.2.1