diff options
Diffstat (limited to 'chapters')
-rw-r--r-- | chapters/data_layout.adoc | 9 | ||||
-rw-r--r-- | chapters/ewise_binary.adoc | 12 | ||||
-rw-r--r-- | chapters/ewise_ternary.adoc | 4 | ||||
-rw-r--r-- | chapters/ewise_unary.adoc | 19 | ||||
-rw-r--r-- | chapters/image.adoc | 4 | ||||
-rw-r--r-- | chapters/reduction.adoc | 4 | ||||
-rw-r--r-- | chapters/scatter_gather.adoc | 4 | ||||
-rw-r--r-- | chapters/tensor_ops.adoc | 85 | ||||
-rw-r--r-- | chapters/type_conversion.adoc | 11 |
9 files changed, 19 insertions, 133 deletions
diff --git a/chapters/data_layout.adoc b/chapters/data_layout.adoc index 4368474..bc8d853 100644 --- a/chapters/data_layout.adoc +++ b/chapters/data_layout.adoc @@ -68,17 +68,10 @@ Returns a new tensor with the padding included. |Input|in_t*|input1|shape1|Input tensor |Attribute|int|padding|[rank(input1),2]|Amount of padding to be done |Attribute|in_t|pad_const|-|Constant value to be used as padding +|Attribute|in_t|input1_zp|-|Input tensor zero point. Must be zero for non-int8 types. |Output|in_t*|output|shape|Output tensor of same type as the input tensor |=== -*Quantization Parameters:* - -|=== -|Argument|Type|Name|Shape|Description - -|Attribute|in_t|input1_zp|-|Input tensor zero point -|=== - *Operation Function:* [source,c++] diff --git a/chapters/ewise_binary.adoc b/chapters/ewise_binary.adoc index 99eb597..f44f7f5 100644 --- a/chapters/ewise_binary.adoc +++ b/chapters/ewise_binary.adoc @@ -271,10 +271,6 @@ Axis of size 1 will be broadcast, as necessary. Rank of input tensors must match |Output|in_t*|output|shape|Output tensor with broadcast shape if necessary |=== -*Quantization Parameters:* - -None - *Operation Function:* [source,c++] @@ -586,10 +582,6 @@ Axis of size 1 will be broadcast, as necessary. Rank of input tensors must match |Output|in_t*|output|shape|Output tensor of same type as the input tensors, with broadcast shape if necessary |=== -*Quantization Parameters:* - -Only supported with floating-point values. - *Supported Data Types:* |=== @@ -662,10 +654,6 @@ An int16_t to int16_t table lookup can be constructed in TOSA as follows: |Output|out_t*|output|shape|Output tensor |=== -*Quantization Parameters:* - -None - *Operation Function:* [source,c++] diff --git a/chapters/ewise_ternary.adoc b/chapters/ewise_ternary.adoc index e7f8c2e..ecf40d1 100644 --- a/chapters/ewise_ternary.adoc +++ b/chapters/ewise_ternary.adoc @@ -24,10 +24,6 @@ Elementwise select of the output based on a condition. |Output|in_t*|output|shape|Output tensor of same type as input2 and input3, with broadcast shape if necessary |=== -*Quantization Parameters:* - -None - *Operation Function:* [source,c++] diff --git a/chapters/ewise_unary.adoc b/chapters/ewise_unary.adoc index 036c6e3..2dc01df 100644 --- a/chapters/ewise_unary.adoc +++ b/chapters/ewise_unary.adoc @@ -56,10 +56,6 @@ Elementwise bitwise NOT of input tensor. |Output|in_t*|output|shape|Output tensor of same type, size as the input tensor |=== -*Quantization Parameters:* - -None - *Operation Function:* [source,c++] @@ -210,10 +206,6 @@ Elementwise logical NOT of input. |Output|in_t*|output|shape|Output tensor of same type, size as the input tensor |=== -*Quantization Parameters:* - -None - *Operation Function:* [source,c++] @@ -243,18 +235,11 @@ Elementwise negation operation |Argument|Type|Name|Shape|Description |Input|in_t*|input1|shape|Input tensor +|Attribute|in_t|input1_zp|-|Input 1 zero point. Must be zero for non-int8 types. +|Attribute|in_t|output_zp|-|Output zero point. Must be zero for non-int8 types. |Output|in_t*|output|shape|Output tensor of same type, size as the input tensor |=== -*Quantization Parameters:* - -|=== -|Argument|Type|Name|Shape|Description - -|Attribute|in_t|input1_zp|-|Input 1 zero point -|Attribute|in_t|output_zp|-|Output zero point -|=== - *Operation Function:* [source,c++] diff --git a/chapters/image.adoc b/chapters/image.adoc index b8789ff..2491ea5 100644 --- a/chapters/image.adoc +++ b/chapters/image.adoc @@ -45,10 +45,6 @@ from the strides. |Output|out_t*|output|[N,OH,OW,C]|Output tensor |=== -*Quantization Parameters:* - -None - *Operation Function* [source,c++] diff --git a/chapters/reduction.adoc b/chapters/reduction.adoc index c39fecf..b687896 100644 --- a/chapters/reduction.adoc +++ b/chapters/reduction.adoc @@ -148,10 +148,6 @@ Reduce a tensor along the given axis with a minimum operation |Output|in_t*|output|shape|Output tensor. Same rank as the input tensor. |=== -*Quantization Parameters:* - -Quantization is ignored when doing the REDUCE_MIN operation. The input and output must maintain the same parameters. - *Operation Function:* [source,c] diff --git a/chapters/scatter_gather.adoc b/chapters/scatter_gather.adoc index 6fedb45..63f30dc 100644 --- a/chapters/scatter_gather.adoc +++ b/chapters/scatter_gather.adoc @@ -24,10 +24,6 @@ N is the number of batches, W the number of indices in each batch, K the range o |Output|value_t*|output|[N,W,C]|3D output tensor |=== -*Quantization Parameters:* - -None - *Operation Function:* [source,c++] diff --git a/chapters/tensor_ops.adoc b/chapters/tensor_ops.adoc index 16b0341..0b78c8f 100644 --- a/chapters/tensor_ops.adoc +++ b/chapters/tensor_ops.adoc @@ -23,10 +23,6 @@ This returns the index with the largest value across the given axis of the input |Output|out_t*|output|shape|Output tensor, with rank = rank(shape1)-1 |=== -*Quantization Parameters:* - -None - *Operation Function:* [source,c++] @@ -82,18 +78,11 @@ When calculating the average, only the number of valid input tensor values, but |Attribute|int*|kernel|[2]|[kernel_y, kernel_x] |Attribute|int*|stride|[2]|[stride_y, stride_x] |Attribute|int*|pad|[4]|[pad_top, pad_bottom, pad_left, pad_right] +|Attribute|in_t|input_zp|-|Input tensor zero point. Must be zero for non-int8 types. +|Attribute|in_t|output_zp|-|Output tensor zero point. Must be zero for non-int8 types. |Output|in_t*|output|[N,H,W,C]|Output tensor 4D |=== -*Quantization Parameters:* - -|=== -|Argument|Type|Name|Shape|Description - -|Attribute|in_t|input_zp|-|Input tensor zero point -|Attribute|in_t|output_zp|-|Output tensor zero point -|=== - *Operation Function:* [source,c++] @@ -161,18 +150,11 @@ Performs a 2D convolution over the given tensor input, using the weight tensor. |Attribute|int*|pad|[4]|[pad_top, pad_bottom, pad_left, pad_right] |Attribute|int*|stride|[2]|[stride_y, stride_x] |Attribute|int*|dilation|[2]|[dilation_y, dilation_x] +|Attribute|in_t|input_zp|-|Input tensor zero point. Must be zero for non-int8 types. +|Attribute|weight_t|weight_zp|-|Weight zero point. Must be zero for non-int8 types. |Output|acc_t*|output|[N,H,W,OC]|Output tensor |=== -*Quantization Parameters:* - -|=== -|Argument|Type|Name|Shape|Description - -|Attribute|in_t|input_zp|-|Input tensor zero point -|Attribute|weight_t|weight_zp|-|Weight zero point -|=== - *Operation Function* [source,c++] @@ -227,18 +209,11 @@ Performs a 3D convolution over the given input tensor. |Attribute|int*|pad|[6]|[pad_d0, pad_d1, pad_top, pad_bottom, pad_left, pad_right] |Attribute|int*|stride|[3]|[stride_d, stride_y, stride_x] |Attribute|int*|dilation|[3]|[dilation_d, dilation_y, dilation_x] +|Attribute|in_t|input_zp|-|Input tensor zero point. Must be zero for non-int8 types. +|Attribute|weight_t|weight_zp|-|Weight zero point. Must be zero for non-int8 types. |Output|acc_t*|output|[N,D,H,W,OC]|Output tensor |=== -*Quantization Parameters:* - -|=== -|Argument|Type|Name|Shape|Description - -|Attribute|in_t|input_zp|-|Input tensor zero point -|Attribute|weight_t|weight_zp|-|Weight zero point -|=== - *Operation Function* [source,c++] @@ -296,18 +271,11 @@ Performs 2D convolutions separately over each channel of the given tensor input, |Attribute|int*|pad|[4]|[pad_top, pad_bottom, pad_left, pad_right] |Attribute|int*|stride|[2]|[stride_y, stride_x] |Attribute|int*|dilation|[2]|[dilation_y, dilation_x] +|Attribute|in_t|input_zp|-|Input tensor zero point. Must be zero for non-int8 types. +|Attribute|weight_t|weight_zp|-|Weight zero point. Must be zero for non-int8 types. |Output|acc_t*|output|[N,H,W,C*M]|Output tensor |=== -*Quantization Parameters:* - -|=== -|Argument|Type|Name|Shape|Description - -|Attribute|in_t|input_zp|-|Input tensor zero point -|Attribute|weight_t|weight_zp|-|Weight zero point -|=== - *Operation Function* [source,c++] @@ -359,18 +327,11 @@ Performs a fully connected network. |Input|in_t*|input|[N,IC]|Input tensor |Attribute|weight_t*|weight|[OC,IC]|Weights |Attribute|acc_t*|bias|[OC]|Per output channel bias data. +|Attribute|in_t|input_zp|-|Input tensor zero point. Must be zero for non-int8 types. +|Attribute|weight_t|weight_zp|-|Weight zero point. Must be zero for non-int8 types. |Output|acc_t*|output|[N,OC]|Output tensor |=== -*Quantization Parameters:* - -|=== -|Argument|Type|Name|Shape|Description - -|Attribute|in_t|input_zp|-|Input tensor zero point -|Attribute|weight_t|weight_zp|-|Weight zero point -|=== - *Operation Function* [source,c++] @@ -410,18 +371,11 @@ Performs two dimensional matrix multiplications. This allows both inputs to be a |Input|in_t*|A|[N,H,C]|Input tensor A, N matrices of size HxC |Input|in_t*|B|[N,C,W]|Input tensor B, N matrices of size CxW +|Attribute|in_t|A_zp|-|Input tensor A zero point. Must be zero for non-int8 types. +|Attribute|in_t|B_zp|-|Input tensor B zero point. Must be zero for non-int8 types. |Output|acc_t*|output|[N,H,W]|Output tensor, N matrices of size HxW |=== -*Quantization Parameters:* - -|=== -|Argument|Type|Name|Shape|Description - -|Attribute|in_t|A_zp|-|Input tensor A zero point -|Attribute|in_t|B_zp|-|Input tensor B zero point -|=== - *Operation Function* [source,c++] @@ -463,10 +417,6 @@ This performs a max pooling over the given input tensor. A sliding window of siz |Output|in_t*|output|[N,H,W,C]|Output tensor 4D |=== -*Quantization Parameters:* - -None - *Operation Function:* [source,c++] @@ -521,18 +471,11 @@ Performs a 2D transposed convolution over the given tensor input, using the weig |Attribute|int*|out_pad|[2]|[out_pad_top, out_pad_left] |Attribute|int*|stride|[2]|[stride_y, stride_x] |Attribute|int*|out_shape|[4]|[N,OH,OW,OC] +|Attribute|in_t|input_zp|-|Input tensor zero point. Must be zero for non-int8 types. +|Attribute|weight_t|weight_zp|-|Weight zero point. Must be zero for non-int8 types. |Output|acc_t*|output|[N,OH,OW,OC]|Output tensor |=== -*Quantization Parameters:* - -|=== -|Argument|Type|Name|Shape|Description - -|Attribute|in_t|input_zp|-|Input tensor zero point -|Attribute|weight_t|weight_zp|-|Weight zero point -|=== - *Operation Function* [source,c++] diff --git a/chapters/type_conversion.adoc b/chapters/type_conversion.adoc index b947b73..8619fc3 100644 --- a/chapters/type_conversion.adoc +++ b/chapters/type_conversion.adoc @@ -82,15 +82,8 @@ Rescale quantized values into a new domain. This function scales by factor: mult |Input|in_t*|input|shape|Input tensor from 1 to 4 dims |Output|out_t*|output|shape|Output tensor with the same shape as input -|=== - -*Quantization Parameters:* - -|=== -|Argument|Type|Name|Shape|Description - -|Attribute|in_t|input_zp|-|Input tensor zero point -|Attribute|out_t|output_zp|-|Output tensor zero point +|Attribute|in_t|input_zp|-|Input tensor zero point. Must be zero for non-int8 types. +|Attribute|out_t|output_zp|-|Output tensor zero point. Must be zero for non-int8 types. |Input (MT profile) Attribute (BI/MI profiles)|mul_t|multiplier[NC]|-|Scaling multiplier array |Input (MT profile) Attribute (BI/MI profiles)|uint6_t|shift[NC] |-|Scaling shift array |Attribute|bool_t|scale32|-|if (scale32) mul_t=int32_t else mul_t=int16_t |