class_docstr: Group of timers. Borrowed from Nvidia Megatron code
class_docstr_tok: ["Group","of","timers",".","Borrowed","from","Nvidia","Megatron","code"]
docstr: Log a group of timers.
docstr_tok: ["Log","a","group","of","timers","."]
code: def log(
      self,
      names,
      normalizer=1.0,
      reset=True,
      memory_breakdown=False,
      ranks=None,
  ):
      """Log a group of timers."""
      assert normalizer > 0.0
      string = f"time (ms)"
      for name in names:
          if name in self.timers:
              elapsed_time = (
                  self.timers[name].elapsed(reset=reset) / normalizer
              )
              string += " | {}: {:.2f}".format(name, elapsed_time)
  
      log_dist(string, ranks=ranks or [0])
  
imports: import time
  from numpy import mean
  from deepspeed.utils.logging import log_dist
  from deepspeed.accelerator import get_accelerator
label_desc: Use image node_id 5 for calling the SynchronizedWallClockTimer obj's underlying member method code with example usage: obj.log(names, normalizer, reset, memory_breakdown, ranks) without return types