MCPcopy Create free account
hub / github.com/THUDM/GLM / stop

Method stop

utils.py:132–137  ·  view source on GitHub ↗

Stop the timer.

(self)

Source from the content-addressed store, hash-verified

130 self.started_ = True
131
132 def stop(self):
133 """Stop the timer."""
134 assert self.started_, 'timer is not started'
135 torch.cuda.synchronize()
136 self.elapsed_ += (time.time() - self.start_time)
137 self.started_ = False
138
139 def reset(self):
140 """Reset timer."""

Callers 8

elapsedMethod · 0.95
finetune_forward_stepFunction · 0.80
finetuneFunction · 0.80
forward_stepFunction · 0.80
backward_stepFunction · 0.80
train_stepFunction · 0.80
seq2seq_forward_stepFunction · 0.80
lm_forward_stepFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected