Skip to content

Commit

Permalink
Update gpu warning (Lightning-AI#6181)
Browse files Browse the repository at this point in the history
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Kaushik Bokka <kaushikbokka@gmail.com>
  • Loading branch information
3 people committed Mar 2, 2021
1 parent 10696ee commit 4a9aa48
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,10 @@ def set_distributed_mode(self, distributed_backend: Optional[str] = None):
rank_zero_info(f'TPU available: {_TPU_AVAILABLE}, using: {num_cores} TPU cores')

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

def _set_horovod_backend(self):
self.check_horovod()
Expand Down

0 comments on commit 4a9aa48

Please sign in to comment.