diff --git a/sycl/source/detail/graph_impl.hpp b/sycl/source/detail/graph_impl.hpp index 75426bd821ee2..3234721626a10 100644 --- a/sycl/source/detail/graph_impl.hpp +++ b/sycl/source/detail/graph_impl.hpp @@ -1486,7 +1486,8 @@ class exec_graph_impl { class dynamic_parameter_impl { public: dynamic_parameter_impl(std::shared_ptr GraphImpl) - : MGraph(GraphImpl) {} + : MGraph(GraphImpl), + MID(NextAvailableID.fetch_add(1, std::memory_order_relaxed)) {} dynamic_parameter_impl(std::shared_ptr GraphImpl, size_t ParamSize, const void *Data)