Skip to content

Does sycl have a feature like cudaStreamBeginCapture to create graph dependency automatically when using taskflow? #12950

Answered by EwanC
mazhaojia123 asked this question in Q&A
Discussion options

You must be logged in to vote

Hello, thanks for the question. The sycl_ext_oneapi_graph extension to DPC++ should provide an equivalent feature using code like:

namespace sycl_ext = sycl::ext::oneapi::experimental;

sycl::queue q;
sycl_ext::command_graph graph(q);

graph.begin_recording(q); // equivalent to cudaStreamBeginCapture

// queue submissions recorded here, equivalent to `kernel()`
// e.g. q.submit(/*kernel*/);

graph.end_recording(); // equivalent to cudaStreamEndCapture

auto exec_graph = graph.finalize(); // equivalent to cudaGraphInstantiate

sycl_ext_oneapi_graph supports the CUDA SYCL backend by using CUDA-Graph in the implementation, so you will be able to use an NVIDIA GPU with the extension. I can't c…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@EwanC
Comment options

Answer selected by mazhaojia123
@mazhaojia123
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants