Torch.cuda.device_count() always return 0

Hello, There are 0 to 4 gpu in the server, and one of them or multi-use is intended.
so, I tried to use gpu using os.environ[“CUDA_VISIBLE_DEVICES”]=‘3’ or ‘0, 1, 2, 3’
}. However, torch.cuda.current_device() continues to return 0. Why is it like this?

How do I solve this problem?
thank you

import os
import torch

os.environ["CUDdfA_DEVICE_ORDER"]="PCI_BUS_ID" 
os.environ["CUDA_VISIBLE_DEVICES"]= "3" 
print('Current cuda device:', torch.cuda.current_device())
print('Count of using GPUs:', torch.cuda.device_count())


################print######################
Current cuda device: 0
Count of using GPUs: 1

Hi,

This is expected. The cuda devices are always numbered from 0 and up.
So if you have 1 GPU available, it will be 0. If you have 2, they will be 0 and 1. etc