Skip to content

Commit

Permalink
Warn when using --update-freq on a single machine and --ddp-backend !…
Browse files Browse the repository at this point in the history
…= no_c10d

Summary: Pull Request resolved: facebookresearch#400

Differential Revision: D13366996

Pulled By: myleott

fbshipit-source-id: b4907815e7cc1b4a2aceab11210bf64cb3d814c9
  • Loading branch information
myleott authored and facebook-github-bot committed Dec 6, 2018
1 parent 82a9f92 commit ccd2221
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions multiprocessing_train.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ def main(args):
args.distributed_init_method = 'tcp://localhost:{port}'.format(port=port)
args.distributed_init_host = 'localhost'
args.distributed_port = port + 1
if max(args.update_freq) > 1 and args.ddp_backend != 'no_c10d':
print('| WARNING: when using --update-freq on a single machine, you '
'will get better performance with --ddp-backend=no_c10d')

mp = torch.multiprocessing.get_context('spawn')

Expand Down

0 comments on commit ccd2221

Please sign in to comment.