Commit 717f02f3 authored by zhanggzh's avatar zhanggzh
Browse files

change test_ddp src code

parent 5b602850
......@@ -44,6 +44,7 @@ def _run_distributed(func, world_size, args: Dict, script=__file__, env=dict()):
for i in range(world_size):
env["OMPI_COMM_WORLD_RANK"] = str(i)
env["CUDA_VISIBLE_DEVICES"] = str(i % device_count)
p = subprocess.Popen(
[sys.executable, script, func, json.dumps(args)],
stdout=subprocess.PIPE,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment