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>
diff --git a/utils/TypePrinter.h b/utils/TypePrinter.h
index 25c8cd3..cf35172 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 @@
/** 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 @@
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;