@@ -404,7 +404,9 @@ std::shared_ptr<node_impl> graph_impl::addNodesToExits(
404404 // Add all the new nodes to the node storage
405405 for (auto &Node : NodeList) {
406406 MNodeStorage.push_back (Node);
407- addEventForNode (std::make_shared<sycl::detail::event_impl>(), Node);
407+ addEventForNode (std::make_shared<sycl::detail::event_impl>(
408+ sycl::detail::event_impl::HES_Complete),
409+ Node);
408410 }
409411
410412 return this ->add (Outputs);
@@ -494,7 +496,9 @@ graph_impl::add(std::vector<std::shared_ptr<node_impl>> &Deps) {
494496
495497 addDepsToNode (NodeImpl, Deps);
496498 // Add an event associated with this explicit node for mixed usage
497- addEventForNode (std::make_shared<sycl::detail::event_impl>(), NodeImpl);
499+ addEventForNode (std::make_shared<sycl::detail::event_impl>(
500+ sycl::detail::event_impl::HES_Complete),
501+ NodeImpl);
498502 return NodeImpl;
499503}
500504
@@ -552,7 +556,9 @@ graph_impl::add(std::function<void(handler &)> CGF,
552556 this ->add (NodeType, std::move (Handler.impl ->MGraphNodeCG ), Deps);
553557
554558 // Add an event associated with this explicit node for mixed usage
555- addEventForNode (std::make_shared<sycl::detail::event_impl>(), NodeImpl);
559+ addEventForNode (std::make_shared<sycl::detail::event_impl>(
560+ sycl::detail::event_impl::HES_Complete),
561+ NodeImpl);
556562
557563 // Retrieve any dynamic parameters which have been registered in the CGF and
558564 // register the actual nodes with them.
@@ -651,7 +657,9 @@ graph_impl::add(std::shared_ptr<dynamic_command_group_impl> &DynCGImpl,
651657 add (NodeType, ActiveKernel, Deps);
652658
653659 // Add an event associated with this explicit node for mixed usage
654- addEventForNode (std::make_shared<sycl::detail::event_impl>(), NodeImpl);
660+ addEventForNode (std::make_shared<sycl::detail::event_impl>(
661+ sycl::detail::event_impl::HES_Complete),
662+ NodeImpl);
655663
656664 // Track the dynamic command-group used inside the node object
657665 DynCGImpl->MNodes .push_back (NodeImpl);
@@ -897,7 +905,7 @@ exec_graph_impl::enqueueNode(ur_exp_command_buffer_handle_t CommandBuffer,
897905
898906 sycl::detail::EventImplPtr Event =
899907 sycl::detail::Scheduler::getInstance ().addCG (
900- Node->getCGCopy (), MQueueImpl,
908+ Node->getCGCopy (), * MQueueImpl,
901909 /* EventNeeded=*/ true , CommandBuffer, Deps);
902910
903911 if (MIsUpdatable) {
@@ -1037,8 +1045,7 @@ exec_graph_impl::enqueue(sycl::detail::queue_impl &Queue,
10371045 PartitionsExecutionEvents;
10381046
10391047 auto CreateNewEvent ([&]() {
1040- auto NewEvent =
1041- std::make_shared<sycl::detail::event_impl>(Queue.shared_from_this ());
1048+ auto NewEvent = std::make_shared<sycl::detail::event_impl>(Queue);
10421049 NewEvent->setContextImpl (Queue.getContextImplPtr ());
10431050 NewEvent->setStateIncomplete ();
10441051 return NewEvent;
@@ -1122,7 +1129,7 @@ exec_graph_impl::enqueue(sycl::detail::queue_impl &Queue,
11221129 CommandBuffer, nullptr , std::move (CGData));
11231130
11241131 NewEvent = sycl::detail::Scheduler::getInstance ().addCG (
1125- std::move (CommandGroup), Queue. shared_from_this () ,
1132+ std::move (CommandGroup), Queue,
11261133 /* EventNeeded=*/ true );
11271134 }
11281135 NewEvent->setEventFromSubmittedExecCommandBuffer (true );
@@ -1142,7 +1149,7 @@ exec_graph_impl::enqueue(sycl::detail::queue_impl &Queue,
11421149 .MQueue = Queue.shared_from_this ();
11431150
11441151 NewEvent = sycl::detail::Scheduler::getInstance ().addCG (
1145- NodeImpl->getCGCopy (), Queue. shared_from_this () ,
1152+ NodeImpl->getCGCopy (), Queue,
11461153 /* EventNeeded=*/ true );
11471154 }
11481155 PartitionsExecutionEvents[CurrentPartition] = NewEvent;
@@ -1424,7 +1431,7 @@ void exec_graph_impl::update(
14241431 // other scheduler commands
14251432 auto UpdateEvent =
14261433 sycl::detail::Scheduler::getInstance ().addCommandGraphUpdate (
1427- this , Nodes, MQueueImpl, std::move (UpdateRequirements),
1434+ this , Nodes, MQueueImpl. get () , std::move (UpdateRequirements),
14281435 MExecutionEvents);
14291436
14301437 MExecutionEvents.push_back (UpdateEvent);
0 commit comments