I have 8 GPUs ,buyt why my torch.cuda.device_count() return only 1?

i use ‘nvidia-smi -L’ to list my avaiable gpus,
image
.
i don’t set the CUDA_VISIBLE_DEVICES and run my script ‘print(torch.cuda.device_count())’ and it always return 1, anyone can tell me what’s happen? thx!

Could you check, if this environment variable is set somewhere in your code?
The line should e.g. look like this:

os.environ["CUDA_VISIBLE_DEVICES"]="0"