@@ -206,7 +206,7 @@ Table {counter: tableNumber}. Values of the `SYCL_EXT_ONEAPI_GRAPH` macro.
206
206
|1 |Initial extension version. Base features are supported.
207
207
|===
208
208
209
- === SYCL Graph Terminology
209
+ === SYCL Graph Terminology [[terminology]]
210
210
211
211
Table {counter: tableNumber}. Terminology.
212
212
[%header,cols="1,3"]
@@ -776,34 +776,37 @@ conditions:
776
776
777
777
* Both graphs must have been created with the same device and context.
778
778
* Both graphs must be topologically identical. The graphs are considered
779
- topologically identical when:
780
-
781
- ** Both graphs have the same number of nodes and edges.
782
- ** Where edges are specified through the `depends_on` property or through event
783
- dependencies in recorded queue submisions, these must be specified in the same
784
- order.
785
- ** Nodes with dependencies on events outside of the graph must have the same
786
- number of these dependencies.
787
- ** A kernel node's command function must have the same type in both graphs,
788
- whether that be a lambda function, function object or otherwise.
789
- ** When creating both graphs all graph-related API calls or operations which
790
- modify the structure of the graph must have been done in the same order, these
791
- are:
792
-
793
- *** Explicit API calls to add nodes to the graph or calls to `make_edge()`.
794
- *** Nodes added to a graph via recorded queue submissions.
779
+ topologically identical when:
780
+
781
+ ** Both graphs must have the same number of nodes and edges.
782
+ ** Internal edges must be between corresponding nodes in each graph.
783
+ ** Nodes must be added in the same order in the two graphs. Nodes may be added
784
+ via `command_graph::add`, or for a recorded queue via `queue::submit` or
785
+ queue shortcut functions.
786
+ ** Corresponding nodes in each graph must be kernels that have the same type:
787
+
788
+ *** When the kernel is defined as a lambda, the lambda must be the same.
789
+ *** When the kernel is defined as a named function object, the kernel class
790
+ must be the same.
791
+ *** When the kernel is defined as a plain function, the function must be the
792
+ same.
793
+
794
+ ** Edge dependencies for each node in the two graphs must be created in the
795
+ same order and using the same API mechanism to create each edge. See
796
+ the <<terminology, terminology section>> for an exhaustive definition of
797
+ how edges are defined in a graph for each of the two graph construction
798
+ APIs.
795
799
796
800
Attempting to use whole-graph update with source or target graphs which do not
797
- satisfy these conditions results in undefined behaviour as it may prevent the
798
- runtime from pairing nodes in the source and target graphs.
801
+ satisfy the conditions of topological identity results in undefined behaviour,
802
+ as it may prevent the runtime from pairing nodes in the source and target
803
+ graphs.
799
804
800
805
It is valid to use nodes that contain dynamic parameters in whole graph updates.
801
806
If a node containing a dynamic parameter is updated through the whole graph
802
807
update API, then any previous updates to the dynamic parameter will be reflected
803
808
in the new graph.
804
809
805
- :sycl-kernel-function: https://registry.khronos.org/SYCL/specs/sycl-2020/html/sycl-2020.html#sycl-kernel-function
806
-
807
810
==== Graph Properties [[graph-properties]]
808
811
809
812
===== No-Cycle-Check Property
@@ -1228,7 +1231,7 @@ The characteristics in the executable graph which will be updated are detailed
1228
1231
in the section on <<executable-graph-update, Executable Graph Update>>.
1229
1232
1230
1233
It is not an error to update an executable graph such that all parameters of
1231
- nodes in `graph ` are identical to the arguments of the executable graph prior to
1234
+ nodes in `source ` are identical to the arguments of the executable graph prior to
1232
1235
the update.
1233
1236
1234
1237
The implementation may perform a blocking wait during this call on
@@ -1248,22 +1251,13 @@ Parameters:
1248
1251
1249
1252
Exceptions:
1250
1253
1251
- * Throws synchronously with error code `invalid` if the topology of
1252
- `source` is not the same as the target graph topology in the following ways:
1253
-
1254
- ** The number of nodes in the graph does not match.
1255
- ** The number of edges between nodes does not match.
1256
- ** Any node in `source` has a dependency which does not matched the paired node
1257
- in the target graph.
1258
-
1259
1254
* Throws synchronously with error code `invalid` if `source` contains any node
1260
- which is not of the following `node_type`s :
1255
+ which is not one of the following types :
1261
1256
1262
- ** `node_type::empty`
1257
+ ** `node_type::empty`
1263
1258
** `node_type::ext_oneapi_barrier`
1264
1259
** `node_type::kernel`
1265
1260
1266
-
1267
1261
* Throws synchronously with error code `invalid` if the context or device
1268
1262
associated with `source` does not match that of the `command_graph` being
1269
1263
updated.
0 commit comments