diff options
author | Kevin Petit <kevin.petit@arm.com> | 2024-01-25 14:53:20 +0000 |
---|---|---|
committer | Eric Kunze <eric.kunze@arm.com> | 2024-01-28 15:59:46 +0000 |
commit | 7e5d187c612fcc715ea3f7f0c900eb13af75a660 (patch) | |
tree | a933798aa65c5bdc580f51538ffa28563cf69ebf | |
parent | 608588390a90e6e337a592b62cf811d1ea8ea0fd (diff) | |
download | specification-7e5d187c612fcc715ea3f7f0c900eb13af75a660.tar.gz |
Add missing pseudocode for CONST, CUSTOM, ERF, and IDENTITY operators
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
Change-Id: Icb824233e5be84ac0eb693459b65441e9ae6c545
-rw-r--r-- | chapters/activation_funcs.adoc | 5 | ||||
-rw-r--r-- | chapters/custom.adoc | 4 | ||||
-rw-r--r-- | chapters/data_nodes.adoc | 9 | ||||
-rw-r--r-- | pseudocode/operators/CONST.tosac | 10 | ||||
-rw-r--r-- | pseudocode/operators/CUSTOM.tosac | 11 | ||||
-rw-r--r-- | pseudocode/operators/ERF.tosac | 14 | ||||
-rw-r--r-- | pseudocode/operators/IDENTITY.tosac | 10 |
7 files changed, 61 insertions, 2 deletions
diff --git a/chapters/activation_funcs.adoc b/chapters/activation_funcs.adoc index 1be3168..a64d7d0 100644 --- a/chapters/activation_funcs.adoc +++ b/chapters/activation_funcs.adoc @@ -43,6 +43,11 @@ include::{pseudocode}/operators/tables/ERF.tosac[lines=10..-1] include::{generated}/operators/ERF.adoc[] +[source,c++] +---- +include::{pseudocode}/operators/ERF.tosac[lines=10..-1] +---- + ==== SIGMOID Applies the sigmoid logistic function to each element of the input tensor. diff --git a/chapters/custom.adoc b/chapters/custom.adoc index 76f3eb4..6d7eb49 100644 --- a/chapters/custom.adoc +++ b/chapters/custom.adoc @@ -22,5 +22,5 @@ include::{generated}/operators/CUSTOM.adoc[] [source,c++] ---- -// Implementation defined behavior -----
\ No newline at end of file +include::{pseudocode}/operators/CUSTOM.tosac[lines=10..-1] +---- diff --git a/chapters/data_nodes.adoc b/chapters/data_nodes.adoc index 65e6b75..f0fc149 100644 --- a/chapters/data_nodes.adoc +++ b/chapters/data_nodes.adoc @@ -15,9 +15,18 @@ A node containing constant data for use as the input to an operation. May hold d include::{generated}/operators/CONST.adoc[] +[source,c++] +---- +include::{pseudocode}/operators/CONST.tosac[lines=10..-1] +---- + ==== IDENTITY Returns a tensor with the same shape, type, and contents as the input. include::{generated}/operators/IDENTITY.adoc[] +[source,c++] +---- +include::{pseudocode}/operators/IDENTITY.tosac[lines=10..-1] +---- diff --git a/pseudocode/operators/CONST.tosac b/pseudocode/operators/CONST.tosac new file mode 100644 index 0000000..d14ead2 --- /dev/null +++ b/pseudocode/operators/CONST.tosac @@ -0,0 +1,10 @@ +// +// This confidential and proprietary software may be used only as +// authorised by a licensing agreement from ARM Limited +// (C) COPYRIGHT 2024 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 +// by a licensing agreement from ARM Limited. + +output = values; diff --git a/pseudocode/operators/CUSTOM.tosac b/pseudocode/operators/CUSTOM.tosac new file mode 100644 index 0000000..6a4f224 --- /dev/null +++ b/pseudocode/operators/CUSTOM.tosac @@ -0,0 +1,11 @@ +// +// This confidential and proprietary software may be used only as +// authorised by a licensing agreement from ARM Limited +// (C) COPYRIGHT 2020-2024 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 +// by a licensing agreement from ARM Limited. + + +// Implementation defined behavior diff --git a/pseudocode/operators/ERF.tosac b/pseudocode/operators/ERF.tosac new file mode 100644 index 0000000..e226a52 --- /dev/null +++ b/pseudocode/operators/ERF.tosac @@ -0,0 +1,14 @@ +// +// This confidential and proprietary software may be used only as +// authorised by a licensing agreement from ARM Limited +// (C) COPYRIGHT 2020-2024 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 +// by a licensing agreement from ARM Limited. + +for_each(index in shape) { + in_out_t value1 = tensor_read<in_out_t>(input, shape, index); + in_out_t value = erf<in_out_t>(value1); + tensor_write<in_out_t>(output, shape, index, value); +} diff --git a/pseudocode/operators/IDENTITY.tosac b/pseudocode/operators/IDENTITY.tosac new file mode 100644 index 0000000..28d71af --- /dev/null +++ b/pseudocode/operators/IDENTITY.tosac @@ -0,0 +1,10 @@ +// +// This confidential and proprietary software may be used only as +// authorised by a licensing agreement from ARM Limited +// (C) COPYRIGHT 2024 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 +// by a licensing agreement from ARM Limited. + +output = input1; |