class_docstr: Group of timers.
class_docstr_tok: ["Group","of","timers","."]
docstr: Report times across all ranks.
docstr_tok: ["Report","times","across","all","ranks","."]
code: def _get_all_ranks_time_string(
      self, names, reset, barrier, normalizer
  ):
      """Report times across all ranks."""
      rank_name_to_time = self._get_elapsed_time_all_ranks(
          names, reset, barrier
      )
  
      output_string = "times across ranks (ms):"
      no_reported_timing = True
      for i, name in enumerate(names):
          not_yet_found = True
          for rank in range(torch.distributed.get_world_size()):
              if rank_name_to_time[rank, i] > 0:
                  no_reported_timing = False
                  if not_yet_found:
                      not_yet_found = False
                      output_string += "\n  {}:".format(name)
                  output_string += "\n     rank {:2d}: {:.2f}".format(
                      rank, rank_name_to_time[rank, i] / normalizer
                  )
      if no_reported_timing:
          return None
      return output_string
  
imports: from abc import ABC
  from abc import abstractmethod
  import time
  import torch
label_desc: Use image node_id 6 for calling the Timers obj's underlying member method code with example usage: obj._get_all_ranks_time_string(names, reset, barrier, normalizer) and returns: output_string, None