From 079a0429e45da453f42dd511a12b796e6ea3d20d Mon Sep 17 00:00:00 2001 From: Maxime France-Pillois Date: Fri, 4 Aug 2023 10:22:55 +0100 Subject: [PATCH] [SYCL][Graph] Makes command graph functions thread-safe Adds comments --- sycl/source/detail/graph_impl.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sycl/source/detail/graph_impl.hpp b/sycl/source/detail/graph_impl.hpp index 24b3774191952..1ed295ee55dc5 100644 --- a/sycl/source/detail/graph_impl.hpp +++ b/sycl/source/detail/graph_impl.hpp @@ -772,6 +772,10 @@ class exec_graph_impl { std::list> MSchedule; /// Pointer to the modifiable graph impl associated with this executable /// graph. + /// Thread-safe implementation note: in the current implementation + /// multiple exec_graph_impl can reference the same graph_impl object. + /// This specificity must be taken into account when trying to lock + /// the graph_impl mutex from an exec_graph_impl to avoid deadlock. std::shared_ptr MGraphImpl; /// Map of devices to command buffers. std::unordered_map