aboutsummaryrefslogtreecommitdiff
path: root/chapters/type_conversion.adoc
diff options
context:
space:
mode:
authorEric Kunze <eric.kunze@arm.com>2021-10-25 16:04:20 -0700
committerEric Kunze <eric.kunze@arm.com>2021-10-28 09:57:46 -0700
commit3170439f3938d007e58998d61eed98560c3f026c (patch)
tree6f4abac7c7c037b749c6801e95259fdd14cfd341 /chapters/type_conversion.adoc
parent82019a2621edf481e12b5de09dbfe5dc56283150 (diff)
downloadspecification-3170439f3938d007e58998d61eed98560c3f026c.tar.gz
Remove zp subtraction from tensor_read pseudocode
Operators which use the zero-point functionalty for 8-bit integer processing are updated to do the zero-point subtract in their pseudocode. Note that the PAD operator no longer takes a zero point argument, and instead requires callers to account for the zero point in the pad_const argument. Change-Id: I3bca1cae85aa2093000c420f0433633c347a29de
Diffstat (limited to 'chapters/type_conversion.adoc')
-rw-r--r--chapters/type_conversion.adoc3
1 files changed, 2 insertions, 1 deletions
diff --git a/chapters/type_conversion.adoc b/chapters/type_conversion.adoc
index 77af54a..0d84bd6 100644
--- a/chapters/type_conversion.adoc
+++ b/chapters/type_conversion.adoc
@@ -100,7 +100,8 @@ for_each(index in shape) {
ERROR_IF(out_t != int8_t && out_t != uint8_t && output_zp != 0);
ERROR_IF(scale32 && in_t == int48_t);
ERROR_IF(!scale32 && double_round);
- int48_t value = tensor_read<in_t>(input, shape, index, input_zp);
+ int48_t value = tensor_read<in_t>(input, shape, index);
+ value = value - input_zp;
int c = (per_channel) ? index[dims-1] : 0;
int32_t result = (scale32) ?
apply_scale_32(value, multiplier[c], shift[c], double_round) :