aboutsummaryrefslogtreecommitdiff
path: root/chapters/tensor_ops.adoc
diff options
context:
space:
mode:
authorEric Kunze <eric.kunze@arm.com>2021-09-28 16:15:42 -0700
committerEric Kunze <eric.kunze@arm.com>2021-10-04 16:22:33 -0700
commitb6335b827cc58cd6776fe77907d5dfada6d4d93b (patch)
tree642fb4bd351bda570499bd0749195e1f8521c8de /chapters/tensor_ops.adoc
parentc949f8a3a554728ccb6ce0ee0992fde382160cda (diff)
downloadspecification-b6335b827cc58cd6776fe77907d5dfada6d4d93b.tar.gz
Move quantization parameters into argument tables
The TOSA specification doesn't have quantized types. Without those types, it is cleaner to move effects of quantization such as the zero points into the standard list of arguments, rather than existing as a separate table. Change-Id: I18ea2959e9d3e4a3e9a0ead7a8ca319bb4426a47
Diffstat (limited to 'chapters/tensor_ops.adoc')
-rw-r--r--chapters/tensor_ops.adoc85
1 files changed, 14 insertions, 71 deletions
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++]