From af6204c331eed7894ec4c5fd4e98ec22b6dac676 Mon Sep 17 00:00:00 2001 From: Anton Lokhmotov Date: Wed, 8 Nov 2017 09:34:19 +0000 Subject: COMPMID-661: Add avgpool-uint8 support. Optimize avgpool-fp32 for Bifrost. (#13) Change-Id: I32ba6afbac6694ffa053dd16f03a1b3d14627a19 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/94857 Tested-by: Kaizen Reviewed-by: Anthony Barbier --- arm_compute/core/CL/kernels/CLPoolingLayerKernel.h | 4 ++-- arm_compute/core/Helpers.inl | 2 +- arm_compute/core/Types.h | 2 +- arm_compute/core/Utils.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'arm_compute/core') diff --git a/arm_compute/core/CL/kernels/CLPoolingLayerKernel.h b/arm_compute/core/CL/kernels/CLPoolingLayerKernel.h index a9159a4bb8..ffb5d79514 100644 --- a/arm_compute/core/CL/kernels/CLPoolingLayerKernel.h +++ b/arm_compute/core/CL/kernels/CLPoolingLayerKernel.h @@ -53,14 +53,14 @@ public: * * @note QS8 and QS16 are supported only for pool sizes 3, 5 and 7 * - * @param[in] input Source tensor. Data types supported: QS8/QS16/F16/F32. + * @param[in] input Source tensor. Data types supported: QS8/QASYMM8/QS16/F16/F32. * @param[out] output Destination tensor. Data types supported: Same as @p input. * @param[in] pool_info Contains pooling operation information described in @ref PoolingLayerInfo. */ void configure(const ICLTensor *input, ICLTensor *output, const PoolingLayerInfo &pool_info); /** Static function to check if given info will lead to a valid configuration of @ref CLPoolingLayerKernel * - * @param[in] input Source tensor info. Data types supported: QS8/QS16/F16/F32. + * @param[in] input Source tensor info. Data types supported: QS8/QASYMM8/QS16/F16/F32. * @param[in] output Destination tensor info. Data types supported: Same as @p input. * @param[in] pool_info Contains pooling operation information described in @ref PoolingLayerInfo. * diff --git a/arm_compute/core/Helpers.inl b/arm_compute/core/Helpers.inl index acdb9567db..656956d00a 100644 --- a/arm_compute/core/Helpers.inl +++ b/arm_compute/core/Helpers.inl @@ -263,7 +263,7 @@ inline bool set_fixed_point_position_if_zero(ITensorInfo &info, int fixed_point_ inline bool set_quantization_info_if_empty(ITensorInfo &info, QuantizationInfo quantization_info) { - if(info.quantization_info().empty() && (is_data_type_quantized_assymetric(info.data_type()))) + if(info.quantization_info().empty() && (is_data_type_quantized_asymmetric(info.data_type()))) { info.set_quantization_info(quantization_info); return true; diff --git a/arm_compute/core/Types.h b/arm_compute/core/Types.h index e8be6127a8..eaff8fb709 100644 --- a/arm_compute/core/Types.h +++ b/arm_compute/core/Types.h @@ -120,7 +120,7 @@ struct QuantizationInfo float dequantize(uint8_t value) const { ARM_COMPUTE_ERROR_ON_MSG(scale == 0, "QuantizationInfo::dequantize: scale == 0"); - float dequantized = (value - offset) * scale; + float dequantized = (static_cast(value) - offset) * scale; return dequantized; } diff --git a/arm_compute/core/Utils.h b/arm_compute/core/Utils.h index b2bd7bd4ab..96e99e6874 100644 --- a/arm_compute/core/Utils.h +++ b/arm_compute/core/Utils.h @@ -792,7 +792,7 @@ inline bool is_data_type_fixed_point(DataType dt) * * @return True if data type is of symmetric quantized type, else false. */ -inline bool is_data_type_quantized_assymetric(DataType dt) +inline bool is_data_type_quantized_asymmetric(DataType dt) { switch(dt) { -- cgit v1.2.1