Skip to content

Commit f409eb7

Browse files
[NFC][SYCL][Graph] Drop unused (#19329)
1 parent 40b5467 commit f409eb7

File tree

2 files changed

+0
-65
lines changed

2 files changed

+0
-65
lines changed

sycl/source/detail/graph/graph_impl.cpp

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -342,40 +342,6 @@ graph_impl::~graph_impl() {
342342
}
343343
}
344344

345-
std::shared_ptr<node_impl> graph_impl::addNodesToExits(
346-
const std::list<std::shared_ptr<node_impl>> &NodeList) {
347-
// Find all input and output nodes from the node list
348-
std::vector<std::shared_ptr<node_impl>> Inputs;
349-
std::vector<std::shared_ptr<node_impl>> Outputs;
350-
for (auto &NodeImpl : NodeList) {
351-
if (NodeImpl->MPredecessors.size() == 0) {
352-
Inputs.push_back(NodeImpl);
353-
}
354-
if (NodeImpl->MSuccessors.size() == 0) {
355-
Outputs.push_back(NodeImpl);
356-
}
357-
}
358-
359-
// Find all exit nodes in the current graph and register the Inputs as
360-
// successors
361-
for (auto &NodeImpl : MNodeStorage) {
362-
if (NodeImpl->MSuccessors.size() == 0) {
363-
for (auto &Input : Inputs) {
364-
NodeImpl->registerSuccessor(Input);
365-
}
366-
}
367-
}
368-
369-
// Add all the new nodes to the node storage
370-
for (auto &Node : NodeList) {
371-
MNodeStorage.push_back(Node);
372-
addEventForNode(sycl::detail::event_impl::create_completed_host_event(),
373-
Node);
374-
}
375-
376-
return this->add(Outputs);
377-
}
378-
379345
void graph_impl::addRoot(const std::shared_ptr<node_impl> &Root) {
380346
MRoots.insert(Root);
381347
}
@@ -538,25 +504,6 @@ graph_impl::add(std::function<void(handler &)> CGF,
538504
return NodeImpl;
539505
}
540506

541-
std::shared_ptr<node_impl>
542-
graph_impl::add(const std::vector<sycl::detail::EventImplPtr> Events) {
543-
544-
std::vector<node_impl *> Deps;
545-
546-
// Add any nodes specified by event dependencies into the dependency list
547-
for (const auto &Dep : Events) {
548-
if (auto NodeImpl = MEventsMap.find(Dep); NodeImpl != MEventsMap.end()) {
549-
Deps.push_back(NodeImpl->second.get());
550-
} else {
551-
throw sycl::exception(sycl::make_error_code(errc::invalid),
552-
"Event dependency from handler::depends_on does "
553-
"not correspond to a node within the graph");
554-
}
555-
}
556-
557-
return this->add(Deps);
558-
}
559-
560507
std::shared_ptr<node_impl>
561508
graph_impl::add(node_type NodeType,
562509
std::shared_ptr<sycl::detail::CG> CommandGroup,

sycl/source/detail/graph/graph_impl.hpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,6 @@ class graph_impl : public std::enable_shared_from_this<graph_impl> {
163163
/// @return Created node in the graph.
164164
std::shared_ptr<node_impl> add(nodes_range Deps);
165165

166-
/// Create an empty node in the graph.
167-
/// @param Events List of events associated to this node.
168-
/// @return Created node in the graph.
169-
std::shared_ptr<node_impl>
170-
add(const std::vector<sycl::detail::EventImplPtr> Events);
171-
172166
/// Create a dynamic command-group node in the graph.
173167
/// @param DynCGImpl Dynamic command-group used to create node.
174168
/// @param Deps List of predecessor nodes.
@@ -531,12 +525,6 @@ class graph_impl : public std::enable_shared_from_this<graph_impl> {
531525
/// @param Root Node to add to list of root nodes.
532526
void addRoot(const std::shared_ptr<node_impl> &Root);
533527

534-
/// Adds nodes to the exit nodes of this graph.
535-
/// @param NodeList List of nodes from sub-graph in schedule order.
536-
/// @return An empty node is used to schedule dependencies on this sub-graph.
537-
std::shared_ptr<node_impl>
538-
addNodesToExits(const std::list<std::shared_ptr<node_impl>> &NodeList);
539-
540528
/// Adds dependencies for a new node, if it has no deps it will be
541529
/// added as a root node.
542530
/// @param Node The node to add deps for

0 commit comments

Comments
 (0)