From 58098a7b1ffcf41da759f862deb753c82fe5b4b0 Mon Sep 17 00:00:00 2001 From: Eric Kunze Date: Fri, 5 Aug 2022 15:40:12 -0700 Subject: Machine parsable specification This converts portions of the asciidoc specification into an xml document and schema. For the html and pdf outputs, the xml is converted to asciidoc files that are included into the existing specification. The xml allows future automated uses of the tosa specification while maintaining rough compatibility with the existing document. No significant functional changes are included in this change. Change-Id: I7f1f95c527638e270c157d58fcdec6a3510daea5 Signed-off-by: Eric Kunze --- chapters/activation_funcs.adoc | 62 +++--------------------------------------- 1 file changed, 4 insertions(+), 58 deletions(-) (limited to 'chapters/activation_funcs.adoc') diff --git a/chapters/activation_funcs.adoc b/chapters/activation_funcs.adoc index 27ba596..54697d2 100644 --- a/chapters/activation_funcs.adoc +++ b/chapters/activation_funcs.adoc @@ -11,20 +11,12 @@ === Activation Functions ==== CLAMP + Clamp to an arbitrary minimum and maximum value. Maximum and minimum values are specified as values in the range of the input type. No zero point subtraction is done to the values, thus to clamp to the zero point value, the zero point itself should be supplied as the minimum value. -*Arguments:* - -|=== -|Argument|Type|Name|Shape|Description - -|Input|in_out_t*|Input|shape|Input tensor -|Attribute|in_out_t|min_val|-|minimum clip value -|Attribute|in_out_t|max_val|-|maximum clip value -|Output|in_out_t*|Output|shape|Output tensor of same type and shape as input -|=== +include::{generated}/operators/CLAMP.adoc[] *Operation Function:* [source,c++] @@ -37,18 +29,6 @@ for_each(index in shape) { } ---- -*Supported Data Types:* - -|=== -|Profile|Mode|in_out_t - -|Any|signed 8|int8_t -|Any|signed 16|int16_t -|MI, MT|fp16|fp16_t -|MI, MT|bf16|bf16_t -|MI, MT|fp32|fp32_t -|=== - ==== SIGMOID Sigmoid function: output = 1 / (1 + exp(-input)) @@ -69,24 +49,7 @@ int16_t sigmoid_reference(int16_t x) { // input x range is -256 to + 256 inclusi generate_lookup_table(&sigmoid_table, &sigmoid_reference); ---- -*Arguments:* - -|=== -|Argument|Type|Name|Shape|Description - -|Input|in_out_t*|Input|shape|Input tensor -|Output|in_out_t*|Output|shape|Output tensor of same type and shape as input -|=== - -*Supported Data Types:* - -|=== -|Profile|Mode|in_out_t - -|MI, MT|fp16|fp16_t -|MI, MT|bf16|bf16_t -|MI, MT|fp32|fp32_t -|=== +include::{generated}/operators/SIGMOID.adoc[] ==== TANH @@ -109,21 +72,4 @@ int16_t tanh_reference(int16_t x) { // input x range is -256 to +256 inclusive generate_lookup_table(&tanh_table, &tanh_reference); ---- -*Arguments:* - -|=== -|Argument|Type|Name|Shape|Description - -|Input|in_out_t*|Input|shape|Input tensor -|Output|in_out_t*|Output|shape|Output tensor of same type and shape as input -|=== - -*Supported Data Types:* - -|=== -|Profile|Mode|in_out_t - -|MI, MT|fp16|fp16_t -|MI, MT|bf16|bf16_t -|MI, MT|fp32|fp32_t -|=== +include::{generated}/operators/TANH.adoc[] -- cgit v1.2.1