Is there a way to choose which GPU a model uses? #2146
-
I'm trying to figure out if there is a way to set which GPU is used (ex. I've tried setting |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @dominic-simon Sorry for the delayed response. I think that's a good question, I don't think this has been tested so far. The current approach is based on using the CUDA environment variable |
Beta Was this translation helpful? Give feedback.
Hi @dominic-simon Sorry for the delayed response. I think that's a good question, I don't think this has been tested so far. The current approach is based on using the CUDA environment variable
CUDA_VISIBLE_DEVICES
and set it to define which GPUs are visible. Can you try settingexport CUDA_VISIBLE_DEVICES=1
and setting device togpu
before running your code?