Skip to content

Is there a way to choose which GPU a model uses? #2146

Answered by beat-buesser
dominic-simon asked this question in Q&A
Discussion options

You must be logged in to vote

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 setting export CUDA_VISIBLE_DEVICES=1 and setting device to gpu before running your code?

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by dominic-simon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants