Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/OpenGVLab/HumanBench
/ get_world_size
Function
get_world_size
PATH/core/distributed_utils.py:166–167 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
164
return
get_rank() % torch.cuda.device_count()
165
166
def
get_world_size():
167
return
int(os.environ.get(
'SLURM_NTASKS'
, 1))
168
169
def
dist_init(method=
'slurm'
, port=
'5671'
):
170
assert method ==
'slurm'
Callers
7
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