Skip to content

Commit 57173a0

Browse files
authored
[SYCL] Delegate to free function submit for graph enqueue (#18344)
Follow up PR is required to omit event creation for graph enqueue.
1 parent 03927ef commit 57173a0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

sycl/include/sycl/ext/oneapi/experimental/enqueue_functions.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -408,17 +408,17 @@ inline void partial_barrier(queue Q, const std::vector<event> &Events,
408408
CodeLoc);
409409
}
410410

411-
inline void execute_graph(queue Q, command_graph<graph_state::executable> &G,
412-
const sycl::detail::code_location &CodeLoc =
413-
sycl::detail::code_location::current()) {
414-
Q.ext_oneapi_graph(G, CodeLoc);
415-
}
416-
417411
inline void execute_graph(handler &CGH,
418412
command_graph<graph_state::executable> &G) {
419413
CGH.ext_oneapi_graph(G);
420414
}
421415

416+
inline void execute_graph(queue Q, command_graph<graph_state::executable> &G,
417+
const sycl::detail::code_location &CodeLoc =
418+
sycl::detail::code_location::current()) {
419+
submit(std::move(Q), [&](handler &CGH) { execute_graph(CGH, G); }, CodeLoc);
420+
}
421+
422422
} // namespace ext::oneapi::experimental
423423
} // namespace _V1
424424
} // namespace sycl

0 commit comments

Comments
 (0)