aboutsummaryrefslogtreecommitdiff
path: root/tests/validation/fixtures/SoftmaxLayerFixture.h
diff options
context:
space:
mode:
authorVidhya Sudhan Loganathan <vidhyasudhan.loganathan@arm.com>2018-07-02 09:13:49 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:54:10 +0000
commit014333d73883c3872e458cedda5ccef586a7ccd4 (patch)
tree0f28bbc1ab769993af91b40e4584061f6ed6d3fa /tests/validation/fixtures/SoftmaxLayerFixture.h
parentde01468bbfff3a7d8bcbba3bfdf5698fb2e3b267 (diff)
downloadComputeLibrary-014333d73883c3872e458cedda5ccef586a7ccd4.tar.gz
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 <bsgcomp@arm.com> Reviewed-by: Michele DiGiorgio <michele.digiorgio@arm.com> Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'tests/validation/fixtures/SoftmaxLayerFixture.h')
-rw-r--r--tests/validation/fixtures/SoftmaxLayerFixture.h27
1 files changed, 11 insertions, 16 deletions
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 <typename...>
- 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<TensorType>(shape, data_type, 1, fixed_point_position, quantization_info);
- TensorType dst = create_tensor<TensorType>(shape, data_type, 1, fixed_point_position, QuantizationInfo(1.f / 256, 0));
+ TensorType src = create_tensor<TensorType>(shape, data_type, 1, quantization_info);
+ TensorType dst = create_tensor<TensorType>(shape, data_type, 1, QuantizationInfo(1.f / 256, 0));
// Create and configure function
FunctionType smx_layer;
@@ -108,11 +107,11 @@ protected:
return dst;
}
- SimpleTensor<T> compute_reference(const TensorShape &shape, DataType data_type, int fixed_point_position,
+ SimpleTensor<T> compute_reference(const TensorShape &shape, DataType data_type,
QuantizationInfo quantization_info, float beta)
{
// Create reference
- SimpleTensor<T> src{ shape, data_type, 1, fixed_point_position, quantization_info };
+ SimpleTensor<T> src{ shape, data_type, 1, quantization_info };
// Fill reference
fill(src);
@@ -122,7 +121,6 @@ protected:
TensorType _target{};
SimpleTensor<T> _reference{};
- int _fractional_bits{};
QuantizationInfo _quantization_info{};
};
@@ -135,7 +133,6 @@ public:
{
SoftmaxValidationGenericFixture<TensorType, AccessorType, FunctionType, T>::setup(shape,
data_type,
- 0,
QuantizationInfo(),
beta);
}
@@ -146,11 +143,10 @@ class SoftmaxValidationFixedPointFixture : public SoftmaxValidationGenericFixtur
{
public:
template <typename...>
- void setup(TensorShape shape, DataType data_type, int fixed_point_position)
+ void setup(TensorShape shape, DataType data_type)
{
SoftmaxValidationGenericFixture<TensorType, AccessorType, FunctionType, T>::setup(shape,
data_type,
- fixed_point_position,
QuantizationInfo(),
1.0f);
}
@@ -165,7 +161,6 @@ public:
{
SoftmaxValidationGenericFixture<TensorType, AccessorType, FunctionType, T>::setup(shape,
data_type,
- 0,
quantization_info,
beta);
}