MCPcopy Index your code
hub / github.com/tensorpack/tensorpack / _get_shared_cnt

Function _get_shared_cnt

tensorpack/graph_builder/utils.py:41–47  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

39
40
41def _get_shared_cnt():
42 global _shared_cnt_counter
43
44 with _module_lock:
45 val = _shared_cnt_counter
46 _shared_cnt_counter += 1
47 return val
48
49
50@contextmanager

Callers 1

allreduce_gradsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected