aboutsummaryrefslogtreecommitdiff
path: root/tests/validation/TensorFactory.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/validation/TensorFactory.h')
-rw-r--r--tests/validation/TensorFactory.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/validation/TensorFactory.h b/tests/validation/TensorFactory.h
index 48f9d6702f..610425bbfb 100644
--- a/tests/validation/TensorFactory.h
+++ b/tests/validation/TensorFactory.h
@@ -30,6 +30,10 @@
#include "boost_wrapper.h"
+#if ARM_COMPUTE_ENABLE_FP16
+#include <arm_fp16.h> // needed for float16_t
+#endif
+
namespace arm_compute
{
namespace test
@@ -39,7 +43,7 @@ namespace validation
using TensorVariant = boost::variant < Tensor<uint8_t>, Tensor<int8_t>,
Tensor<uint16_t>, Tensor<int16_t>,
Tensor<uint32_t>, Tensor<int32_t>,
-#ifdef ENABLE_FP16
+#ifdef ARM_COMPUTE_ENABLE_FP16
Tensor<float16_t>,
#endif
Tensor<float >>;
@@ -90,10 +94,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 ENABLE_FP16
+#ifdef ARM_COMPUTE_ENABLE_FP16
case DataType::F16:
using value_type_f16 = typename match_const<R, float16_t>::type;
- v = Tensor<float16_t>(raw.shape(), dt, reinterpret_cast<value_type_f16 *>(raw.data()));
+ v = Tensor<float16_t>(shape, dt, fixed_point_position, reinterpret_cast<value_type_f16 *>(data));
break;
#endif
case DataType::F32: