MCPcopy Create free account
hub / github.com/deepspeedai/DeepSpeed / start

Method start

deepspeed/utils/timer.py:60–69  ·  view source on GitHub ↗

Start the timer.

(self)

Source from the content-addressed store, hash-verified

58 self.end_time = 0.0
59
60 def start(self):
61 """Start the timer."""
62 assert not self.started_, f"{self.name_} timer has already been started"
63 if self.use_host_timer:
64 self.start_time = time.time()
65 else:
66 event_class = get_accelerator().Event
67 self.start_event = event_class(enable_timing=True)
68 self.start_event.record()
69 self.started_ = True
70
71 def stop(self, reset=False, record=False):
72 """Stop the timer."""

Callers

nothing calls this directly

Calls 2

get_acceleratorFunction · 0.90
recordMethod · 0.45

Tested by

no test coverage detected