diff --git a/sycl/source/handler.cpp b/sycl/source/handler.cpp index 6438c1f4366c7..aa8e8900b171c 100644 --- a/sycl/source/handler.cpp +++ b/sycl/source/handler.cpp @@ -389,20 +389,6 @@ event handler::finalize() { GraphImpl = QueueGraph; } - if (GraphImpl) { - auto EventImpl = std::make_shared(); - - // Extract relevant data from the handler and pass to graph to create a - // new node representing this command group. - std::shared_ptr NodeImpl = - GraphImpl->add(CGData.MEvents); - - // Associate an event with this new node and return the event. - GraphImpl->add_event_for_node(EventImpl, NodeImpl); - - return detail::createSyclObjFromImpl(EventImpl); - } - detail::EventImplPtr Event = std::make_shared(); MLastEvent = detail::createSyclObjFromImpl(Event); return MLastEvent;