Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/pytorch/examples
/ ddp_setup
Function
ddp_setup
distributed/ddp-tutorial-series/multinode.py:13–15 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
11
12
13
def
ddp_setup():
14
torch.cuda.set_device(int(os.environ[
"LOCAL_RANK"
]))
15
init_process_group(backend=
"nccl"
)
16
17
class
Trainer:
18
def
__init__(
Callers
1
main
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected