We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0a8ad3d commit 8910453Copy full SHA for 8910453
src/lightning/fabric/cli.py
@@ -198,7 +198,7 @@ def _get_num_processes(accelerator: str, devices: str) -> int:
198
elif accelerator == "tpu":
199
raise ValueError("Launching processes for TPU through the CLI is not supported.")
200
elif accelerator == "auto" or accelerator is None:
201
- if torch.cuda.is_available():
+ if torch.cuda.is_available() and torch.cuda.device_count() > 0:
202
parsed_devices = CUDAAccelerator.parse_devices(devices)
203
elif torch.backends.mps.is_available() and torch.backends.mps.is_built():
204
parsed_devices = MPSAccelerator.parse_devices(devices)
0 commit comments