diff options
author | Dominic Symes <dominic.symes@arm.com> | 2021-03-19 13:56:27 +0000 |
---|---|---|
committer | Dominic Symes <dominic.symes@arm.com> | 2021-07-13 09:51:07 +0100 |
commit | ca2a854e3d46f91ecaa446d4b2311112cc2326fd (patch) | |
tree | 23fc1bb30c333a28d4a743a4a05059b79cf7b826 /chapters/ewise_binary.adoc | |
parent | a9101530d8ea7a3cb470b722bc6cf8745ab283ac (diff) | |
download | specification-ca2a854e3d46f91ecaa446d4b2311112cc2326fd.tar.gz |
Add definition of TOSA compliance
Signed-off-by: Dominic Symes <dominic.symes@arm.com>
Change-Id: I2e25d0467843adb078d5ab9fd681af40b2ffa52e
Diffstat (limited to 'chapters/ewise_binary.adoc')
-rw-r--r-- | chapters/ewise_binary.adoc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/chapters/ewise_binary.adoc b/chapters/ewise_binary.adoc index d94676c..2b1eadd 100644 --- a/chapters/ewise_binary.adoc +++ b/chapters/ewise_binary.adoc @@ -540,13 +540,12 @@ Axis of size 1 will be broadcast, as necessary. Rank of input tensors must match [source,c++] ---- -REQUIRE(in_t == int32_t || shift == 0); for_each(index in shape) { index1 = apply_broadcast(shape, shape1, index); index2 = apply_broadcast(shape, shape2, index); in_t value1 = tensor_read<in_t>(input1, shape1, index1); in_t value2 = tensor_read<in_t>(input2, shape2, index2); - if (shift>0) { + if (in_t == int32_t && shift > 0) { out_t acc = apply_scale_32(value1, value2, shift); } else { out_t acc = value1 * value2; // low 32-bits of result for int32_t |