aboutsummaryrefslogtreecommitdiff
path: root/tests/validation/Reference.cpp
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/Reference.cpp
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/Reference.cpp')
-rw-r--r--tests/validation/Reference.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/validation/Reference.cpp b/tests/validation/Reference.cpp
index 1db3c3f5fb..b94a0e5195 100644
--- a/tests/validation/Reference.cpp
+++ b/tests/validation/Reference.cpp
@@ -476,15 +476,13 @@ RawTensor Reference::compute_reference_activation_layer(const TensorShape &shape
library->fill(ref_src, distribution, 0);
break;
}
-#ifdef ARM_COMPUTE_ENABLE_FP16
case DataType::F16:
{
- const std::pair<float16_t, float16_t> bounds = get_activation_layer_test_bounds<float16_t>(act_info.activation());
+ const std::pair<half_float::half, half_float::half> bounds = get_activation_layer_test_bounds<half_float::half>(act_info.activation());
std::uniform_real_distribution<> distribution(bounds.first, bounds.second);
library->fill(ref_src, distribution, 0);
break;
}
-#endif /* ARM_COMPUTE_ENABLE_FP16 */
case DataType::F32:
{
const std::pair<float, float> bounds = get_activation_layer_test_bounds<float>(act_info.activation());
@@ -604,9 +602,9 @@ RawTensor Reference::compute_reference_depth_concatenate_layer(const std::vector
TensorShape dst_shape = calculate_depth_concatenate_shape(shapes);
// Create tensors
- for(unsigned int i = 0; i < shapes.size(); ++i)
+ for(const auto &shape : shapes)
{
- ref_srcs.push_back(support::cpp14::make_unique<RawTensor>(RawTensor(shapes[i], dt, 1, fixed_point_position)));
+ ref_srcs.push_back(support::cpp14::make_unique<RawTensor>(shape, dt, 1, fixed_point_position));
}
RawTensor ref_dst(dst_shape, dt, 1, fixed_point_position);