diff options
author | Dominic Symes <dominic.symes@arm.com> | 2020-10-22 15:36:24 +0100 |
---|---|---|
committer | Dominic Symes <dominic.symes@arm.com> | 2020-10-22 15:39:46 +0100 |
commit | 298a029348e07903b1f78eb9994230fa205e869e (patch) | |
tree | aeb3f2c39949992c172f56f3f30140a716990314 /chapters/tensor_ops.adoc | |
parent | 1d84a1e8269b3f61aaa12219221e3bbf68a61fc6 (diff) | |
download | specification-298a029348e07903b1f78eb9994230fa205e869e.tar.gz |
Make rank() consistent across files
Complete the function naming change from
dimensions() to rank(). Fix MATMUL to
use apply_add() for additions, consistent
with the other operations.
Signed-off-by: Dominic Symes <dominic.symes@arm.com>
Change-Id: I6ba84cf8b016505e8477b04dd00f2a2bf3194492
Diffstat (limited to 'chapters/tensor_ops.adoc')
-rw-r--r-- | chapters/tensor_ops.adoc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chapters/tensor_ops.adoc b/chapters/tensor_ops.adoc index 2ea4ba8..b8e053c 100644 --- a/chapters/tensor_ops.adoc +++ b/chapters/tensor_ops.adoc @@ -387,13 +387,13 @@ Performs a two dimensional matrix multiplication. This allows both inputs to be [source,c] ---- -assert(in_t==aint8_t || (A_zp==0 && B_zp==0) // Zero point only for asymmetric int8 +assert(in_t==aint8_t || (A_zp==0 && B_zp==0)) // Zero point only for asymmetric int8 for_each (0<=m<M, 0<=n<N) { acc_t acc = 0 for_each (0<=k<K) { value1 = tensor_read<in_t>(A, [M,K], [m,k], A_zp) value2 = tensor_read<in_t>(B, [K,N], [k,n], B_zp) - acc = acc + value1 * value2 + acc = apply_add<acc_t>(acc, value1 * value2) } tensor_write<acc_t>(C, [M,N], [m,n], acc) } |