mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-09 11:32:07 +08:00
made ddp the default if no backend specified with multiple GPUs (#1789)
* made ddp the default if no backend specified with multiple GPUs * fix * spawn Co-authored-by: Jirka <jirka.borovec@seznam.cz>
This commit is contained in:
@@ -130,6 +130,7 @@ def test_cpu_slurm_save_load(tmpdir):
|
||||
trainer.fit(model)
|
||||
|
||||
|
||||
@pytest.mark.spawn
|
||||
@pytest.mark.skipif(torch.cuda.device_count() < 2, reason="test requires multi-GPU machine")
|
||||
def test_multi_gpu_none_backend(tmpdir):
|
||||
"""Make sure when using multiple GPUs the user can't use `distributed_backend = None`."""
|
||||
|
||||
@@ -712,7 +712,7 @@ def test_gpu_choice(tmpdir):
|
||||
),
|
||||
pytest.param(
|
||||
dict(distributed_backend=None, gpus=2),
|
||||
dict(use_dp=True, use_ddp=False, use_ddp2=False, num_gpus=2, on_gpu=True, single_gpu=False, num_processes=1),
|
||||
dict(use_dp=False, use_ddp=True, use_ddp2=False, num_gpus=2, on_gpu=True, single_gpu=False, num_processes=1),
|
||||
marks=[pytest.mark.skipif(torch.cuda.device_count() < 2, reason="Multiple GPUs needed")]
|
||||
),
|
||||
pytest.param(
|
||||
|
||||
Reference in New Issue
Block a user