From a22eb4463bc395e6da9c5c00b2d320430231802c Mon Sep 17 00:00:00 2001 From: Pablo Reble Date: Thu, 18 Jan 2024 16:44:46 -0600 Subject: [PATCH] [SYCL][Graph] Add graph query function --- .../sycl_ext_oneapi_graph.asciidoc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/sycl/doc/extensions/experimental/sycl_ext_oneapi_graph.asciidoc b/sycl/doc/extensions/experimental/sycl_ext_oneapi_graph.asciidoc index 4ed2abdf0e880..484f12f77415f 100644 --- a/sycl/doc/extensions/experimental/sycl_ext_oneapi_graph.asciidoc +++ b/sycl/doc/extensions/experimental/sycl_ext_oneapi_graph.asciidoc @@ -411,6 +411,9 @@ public: ext::oneapi::experimental::queue_state ext_oneapi_get_state() const; + ext::oneapi::experimental::command_graph + ext_oneapi_get_graph(); + /* -- graph convenience shortcuts -- */ event ext_oneapi_graph(command_graph& graph); @@ -1019,6 +1022,22 @@ Returns: If the queue is in the default state where commands are scheduled immediately for execution, `queue_state::executing` is returned. Otherwise, `queue_state::recording` is returned where commands are redirected to a `command_graph` object. +| +[source,c++] +---- +command_graph +queue::ext_oneapi_get_graph(); +---- + +| Query the underlying command graph of a queue when recording. + +Returns: A copy of the graph object, the queue is recording commands into. + +Exceptions: + +* Throws synchronously with error code `invalid` if the queue is not in `queue_state::recording` +state. + | [source,c++] ----