aboutsummaryrefslogtreecommitdiff
path: root/chapters/operators.adoc
diff options
context:
space:
mode:
Diffstat (limited to 'chapters/operators.adoc')
-rw-r--r--chapters/operators.adoc21
1 files changed, 15 insertions, 6 deletions
diff --git a/chapters/operators.adoc b/chapters/operators.adoc
index 897ff17..3a4c831 100644
--- a/chapters/operators.adoc
+++ b/chapters/operators.adoc
@@ -9,14 +9,23 @@
== Operators
-=== Operator Parameters
+=== Operator Arguments
-An operator processes input operands to produce output operands. An operator can have three types of parameters:
+Operators process input arguments to produce output arguments.
+Their behavior can be configured using attribute arguments.
+Arguments may have one of the following types:
-* An input operand. This must be a tensor or a list of tensors and data is read by the operation.
-* An output operand. This must be a tensor or a list of tensors and data is written by the operation.
-* An attribute. This is a parameter that is constant for a particular instance of the operator. It may have any data type supported by TOSA. It is expected to be set at compile time.
+* `tensor_t<element_type>`, abbreviated `T<element_type>`, represents a tensor whose elements are of type `element_type` where `element_type` can be any of the data types supported in TOSA.
+* `tensor_list_t` represents a list of tensors. When lists are homogeneous, i.e. contain tensors of the same type, their type is further qualified as follows: `tensor_list_t<T<element_type>>`.
+* `tosa_graph_t` represents a TOSA graph (see <<operator-graphs>>).
+Arguments belong to one of three categories: Input, Output, or Attribute. The category to which an argument belongs further constrains its type:
+
+* An Input argument must be a tensor or a list of tensors used to provide the data read by the operation.
+* An Output argument must be a tensor or a list of tensors into which the data produced by the operation is written.
+* An Attribute argument is constant, i.e. its value is known at compilation time. It may have any data type supported by TOSA.
+
+[[operator-graphs]]
=== Operator Graphs
A TOSA graph is a collection of TOSA operators where:
@@ -27,7 +36,7 @@ A TOSA graph is a collection of TOSA operators where:
* The attributes must be in the valid range permitted for the operator
* The tensor dimensions must be in the valid range permitted for the operator
-Some operators, such as control flow operators, take a graph of other operators as an attribute. The type tosa_graph_t will denote a graph of operators and the following functions define the tensor shape list for the graph input and outputs:
+Some operators, such as control flow operators, take a graph of other operators as an attribute. The type `tosa_graph_t` will denote a graph of operators and the following functions define the tensor shape list for the graph input and outputs:
[source,c++]
----