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 <jeremy.johnson+kaizengerrit@arm.com>
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
diff --git a/arm_compute/core/CL/kernels/CLPoolingLayerKernel.h b/arm_compute/core/CL/kernels/CLPoolingLayerKernel.h
index a9159a4..ffb5d79 100644
--- a/arm_compute/core/CL/kernels/CLPoolingLayerKernel.h
+++ b/arm_compute/core/CL/kernels/CLPoolingLayerKernel.h
@@ -53,14 +53,14 @@
*
* @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 acdb956..656956d 100644
--- a/arm_compute/core/Helpers.inl
+++ b/arm_compute/core/Helpers.inl
@@ -263,7 +263,7 @@
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 e8be612..eaff8fb 100644
--- a/arm_compute/core/Types.h
+++ b/arm_compute/core/Types.h
@@ -120,7 +120,7 @@
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<int>(value) - offset) * scale;
return dequantized;
}
diff --git a/arm_compute/core/Utils.h b/arm_compute/core/Utils.h
index b2bd7bd..96e99e6 100644
--- a/arm_compute/core/Utils.h
+++ b/arm_compute/core/Utils.h
@@ -792,7 +792,7 @@
*
* @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)
{