aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Kunze <eric.kunze@arm.com>2020-10-08 14:33:53 -0700
committerEric Kunze <eric.kunze@arm.com>2020-10-08 14:37:12 -0700
commitedbb7ba7504c13ea3fad8ee4e822bf451c8b8240 (patch)
tree777c31e6f1fa0c88fb618f06dd409c137dabf004
parent3309a5362a13f840e84a2f67b9ba7141aae58cc4 (diff)
downloadspecification-edbb7ba7504c13ea3fad8ee4e822bf451c8b8240.tar.gz
Fix ordering of operators
REDUCE_ANY/ALL PLACEHOLDER/IDENTITY* Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I3436a91b8137fa4fce9b8c2027cd669cfbdcd539
-rw-r--r--chapters/data_nodes.adoc48
-rw-r--r--chapters/reduction.adoc16
2 files changed, 32 insertions, 32 deletions
diff --git a/chapters/data_nodes.adoc b/chapters/data_nodes.adoc
index a7886ff..ba38ef9 100644
--- a/chapters/data_nodes.adoc
+++ b/chapters/data_nodes.adoc
@@ -33,30 +33,6 @@ A node containing constant data for use as the input to an operation. May hold d
|MI, MT|float|float
|===
-==== PLACEHOLDER
-
-A node where data will be inserted into the network at runtime. Generally used for inputs to the network.
-
-*Arguments:*
-|===
-|Argument|Type|Name|Shape|Description
-
-|Output|out_t*|output|shape|Output tensor of same type, size as the input tensor
-|===
-
-*Supported Data Types:*
-
-|===
-|Profile|Mode|out_t
-
-|Any|Boolean|bool
-|Any|unsigned 8|uint8
-|Any|signed 8|int8/aint8
-|Any|signed 16|int16
-|Any|signed 32|int32
-|MI, MT|float|float
-|===
-
==== IDENTITY
Returns a tensor with the same shape, type, and contents as the input.
@@ -106,3 +82,27 @@ Returns a list of tensors with the same shape, type, and contents as the input l
|Any|signed 32|int32|int32
|MI, MT|float|float|float
|===
+
+==== PLACEHOLDER
+
+A node where data will be inserted into the network at runtime. Generally used for inputs to the network.
+
+*Arguments:*
+|===
+|Argument|Type|Name|Shape|Description
+
+|Output|out_t*|output|shape|Output tensor of same type, size as the input tensor
+|===
+
+*Supported Data Types:*
+
+|===
+|Profile|Mode|out_t
+
+|Any|Boolean|bool
+|Any|unsigned 8|uint8
+|Any|signed 8|int8/aint8
+|Any|signed 16|int16
+|Any|signed 32|int32
+|MI, MT|float|float
+|===
diff --git a/chapters/reduction.adoc b/chapters/reduction.adoc
index bef68a3..a9687b1 100644
--- a/chapters/reduction.adoc
+++ b/chapters/reduction.adoc
@@ -9,9 +9,9 @@
=== Reduction Operators
-==== REDUCE_ANY
+==== REDUCE_ALL
-Reduce a tensor along the given axes with a logical OR operation
+Reduce a tensor along the given axes with a logical AND operation
*Arguments:*
@@ -34,7 +34,7 @@ for_each (axis in axes[]) {
}
if (keep_dims) assert(tmp_shape == out_shape)
for_each (index in tmp_shape) {
- tensor_write<in_t>(output, tmp_shape, index, false)
+ tensor_write<in_t>(output, tmp_shape, index, true)
}
for_each (index in in_shape) {
tmp_index = index;
@@ -43,7 +43,7 @@ for_each (index in in_shape) {
}
value = tensor_read<in_t>(input, in_shape, index)
acc = tensor_read<in_t>(output, tmp_shape, tmp_index)
- acc = acc || value
+ acc = acc && value
tensor_write<in_t>(output, tmp_shape, tmp_index, acc)
}
----
@@ -56,9 +56,9 @@ for_each (index in in_shape) {
|Any|Boolean|bool|bool
|===
-==== REDUCE_ALL
+==== REDUCE_ANY
-Reduce a tensor along the given axes with a logical AND operation
+Reduce a tensor along the given axes with a logical OR operation
*Arguments:*
@@ -81,7 +81,7 @@ for_each (axis in axes[]) {
}
if (keep_dims) assert(tmp_shape == out_shape)
for_each (index in tmp_shape) {
- tensor_write<in_t>(output, tmp_shape, index, true)
+ tensor_write<in_t>(output, tmp_shape, index, false)
}
for_each (index in in_shape) {
tmp_index = index;
@@ -90,7 +90,7 @@ for_each (index in in_shape) {
}
value = tensor_read<in_t>(input, in_shape, index)
acc = tensor_read<in_t>(output, tmp_shape, tmp_index)
- acc = acc && value
+ acc = acc || value
tensor_write<in_t>(output, tmp_shape, tmp_index, acc)
}
----