aboutsummaryrefslogtreecommitdiff
path: root/tests/validation/TensorFactory.h
diff options
context:
space:
mode:
authorPablo Tello <pablo.tello@arm.com>2017-06-23 10:40:05 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-09-17 14:14:20 +0100
commit383deec6b38f8b00f901d475000d46f8d3e5fb97 (patch)
treedc2e72587ea624d1b0eb06d8559af0e7783d90d0 /tests/validation/TensorFactory.h
parentfabb038a54ca217497c17e31ba7ae098690f2f69 (diff)
downloadComputeLibrary-383deec6b38f8b00f901d475000d46f8d3e5fb97.tar.gz
COMPMID-345: Added support for arm8.2+FP16 in the the validation framework.
Change-Id: Ifef2133d4a0da5456bec147330405b6d58cf6a71 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/78676 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.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: