aboutsummaryrefslogtreecommitdiff
path: root/src/armnn
diff options
context:
space:
mode:
authorKeith Davis <keith.davis@arm.com>2019-11-04 08:58:33 +0000
committerKeith Davis <keith.davis@arm.com>2019-11-04 16:46:35 +0000
commit5236e1d6bcff6ebec7ec10d7d416cc6ead5482dd (patch)
tree4152c5fcd6b9c11848a02dfa4ff8705a2cfae0a5 /src/armnn
parentf71079328ae72a65c91e410b2bd35eabb67cb6d1 (diff)
downloadarmnn-5236e1d6bcff6ebec7ec10d7d416cc6ead5482dd.tar.gz
IVGCVSW-3835 Create Encoder and Decoder for QSymm8PerAxis
* Add QuantizedSymm8PerAxis to armnn DataType (types.hpp) and * Add Quantize and Dequantize template for int8 in TypeUtils to be able to compute QSymm8 of the weight * Create PerAxisIterator for per-axis quantization * Create QSymm8PerAxisDecoder * Create QSymm8PerAxisEncoder Signed-off-by: Keith Davis <keith.davis@arm.com> Change-Id: Ibcfe0288a197b7ee50b543bdbd77b7edb8a547c2
Diffstat (limited to 'src/armnn')
-rw-r--r--src/armnn/TypesUtils.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/armnn/TypesUtils.cpp b/src/armnn/TypesUtils.cpp
index cdc30da8ca..83c56c491c 100644
--- a/src/armnn/TypesUtils.cpp
+++ b/src/armnn/TypesUtils.cpp
@@ -33,6 +33,10 @@ float armnn::Dequantize(QuantizedType value, float scale, int32_t offset)
return dequantized;
}
+/// Explicit specialization of Quantize for int8_t
+template
+int8_t armnn::Quantize<int8_t>(float value, float scale, int32_t offset);
+
/// Explicit specialization of Quantize for uint8_t
template
uint8_t armnn::Quantize<uint8_t>(float value, float scale, int32_t offset);
@@ -45,6 +49,10 @@ int16_t armnn::Quantize<int16_t>(float value, float scale, int32_t offset);
template
int32_t armnn::Quantize<int32_t>(float value, float scale, int32_t offset);
+/// Explicit specialization of Dequantize for int8_t
+template
+float armnn::Dequantize<int8_t>(int8_t value, float scale, int32_t offset);
+
/// Explicit specialization of Dequantize for uint8_t
template
float armnn::Dequantize<uint8_t>(uint8_t value, float scale, int32_t offset);