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/SoftmaxLayerFixture.h | 27 ++++++++++--------------- 1 file changed, 11 insertions(+), 16 deletions(-) (limited to 'tests/validation/fixtures/SoftmaxLayerFixture.h') diff --git a/tests/validation/fixtures/SoftmaxLayerFixture.h b/tests/validation/fixtures/SoftmaxLayerFixture.h index c2ab2e2ef6..59ce5192ff 100644 --- a/tests/validation/fixtures/SoftmaxLayerFixture.h +++ b/tests/validation/fixtures/SoftmaxLayerFixture.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -47,13 +47,12 @@ class SoftmaxValidationGenericFixture : public framework::Fixture { public: template - void setup(TensorShape shape, DataType data_type, int fractional_bits, QuantizationInfo quantization_info, float beta) + void setup(TensorShape shape, DataType data_type, QuantizationInfo quantization_info, float beta) { - _fractional_bits = fractional_bits; _quantization_info = quantization_info; - _target = compute_target(shape, data_type, fractional_bits, quantization_info, beta); - _reference = compute_reference(shape, data_type, fractional_bits, quantization_info, beta); + _target = compute_target(shape, data_type, quantization_info, beta); + _reference = compute_reference(shape, data_type, quantization_info, beta); } protected: @@ -72,18 +71,18 @@ protected: } else { - const int one_fixed = 1 << _fractional_bits; + const int one_fixed = 1; std::uniform_int_distribution<> distribution(-one_fixed, one_fixed); library->fill(tensor, distribution, 0); } } - TensorType compute_target(const TensorShape &shape, DataType data_type, int fixed_point_position, + TensorType compute_target(const TensorShape &shape, DataType data_type, QuantizationInfo quantization_info, float beta) { // 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, QuantizationInfo(1.f / 256, 0)); + TensorType src = create_tensor(shape, data_type, 1, quantization_info); + TensorType dst = create_tensor(shape, data_type, 1, QuantizationInfo(1.f / 256, 0)); // Create and configure function FunctionType smx_layer; @@ -108,11 +107,11 @@ protected: return dst; } - SimpleTensor compute_reference(const TensorShape &shape, DataType data_type, int fixed_point_position, + SimpleTensor compute_reference(const TensorShape &shape, DataType data_type, QuantizationInfo quantization_info, float beta) { // 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); @@ -122,7 +121,6 @@ protected: TensorType _target{}; SimpleTensor _reference{}; - int _fractional_bits{}; QuantizationInfo _quantization_info{}; }; @@ -135,7 +133,6 @@ public: { SoftmaxValidationGenericFixture::setup(shape, data_type, - 0, QuantizationInfo(), beta); } @@ -146,11 +143,10 @@ class SoftmaxValidationFixedPointFixture : public SoftmaxValidationGenericFixtur { public: template - void setup(TensorShape shape, DataType data_type, int fixed_point_position) + void setup(TensorShape shape, DataType data_type) { SoftmaxValidationGenericFixture::setup(shape, data_type, - fixed_point_position, QuantizationInfo(), 1.0f); } @@ -165,7 +161,6 @@ public: { SoftmaxValidationGenericFixture::setup(shape, data_type, - 0, quantization_info, beta); } -- cgit v1.2.1