Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/OpenGVLab/HumanBench
/ get_rank
Function
get_rank
PATH/core/distributed_utils.py:160–161 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
158
raise
RuntimeError(
'buffer {} does not have task_specific'
.format(name, id(b)))
159
160
def
get_rank():
161
return
int(os.environ.get(
'SLURM_PROCID'
, 0))
162
163
def
get_local_rank():
164
return
get_rank() % torch.cuda.device_count()
Callers
8
get_local_rank
Function · 0.85
dist_init
Function · 0.85
__init__
Method · 0.85
__init__
Method · 0.85
__init__
Method · 0.85
__init__
Method · 0.85
__init__
Method · 0.85
__init__
Method · 0.85
Calls
1
get
Method · 0.80
Tested by
no test coverage detected