From 488a29344419bd2e4402fc6394d43c123548e1ec Mon Sep 17 00:00:00 2001 From: Dominic Symes Date: Wed, 13 Jan 2021 12:02:51 +0000 Subject: SCATTER: Clarify behaviour This clarifies that repeated updates to the same output index are not permitted in TOSA SCATTER. Change-Id: Ib188a434d0d4ad4742ee37373491c8a53d501bf0 Signed-off-by: Dominic Symes --- chapters/scatter_gather.adoc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/chapters/scatter_gather.adoc b/chapters/scatter_gather.adoc index e1be77f..65c0fe3 100644 --- a/chapters/scatter_gather.adoc +++ b/chapters/scatter_gather.adoc @@ -55,6 +55,8 @@ for_each(0<=n(values_in, [N,K,C], [n,k,c]) tensor_write(values_out, [N,K,C], [n, k, c], value) + output_modified[n,k,c]=false; } -// Now perform the SCATTER operation, writing to the positions from the indices tensor + +// Now perform the SCATTER operation, modifying the positions from the indices tensor for_each(0<=n(indices, [N,W], [n,w]) assert(0<=k && k(input, [N,W,C], [n,w,c]) tensor_write(values_out, [N,K,C], [n, k, c], value) + output_modified[n,k,c]=true; } ---- -- cgit v1.2.1