diff options
author | Michalis Spyrou <michalis.spyrou@arm.com> | 2018-06-15 16:15:26 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:54:54 +0000 |
commit | d1794ebfa10d05af7d2458c5d506152fd38068d3 (patch) | |
tree | e3f286aaba86b1f0bcda3390ad4d8af96b965fc7 /arm_compute/core/CL/kernels/CLMeanStdDevKernel.h | |
parent | 7777b1aa865d3c17dcef31573d44fae421176109 (diff) | |
download | ComputeLibrary-d1794ebfa10d05af7d2458c5d506152fd38068d3.tar.gz |
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 <bsgcomp@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'arm_compute/core/CL/kernels/CLMeanStdDevKernel.h')
-rw-r--r-- | arm_compute/core/CL/kernels/CLMeanStdDevKernel.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/arm_compute/core/CL/kernels/CLMeanStdDevKernel.h b/arm_compute/core/CL/kernels/CLMeanStdDevKernel.h index a6898fde3e..46e266e07d 100644 --- a/arm_compute/core/CL/kernels/CLMeanStdDevKernel.h +++ b/arm_compute/core/CL/kernels/CLMeanStdDevKernel.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017 ARM Limited. + * Copyright (c) 2016-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -59,6 +59,17 @@ public: * @param[out] global_sum_squared (Optional if stddev is not set, required if stddev is set) Keeps global sum of squared pixel values (Buffer size: 1 cl_ulong). */ void configure(const ICLImage *input, float *mean, cl::Buffer *global_sum, float *stddev = nullptr, cl::Buffer *global_sum_squared = nullptr); + /** Static function to check if given info will lead to a valid configuration of @ref CLMeanStdDevKernel. + * + * @param[in] input Input image info. Data types supported: U8. + * @param[in] mean Input average pixel value. + * @param[in] global_sum Keeps global sum of pixel values. + * @param[in] stddev (Optional) Output standard deviation of pixel values. + * @param[in] global_sum_squared (Optional if stddev is not set, required if stddev is set) Keeps global sum of squared pixel values. + * + * @return a status + */ + static Status validate(const ITensorInfo *input, float *mean, cl::Buffer *global_sum, float *stddev = nullptr, cl::Buffer *global_sum_squared = nullptr); // Inherited methods overridden: void run(const Window &window, cl::CommandQueue &queue) override; |