MCPcopy Create free account
hub / github.com/AIS-SNU/Smart-Infinity / get_mean

Method get_mean

deepspeed/utils/timer.py:142–150  ·  view source on GitHub ↗

Get the mean of a group of timers.

(self, names, normalizer=1.0, reset=True)

Source from the content-addressed store, hash-verified

140 log_dist(string, ranks=ranks or [0])
141
142 def get_mean(self, names, normalizer=1.0, reset=True):
143 """Get the mean of a group of timers."""
144 assert normalizer > 0.0
145 means = {}
146 for name in names:
147 if name in self.timers:
148 elapsed_time = (self.timers[name].mean() * 1000.0 / normalizer)
149 means[name] = elapsed_time
150 return means
151
152
153class ThroughputTimer:

Callers 1

_autotuning_exitMethod · 0.80

Calls 1

meanMethod · 0.80

Tested by

no test coverage detected