MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / VisitNodes

Method VisitNodes

tensorflow/compiler/xla/service/call_graph.cc:337–354  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

335}
336
337Status CallGraph::VisitNodes(const VisitorFunction& visitor_func,
338 bool visit_unreachable_nodes) const {
339 absl::flat_hash_set<const CallGraphNode*> visited;
340 if (visit_unreachable_nodes) {
341 // Traverse from all roots in the call graph.
342 for (const CallGraphNode& node : nodes()) {
343 if (node.callers().empty()) {
344 TF_RETURN_IF_ERROR(VisitNodesInternal(visitor_func, node, &visited));
345 }
346 }
347 } else {
348 // Traverse only from the entry computation.
349 TF_RETURN_IF_ERROR(VisitNodesInternal(
350 visitor_func, GetNode(module_->entry_computation()), &visited));
351 }
352
353 return Status::OK();
354}
355
356bool CallGraph::IsFlattened() const {
357 for (const CallGraphNode& node : nodes_) {

Callers 7

RunMethod · 0.80
TEST_FFunction · 0.80
RunMethod · 0.80
RunMethod · 0.80
RunMethod · 0.80
RunMethod · 0.80

Calls 2

entry_computationMethod · 0.80
emptyMethod · 0.45

Tested by 1

TEST_FFunction · 0.64