aboutsummaryrefslogtreecommitdiff
path: root/tests/AssetsLibrary.h
diff options
context:
space:
mode:
authorMoritz Pflanzer <moritz.pflanzer@arm.com>2017-07-21 15:55:28 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-09-17 14:16:42 +0100
commite49e26613264842f91d29a32be3a226a0d6adb42 (patch)
tree78d88bded1f178d06b9dbfe3950ba716ef229599 /tests/AssetsLibrary.h
parent27b386cb7596542a3296c32e41f7a5168b4d53be (diff)
downloadComputeLibrary-e49e26613264842f91d29a32be3a226a0d6adb42.tar.gz
COMPMID-415: Use half_float library for F16
3RDPARTY_UPDATE Change-Id: Iee572e18d5b1df71300d738cc8690f49d7203d5c Reviewed-on: http://mpd-gerrit.cambridge.arm.com/81353 Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com> Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'tests/AssetsLibrary.h')
-rw-r--r--tests/AssetsLibrary.h18
1 files changed, 5 insertions, 13 deletions
diff --git a/tests/AssetsLibrary.h b/tests/AssetsLibrary.h
index 6ecaccbd76..58738f871d 100644
--- a/tests/AssetsLibrary.h
+++ b/tests/AssetsLibrary.h
@@ -24,10 +24,6 @@
#ifndef __ARM_COMPUTE_TEST_TENSOR_LIBRARY_H__
#define __ARM_COMPUTE_TEST_TENSOR_LIBRARY_H__
-#include "RawTensor.h"
-#include "TensorCache.h"
-#include "Utils.h"
-
#include "arm_compute/core/Coordinates.h"
#include "arm_compute/core/Error.h"
#include "arm_compute/core/Helpers.h"
@@ -35,6 +31,10 @@
#include "arm_compute/core/TensorShape.h"
#include "arm_compute/core/Types.h"
#include "arm_compute/core/Window.h"
+#include "tests/RawTensor.h"
+#include "tests/TensorCache.h"
+#include "tests/Utils.h"
+#include "tests/validation/half.h"
#include <algorithm>
#include <cstddef>
@@ -43,10 +43,6 @@
#include <string>
#include <type_traits>
-#if ARM_COMPUTE_ENABLE_FP16
-#include <arm_fp16.h> // needed for float16_t
-#endif /* ARM_COMPUTE_ENABLE_FP16 */
-
namespace arm_compute
{
namespace test
@@ -476,9 +472,7 @@ void AssetsLibrary::fill_tensor_uniform(T &&tensor, std::random_device::result_t
fill(tensor, distribution_s64, seed_offset);
break;
}
-#if ARM_COMPUTE_ENABLE_FP16
case DataType::F16:
-#endif /* ARM_COMPUTE_ENABLE_FP16 */
case DataType::F32:
{
// It doesn't make sense to check [-inf, inf], so hard code it to a big number
@@ -567,14 +561,12 @@ void AssetsLibrary::fill_tensor_uniform(T &&tensor, std::random_device::result_t
fill(tensor, distribution_s64, seed_offset);
break;
}
-#if ARM_COMPUTE_ENABLE_FP16
case DataType::F16:
{
- std::uniform_real_distribution<float_t> distribution_f16(low, high);
+ std::uniform_real_distribution<float> distribution_f16(low, high);
fill(tensor, distribution_f16, seed_offset);
break;
}
-#endif /* ARM_COMPUTE_ENABLE_FP16 */
case DataType::F32:
{
ARM_COMPUTE_ERROR_ON(!(std::is_same<float, D>::value));