Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
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
41
def
_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_grads
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected