Select GPU from cli #7461
-
The CLI has a flag --gpus In a system with more than 1 GPU, is there a way to select the GPU you want to run on from CLI? I tried --gpus [1] to select cuda:1 but it doesn't work. Also the auto gpu selection didn't work for me. It tried to put the job on cuda:0, but cuda:0 didn't have enough memory to run it. in the end I resorted to CUDA_VISIBLE_DEVICES, but that seems silly. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
I'm assuming you are referring to the In that case, just do |
Beta Was this translation helpful? Give feedback.
-
for those who use zsh, maybe we need |
Beta Was this translation helpful? Give feedback.
I'm assuming you are referring to the
LightningCLI
In that case, just do
python yourscript.py --trainer.gpus=[1]