Skip to content

Commit

Permalink
Fix namespace in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Bensuo committed Aug 1, 2024
1 parent dd037d1 commit a48dfc4
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions sycl/doc/SYCLGraphUsageGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ placed into a `host-task` node which the kernel (or other operation) depends on,
like so:

```c++
Graph.begin_recording(Queue);

sycl::event HostWorkEvent = Queue.submit([&](sycl::handler& CGH){
CGH.host_task([=](){
do_some_host_work();
Expand All @@ -60,6 +62,8 @@ Queue.submit([&](sycl::handler& CGH){
CGH.depends_on(HostWorkEvent);
CGH.parallel_for(...);
});

Graph.end_recording(Queue);
```

### Graph Execution Concurrency
Expand All @@ -73,7 +77,9 @@ synchronization. Consider this example (it uses whole graph update for
simplicity):

```c++
sycl::command_graph<graph_state::executable> ExecutableGraph
namespace sycl_ext = sycl::ext::oneapi::experimental;

sycl_ext::command_graph<graph_state::executable> ExecutableGraph
= ModifiableGraph.finalize();

Queue.ext_oneapi_graph(ExecutableGraph);
Expand All @@ -92,9 +98,11 @@ accessing the same `sycl::buffer`) for updating, and potentially increasing
device occupancy (if the device supports it). Modifying the example from above:
```c++
sycl::command_graph<graph_state::executable> ExecutableGraph
namespace sycl_ext = sycl::ext::oneapi::experimental;
sycl_ext::command_graph<graph_state::executable> ExecutableGraph
= ModifiableGraph.finalize();
sycl::command_graph<graph_state::executable> ExecutableGraphOtherParams
sycl_ext::command_graph<graph_state::executable> ExecutableGraphOtherParams
= ModifiableGraphWithNewParams.finalize();
Queue.ext_oneapi_graph(ExecutableGraph);
Expand Down

0 comments on commit a48dfc4

Please sign in to comment.