When would I use model.to("cuda:1") as opposed to model.to("cuda:0")?
I have a user with two GPU's; the first one is AMD which can't run CUDA, and the second one is a cuda-capable NVIDIA GPU. I am using the code model.half().to(&quot;cuda:0&quot;). I'm not sure if the invocation successfully used the GPU, nor am I able to test it because I don't have any spare computer with more than 1 GPU lying around.
In this case, does &quot;cuda:0&quot; mean the first device which can run CUDA, so it would've worked even if their first device was AMD? Or would I need to say &quot;cuda:1&quot; instead? How would I detect which number is the first CUDA-capable device?

I tested it and as I suspected the model.half().to(&quot;cuda:0&quot;) will put your model in the first available GPU with CUDA support i.e. NVIDIA GPU in your case, the AMD GPU isn't visible as a cuda device, feel safe to assume cuda:0 is only a CUDA enabled GPU, and AMD GPU won't be seen by your program.
Have a good day.
