tensorflow/core/profiler/utils/group_events.cc
// Returns whether a root event needs grouping.
Returns whether a root event needs grouping.
Returns whether a root event needs grouping .
bool RootNeedsGrouping(const EventNode* root) {
  if (root->GetGroupId().has_value()) return false;
  const EventNode* root_parent = FindParentWithComparator(
      [root](const EventNode* parent) {
        return parent->RootLevel() == root->RootLevel();
      },
      root,
      false);
  return root_parent == nullptr;
}
bool RootNeedsGrouping ( const EventNode * root ) { if ( root -> GetGroupId ( ) . has_value ( ) ) return false ; const EventNode * root_parent = FindParentWithComparator ( [ root ] ( const EventNode * parent ) { return parent -> RootLevel ( ) == root -> RootLevel ( ) ; } , root , false ) ; return root_parent == nullptr ; }
Returns whether a root event needs grouping.
Returns whether a root event needs grouping .
// No grouping is needed if it is already grouped. // If there is a parent node with the same root level, skip grouping at <root> // and later apply grouping at the parent node. // If there is a parent node with a different root level, apply grouping at // <root>, and later apply grouping at the parent node. Root events with // different levels are grouped separately. /*include_self=*/