aboutsummaryrefslogtreecommitdiff
path: root/chapters/reduction.adoc
diff options
context:
space:
mode:
authorEric Kunze <eric.kunze@arm.com>2023-07-18 15:20:53 -0700
committerEric Kunze <eric.kunze@arm.com>2023-08-17 09:32:28 -0700
commitfb0284e2912bd5fd73bf6f476901490e04c330a2 (patch)
tree1784e40ad84a91e751679a4cbdf6cd33be1eefdb /chapters/reduction.adoc
parentb5b067819e5de11153b41cf3d26da4f3f9dd23e8 (diff)
downloadspecification-fb0284e2912bd5fd73bf6f476901490e04c330a2.tar.gz
Change TOSA specification to signless types
Integer inputs and outputs to TOSA operators are now defined as signless values. In most instances the operator will used signed arithmetic as indicated in previous versions of the specification resulting in little functional change to the specification. New attributes have been added to the RESCALE operator to indicate whether the input and output values should be treated as signed or unsigned. Explicit use of static_cast, sign_extend, zero_extend and truncate are added to the pseudocode to avoid ambiguity. Change-Id: I71c67d3e5aeaabc418c768f821fce6ee3eebb65b
Diffstat (limited to 'chapters/reduction.adoc')
-rw-r--r--chapters/reduction.adoc10
1 files changed, 5 insertions, 5 deletions
diff --git a/chapters/reduction.adoc b/chapters/reduction.adoc
index 713404c..8a3ceac 100644
--- a/chapters/reduction.adoc
+++ b/chapters/reduction.adoc
@@ -1,7 +1,7 @@
//
// This confidential and proprietary software may be used only as
// authorised by a licensing agreement from ARM Limited
-// (C) COPYRIGHT 2020-2021 ARM Limited
+// (C) COPYRIGHT 2020-2023 ARM Limited
// ALL RIGHTS RESERVED
// The entire notice above must be reproduced on all authorised
// copies and copies may only be made to the extent permitted
@@ -77,7 +77,7 @@ for_each(index in shape1) {
out_index[axis] = 0;
in_out_t value = tensor_read<in_out_t>(input, shape1, index);
in_out_t state = tensor_read<in_out_t>(output, shape, out_index);
- state = apply_max<in_out_t>(state, value);
+ state = apply_max_s<in_out_t>(state, value);
tensor_write<in_out_t>(output, shape, out_index, state);
}
----
@@ -100,7 +100,7 @@ for_each(index in shape1) {
out_index[axis] = 0;
in_out_t value = tensor_read<in_out_t>(input, shape1, index);
in_out_t state = tensor_read<in_out_t>(output, shape, out_index);
- state = apply_min<in_out_t>(state, value);
+ state = apply_min_s<in_out_t>(state, value);
tensor_write<in_out_t>(output, shape, out_index, state);
}
----
@@ -123,7 +123,7 @@ for_each(index in shape1) {
out_index[axis] = 0;
in_out_t value = tensor_read<in_out_t>(input, shape1, index);
in_out_t state = tensor_read<in_out_t>(output, shape, out_index);
- state = state * value;
+ state = apply_mul_s<in_out_t>(state, value);
tensor_write<in_out_t>(output, shape, out_index, state);
}
----
@@ -146,7 +146,7 @@ for_each(index in shape1) {
out_index[axis] = 0;
in_out_t value = tensor_read<in_out_t>(input, shape1, index);
in_out_t state = tensor_read<in_out_t>(output, shape, out_index);
- state = apply_add<in_out_t>(state, value);
+ state = apply_add_s<in_out_t>(state, value);
tensor_write<in_out_t>(output, shape, out_index, state);
}
----