aboutsummaryrefslogtreecommitdiff
path: root/tests/validation/TensorFactory.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/validation/TensorFactory.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/validation/TensorFactory.h')
-rw-r--r--tests/validation/TensorFactory.h23
1 files changed, 8 insertions, 15 deletions
diff --git a/tests/validation/TensorFactory.h b/tests/validation/TensorFactory.h
index 2f33dd283d..a3bb5f9615 100644
--- a/tests/validation/TensorFactory.h
+++ b/tests/validation/TensorFactory.h
@@ -24,29 +24,24 @@
#ifndef __ARM_COMPUTE_TEST_TENSOR_FACTORY_H__
#define __ARM_COMPUTE_TEST_TENSOR_FACTORY_H__
-#include "RawTensor.h"
-#include "Tensor.h"
#include "arm_compute/core/Error.h"
+#include "tests/RawTensor.h"
+#include "tests/validation/Tensor.h"
+#include "tests/validation/half.h"
#include "boost_wrapper.h"
-#if ARM_COMPUTE_ENABLE_FP16
-#include <arm_fp16.h> // needed for float16_t
-#endif /* ARM_COMPUTE_ENABLE_FP16 */
-
namespace arm_compute
{
namespace test
{
namespace validation
{
-using TensorVariant = boost::variant < Tensor<uint8_t>, Tensor<int8_t>,
+using TensorVariant = boost::variant<Tensor<uint8_t>, Tensor<int8_t>,
Tensor<uint16_t>, Tensor<int16_t>,
Tensor<uint32_t>, Tensor<int32_t>,
-#ifdef ARM_COMPUTE_ENABLE_FP16
- Tensor<float16_t>,
-#endif /* ARM_COMPUTE_ENABLE_FP16 */
- Tensor<float >>;
+ Tensor<half_float::half>,
+ Tensor<float>>;
/** Helper to create a constant type if the passed reference is constant. */
template <typename R, typename T>
@@ -95,12 +90,10 @@ public:
using value_type_s32 = typename match_const<R, int32_t>::type;
v = Tensor<int32_t>(shape, dt, fixed_point_position, reinterpret_cast<value_type_s32 *>(data));
break;
-#ifdef ARM_COMPUTE_ENABLE_FP16
case DataType::F16:
- using value_type_f16 = typename match_const<R, float16_t>::type;
- v = Tensor<float16_t>(shape, dt, fixed_point_position, reinterpret_cast<value_type_f16 *>(data));
+ using value_type_f16 = typename match_const<R, half_float::half>::type;
+ v = Tensor<half_float::half>(shape, dt, fixed_point_position, reinterpret_cast<value_type_f16 *>(data));
break;
-#endif /* ARM_COMPUTE_ENABLE_FP16 */
case DataType::F32:
using value_type_f32 = typename match_const<R, float>::type;
v = Tensor<float>(shape, dt, fixed_point_position, reinterpret_cast<value_type_f32 *>(data));