MCPcopy
hub / github.com/InternLM/InternLM / sync_states

Function sync_states

internlm/core/context/random.py:118–121  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

116
117
118def sync_states():
119 current_mode = get_current_mode()
120 current_states = torch.cuda.get_rng_state()
121 set_seed_states(current_mode, current_states)
122
123
124@contextmanager

Callers 3

forwardMethod · 0.90
backwardMethod · 0.90

Calls 2

get_current_modeFunction · 0.85
set_seed_statesFunction · 0.85

Tested by

no test coverage detected