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

Method start

deepspeed/utils/timer.py:49–58  ·  view source on GitHub ↗

Start the timer.

(self)

Source from the content-addressed store, hash-verified

47 self.end_time = 0.0
48
49 def start(self):
50 """Start the timer."""
51 assert not self.started_, f"{self.name_} timer has already been started"
52 if self.use_host_timer:
53 self.start_time = time.time()
54 else:
55 event_class = get_accelerator().Event
56 self.start_event = event_class(enable_timing=True)
57 self.start_event.record()
58 self.started_ = True
59
60 def stop(self, reset=False, record=False):
61 """Stop the timer."""

Callers 1

elapsedMethod · 0.95

Calls 1

get_acceleratorFunction · 0.90

Tested by

no test coverage detected