aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2019-05-21 13:32:43 +0100
committerGeorgios Pinitas <georgios.pinitas@arm.com>2019-06-03 14:51:29 +0000
commit4c5469b192665c94118a8a558787cb9cec2d0765 (patch)
tree168aa969de8243bdbb1f25247dd9f54d037ae32c /utils
parent43a129e94df41f9ac8bc78b702da5a387ada0494 (diff)
downloadComputeLibrary-4c5469b192665c94118a8a558787cb9cec2d0765.tar.gz
COMPMID-2225: Add interface support for new quantized data types.
Add support for: -QSYMM8, 8-bit quantized symmetric -QSYMM8_PER_CHANNEL, 8-bit quantized symmetric with per channel quantization Change-Id: I00c4ff98e44af37419470af61419ee95d0de2463 Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com> Reviewed-on: https://review.mlplatform.org/c/1236 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'utils')
-rw-r--r--utils/TypePrinter.h23
-rw-r--r--utils/Utils.h2
2 files changed, 19 insertions, 6 deletions
diff --git a/utils/TypePrinter.h b/utils/TypePrinter.h
index 25c8cd396d..cf351724f0 100644
--- a/utils/TypePrinter.h
+++ b/utils/TypePrinter.h
@@ -24,7 +24,6 @@
#ifndef __ARM_COMPUTE_TYPE_PRINTER_H__
#define __ARM_COMPUTE_TYPE_PRINTER_H__
-#include "arm_compute/core/CL/CLTypes.h"
#include "arm_compute/core/CPP/CPPTypes.h"
#include "arm_compute/core/Dimensions.h"
#include "arm_compute/core/Error.h"
@@ -316,15 +315,21 @@ inline std::string to_string(const GenerateProposalsInfo &proposals_info)
/** Formatted output of the QuantizationInfo type.
*
- * @param[out] os Output stream.
- * @param[in] quantization_info Type to output.
+ * @param[out] os Output stream.
+ * @param[in] qinfo Type to output.
*
* @return Modified output stream.
*/
-inline ::std::ostream &operator<<(::std::ostream &os, const QuantizationInfo &quantization_info)
+inline ::std::ostream &operator<<(::std::ostream &os, const QuantizationInfo &qinfo)
{
- os << "Scale:" << quantization_info.scale << "~"
- << "Offset:" << quantization_info.offset;
+ if(!qinfo.scale.empty())
+ {
+ os << "Scale:" << qinfo.scale[0] << "~";
+ }
+ if(!qinfo.empty())
+ {
+ os << "Offset:" << qinfo.offset[0];
+ }
return os;
}
@@ -619,9 +624,15 @@ inline ::std::ostream &operator<<(::std::ostream &os, const DataType &data_type)
case DataType::U8:
os << "U8";
break;
+ case DataType::QSYMM8:
+ os << "QSYMM8";
+ break;
case DataType::QASYMM8:
os << "QASYMM8";
break;
+ case DataType::QSYMM8_PER_CHANNEL:
+ os << "QSYMM8_PER_CHANNEL";
+ break;
case DataType::S8:
os << "S8";
break;
diff --git a/utils/Utils.h b/utils/Utils.h
index afd90a11a3..b4c23e849a 100644
--- a/utils/Utils.h
+++ b/utils/Utils.h
@@ -168,6 +168,8 @@ inline std::string get_typestring(DataType data_type)
case DataType::QASYMM8:
return no_endianness + "u" + support::cpp11::to_string(sizeof(uint8_t));
case DataType::S8:
+ case DataType::QSYMM8:
+ case DataType::QSYMM8_PER_CHANNEL:
return no_endianness + "i" + support::cpp11::to_string(sizeof(int8_t));
case DataType::U16:
return endianness + "u" + support::cpp11::to_string(sizeof(uint16_t));