tensorflow/compiler/jit/deadness_analysis.cc
// If the node is inside some frames, get the name of the outermost non-empty
// frame.  Otherwise, get an empty frame name.
If the node is inside some frames, get the name of the outermost non-empty
frame.  Otherwise, get an empty frame name.
If the node is inside some frames get the name of the outermost non - empty frame . Otherwise get an empty frame name .
Status GetRootFrame(const Node* n, absl::Span<const ControlFlowInfo> cfi_infos,
                    absl::string_view* frame) {
  int depth = 0;
  const ControlFlowInfo* cfi_iter = &cfi_infos[n->id()];
  while (!cfi_iter->parent_frame->IsSource()) {
    n = cfi_iter->parent_frame;
    cfi_iter = &cfi_infos[n->id()];
    if (depth++ > 5000) {
      return errors::Internal(
          "Frame of depth > 5000:  Probably malformed graph or a bug in "
          "BuildControlFlowInfo");
    }
  }
  *frame = cfi_iter->frame_name;
  return Status::OK();
}
Status GetRootFrame ( const Node * n , absl :: Span < const ControlFlowInfo > cfi_infos , absl :: string_view * frame ) { int depth = 0 ; const ControlFlowInfo * cfi_iter = & cfi_infos [ n -> id ( ) ] ; while ( ! cfi_iter -> parent_frame -> IsSource ( ) ) { n = cfi_iter -> parent_frame ; cfi_iter = & cfi_infos [ n -> id ( ) ] ; if ( depth ++ > 5000 ) { return errors :: Internal ( " " " " ) ; } } * frame = cfi_iter -> frame_name ; return Status :: OK ( ) ; }
If the node is inside some frames, get the name of the outermost non-empty
frame.
If the node is inside some frames get the name of the outermost non - empty frame .