MCPcopy
hub / github.com/deepspeedai/DeepSpeedExamples / stop

Method stop

Megatron-LM/utils.py:86–91  ·  view source on GitHub ↗

Stop the timer.

(self)

Source from the content-addressed store, hash-verified

84 self.started_ = True
85
86 def stop(self):
87 """Stop the timer."""
88 assert self.started_, 'timer is not started'
89 torch.cuda.synchronize()
90 self.elapsed_ += (time.time() - self.start_time)
91 self.started_ = False
92
93 def reset(self):
94 """Reset timer."""

Callers 10

elapsedMethod · 0.95
get_batchFunction · 0.45
forward_stepFunction · 0.45
train_stepFunction · 0.45
get_batchFunction · 0.45
forward_stepFunction · 0.45
backward_stepFunction · 0.45
train_stepFunction · 0.45
get_batchFunction · 0.45
forward_stepFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected