Skip to content

Commit 4a9aa48

Browse files
edenlightningBordakaushikb11
committed
Update gpu warning (Lightning-AI#6181)
Co-authored-by: Jirka Borovec <[email protected]> Co-authored-by: Kaushik Bokka <[email protected]>
1 parent 10696ee commit 4a9aa48

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pytorch_lightning/trainer/connectors/accelerator_connector.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,10 @@ def set_distributed_mode(self, distributed_backend: Optional[str] = None):
544544
rank_zero_info(f'TPU available: {_TPU_AVAILABLE}, using: {num_cores} TPU cores')
545545

546546
if torch.cuda.is_available() and self._device_type != DeviceType.GPU:
547-
rank_zero_warn("GPU available but not used. Set the --gpus flag when calling the script.")
547+
rank_zero_warn(
548+
"GPU available but not used. Set the gpus flag in your trainer"
549+
" `Trainer(gpus=1)` or script `--gpus=1`."
550+
)
548551

549552
def _set_horovod_backend(self):
550553
self.check_horovod()

0 commit comments

Comments
 (0)