From d1794ebfa10d05af7d2458c5d506152fd38068d3 Mon Sep 17 00:00:00 2001 From: Michalis Spyrou Date: Fri, 15 Jun 2018 16:15:26 +0100 Subject: COMPMID-1226 Extend CLMeanStdDev to support FP32 / FP16 - Extend support for FP16 in CLReduction. - For F16/F32 MeanStdDev we perform one reduction operation for mean and one for stddev and we calculate the final result in the host CPU. Change-Id: Iad2099f26c0ba7969737d22f00c6c275634d875c Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/135870 Tested-by: Jenkins Reviewed-by: Georgios Pinitas --- tests/validation/reference/ReductionOperation.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/validation/reference/ReductionOperation.cpp') diff --git a/tests/validation/reference/ReductionOperation.cpp b/tests/validation/reference/ReductionOperation.cpp index acfcc09cea..871a761b1a 100644 --- a/tests/validation/reference/ReductionOperation.cpp +++ b/tests/validation/reference/ReductionOperation.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -53,7 +53,7 @@ T reduce_operation(T *ptr, int reduce_elements, ReductionOperation op) switch(op) { case ReductionOperation::SUM_SQUARE: - return std::accumulate(ptr, ptr + reduce_elements, 0.f, square()); + return std::accumulate(ptr, ptr + reduce_elements, static_cast(0), square()); default: ARM_COMPUTE_ERROR("Unsupported reduction operation"); } @@ -87,6 +87,7 @@ SimpleTensor reduction_operation(const SimpleTensor &src, const TensorShap } template SimpleTensor reduction_operation(const SimpleTensor &src, const TensorShape &dst_shape, unsigned int axis, ReductionOperation op); +template SimpleTensor reduction_operation(const SimpleTensor &src, const TensorShape &dst_shape, unsigned int axis, ReductionOperation op); } // namespace reference } // namespace validation } // namespace test -- cgit v1.2.1