From 1b79ebcf7e0140fe05b8ead8cd15ddd043d88e33 Mon Sep 17 00:00:00 2001 From: Ben Tracy Date: Tue, 4 Jul 2023 16:28:23 +0100 Subject: [PATCH] [SYCL] Update wording around updating kernel/host code - Make modifying kernel or host code in update undefined behaviour. --- .../proposed/sycl_ext_oneapi_graph.asciidoc | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/sycl/doc/extensions/proposed/sycl_ext_oneapi_graph.asciidoc b/sycl/doc/extensions/proposed/sycl_ext_oneapi_graph.asciidoc index 2a4f65fe975f3..cc46261fcfc85 100644 --- a/sycl/doc/extensions/proposed/sycl_ext_oneapi_graph.asciidoc +++ b/sycl/doc/extensions/proposed/sycl_ext_oneapi_graph.asciidoc @@ -863,6 +863,8 @@ void update(const command_graph& graph); ---- +:sycl-kernel-function: https://registry.khronos.org/SYCL/specs/sycl-2020/html/sycl-2020.html#sycl-kernel-function + |Updates the executable graph node inputs & outputs from a topologically identical modifiable graph. A topologically identical graph is one with the same structure of nodes and edges, and the nodes added in the same order to @@ -872,17 +874,16 @@ to update an executable graph, every node in the graph must be either a kernel command or a host-task. The only characteristics that can differ between two topologically identical -graphs during an update are: +graphs during an update are the arguments to kernel nodes. For example, +the graph may capture different values for the USM pointers or accessors used +in the graph. It is these kernels arguments in `graph` that constitute the +inputs & outputs to update to. -* The arguments to kernel nodes may be different between graphs. For example, - the graph may capture different values for the USM pointers or accessors used - in the graph. It is these kernels arguments in `graph` that constitute the - inputs & outputs to update to. +Differences in the following characteristics between two graphs during an +update results in undefined behaviour: -* The code that is executed in host-task nodes may be different between graphs, - and the update will reflect the code from `graph` host-tasks nodes. However, - any changes to executable code between kernel nodes are not counted as - topologically identical and is an exception with error code `invalid`. +* Modifying the native C++ callable of a host_task node. +* Modifying the {sycl-kernel-function}[kernel function] of a kernel node. The effects of the update will be visible on the next submission of the executable graph without the need for additional user synchronization.