Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to run on a local machine? #11

Open
baiyancheng20 opened this issue Sep 17, 2018 · 1 comment
Open

How to run on a local machine? #11

baiyancheng20 opened this issue Sep 17, 2018 · 1 comment

Comments

@baiyancheng20
Copy link

If I have a local dgx2 machine with 4 or 8 gpus, how do I modify the code to run on the local dgx2 machine?

@yaroslavvb
Copy link
Collaborator

Check this line from distributed launcher
https://github.com/diux-dev/imagenet18/blob/64944208c9988a5d5b6ebbe3d635f138bf10d1e4/train.py#L188

For instance for 16 machine run it calls the following:

python -m torch.distributed.launch --nproc_per_node=8 --nnodes=16 --node_rank=1 --master_addr=172.31.66.240 --master_port=6006 training/train_imagenet_nv.py /home/ubuntu/data/imagenet --fp16 --logdir /ncluster/runs/imagenet-16.02 --distributed --init-bn0 --no-bn-wd --phases [{‘ep’: 0, ‘sz’: 128, ‘bs’: 64, ‘trndir’: ‘-sz/160’}, {‘ep’: (0, 6), ‘lr’: (1.92, 3.84)}, {‘ep’: 6, ‘bs’: 128, ‘keep_dl’: True}, {‘ep’: 6, ‘lr’: 3.84}, {‘ep’: (11, 14), ‘lr’: (3.84, 1.92)}, {‘ep’: 14, ‘sz’: 224, ‘bs’: 64, ‘trndir’: ‘-sz/352’, ‘min_scale’: 0.087, ‘lr’: 1.92}, {‘ep’: 17, ‘bs’: 224, ‘keep_dl’: True}, {‘ep’: (17, 23), ‘lr’: (1.92, 0.672)}, {‘ep’: (23, 29), ‘lr’: (0.672, 0.0672)}, {‘ep’: 29, ‘sz’: 288, ‘bs’: 128, ‘min_scale’: 0.5, ‘rect_val’: True}, {‘ep’: (29, 37), ‘lr’: (0.0192, 0.0019199999999999998)}, {‘ep’: (37, 40), ‘lr’: 0.0019199999999999998}]

So to run on a single machine, change nnodes=1 and nproc_per_node=8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants