From e49e26613264842f91d29a32be3a226a0d6adb42 Mon Sep 17 00:00:00 2001 From: Moritz Pflanzer Date: Fri, 21 Jul 2017 15:55:28 +0100 Subject: 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 Reviewed-by: Anthony Barbier --- tests/AssetsLibrary.h | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'tests/AssetsLibrary.h') 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 #include @@ -43,10 +43,6 @@ #include #include -#if ARM_COMPUTE_ENABLE_FP16 -#include // 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 distribution_f16(low, high); + std::uniform_real_distribution 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::value)); -- cgit v1.2.1