Skip to content

Commit

Permalink
[SYCL][Graph] Add wording about arbitrary C++ code in CGFs
Browse files Browse the repository at this point in the history
  • Loading branch information
Bensuo committed May 6, 2024
1 parent c7e4670 commit f94848f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions sycl/doc/extensions/experimental/sycl_ext_oneapi_graph.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -1593,6 +1593,19 @@ As a result, users don't need to manually wrap queue recording code in a
back to the executing state. Instead, an uncaught exception destroying the
modifiable graph will perform this action, useful in RAII pattern usage.

=== Command-Group Function Limitations

While not disallowed by the SYCL specification it should be noted that it is not
possible to capture arbitrary C++ code which is inside a CGF (Command-Group
Function) used to create a graph node. This code will be evaluated once during
the call to `queue::submit()` or `command_graph::add()` along with the calls to
handler functions and this will not be reflected on future executions of the
graph.

Any code like this should be moved to a separate host-task and added to the
graph via the recording or explicit APIs in order to be compatible with this
extension.

=== Host Tasks

:host-task: https://registry.khronos.org/SYCL/specs/sycl-2020/html/sycl-2020.html#subsec:interfaces.hosttasks
Expand Down

0 comments on commit f94848f

Please sign in to comment.