aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Petit <kevin.petit@arm.com>2023-05-17 14:00:57 +0100
committerKevin Petit <kevin.petit@arm.com>2023-05-22 10:17:07 +0100
commitb351aea93d369cfc082f2db0df6ac181d3821908 (patch)
tree0edf300c0ebe71666bfcc980379db642154e84e7
parenta79255f064b88203ae5ad188270bdb335190f759 (diff)
downloadspecification-b351aea93d369cfc082f2db0df6ac181d3821908.tar.gz
Start introducing concepts to better describe the execution model
Signed-off-by: Kevin Petit <kevin.petit@arm.com> Change-Id: I75753adecd50b68e1184ab8aa59fd4c8c3638a1a
-rw-r--r--chapters/operators.adoc11
1 files changed, 8 insertions, 3 deletions
diff --git a/chapters/operators.adoc b/chapters/operators.adoc
index d6d1f13..897ff17 100644
--- a/chapters/operators.adoc
+++ b/chapters/operators.adoc
@@ -41,11 +41,16 @@ Similarly the type tensor_list_t will be used for a list of tensors and the foll
shape_list_t tensor_list_shape(tosa_list_t tensor_list);
----
-The following function denotes the execution of a TOSA graph, on an input tensor list to produce an output tensor list.
+The following function denotes the execution of a TOSA graph within a TOSA context,
+on an input tensor list to produce an output tensor list. A TOSA context, represented
+by `tosa_context_t` provides the environment in which a TOSA graph is executed.
+Any side-effects that result from the execution of a graph within a context are not
+observable by graphs executing in a different context. Operators are executed in an
+implementation-defined order that must be a topological ordering of the TOSA graph.
[source,c++]
----
-tosa_execute_graph(tosa_graph_t graph, tosa_list_t input_list, tosa_list_t output_list, tosa_level_t level) {
+tosa_execute_graph(tosa_context_t context, tosa_graph_t graph, tosa_list_t input_list, tosa_list_t output_list, tosa_level_t level) {
ERROR_IF(tensor_list_shape(input_list) != tosa_input_shape(graph));
ERROR_IF(tensor_list_shape(output_list) != tosa_output_shape(graph));
for_each(operator in graph order) {
@@ -54,7 +59,7 @@ tosa_execute_graph(tosa_graph_t graph, tosa_list_t input_list, tosa_list_t outpu
ERROR_IF(operator output tensors do not meet requirement of operator Arguments outputs)
ERROR_IF(operator data types do not meet requirement of operator Supported Data Types)
// Execute the operator as defined by the operation function pseduo-code
- tosa_execute_operator(operator, level);
+ tosa_execute_operator(context, operator, level);
}
}
----