MCPcopy
hub / github.com/hpcaitech/ColossalAI / start

Method start

colossalai/utils/timer.py:27–32  ·  view source on GitHub ↗

Firstly synchronize cuda, reset the clock and then start the timer.

(self)

Source from the content-addressed store, hash-verified

25 return time.time()
26
27 def start(self):
28 """Firstly synchronize cuda, reset the clock and then start the timer."""
29 self._elapsed = 0
30 get_accelerator().synchronize()
31 self._start_time = time.time()
32 self._started = True
33
34 def lap(self):
35 """lap time and return elapsed time"""

Callers 5

startMethod · 0.45
connectMethod · 0.45
run_serverFunction · 0.45
init_workersMethod · 0.45

Calls 2

get_acceleratorFunction · 0.90
synchronizeMethod · 0.45

Tested by

no test coverage detected