I’m referring to environment variable: CUDA_VISIBLE_DEVICES
This is set to 1,2,3,4,5,6,7,8,9,10 and verified the same while debugging.
So, I’m not sure what is going wrong here. Device count is proper if I print out from console, but getting 1 on code execution.  There’s nothing on the code that could mess up the device count.

Is there any way by which the device count gets modified? (For example, with the use of CUDA_VISIBLE_DEVICES)


if everything is setup properly torch.cuda.device_count() should return 2 or 3 respectively



Can you elaborate more on the setup?  I’m trying to figure out what is causing the issue.