@ptrblck, thank you for your answer. Now I update to the latest stable release 1.8.0, and I run the following code:
import torch
import torch.utils
import torch.utils.cpp_extension

print(torch.__version__)
print(torch.cuda.is_available())
print(torch.cuda.device_count())
print(torch.cuda.get_device_name(0))
print(torch.utils.cpp_extension.CUDA_HOME)

a = torch.randn(2, 3, device='cuda:0')
print(a)
b = a.to('cuda:1')
print(b)

The output are:
1.8.0+cu111
True
8
A100-PCIE-40GB
/usr/local/cuda-11.1
tensor([[-0.9957, -0.9985,  1.1794],
        [-1.4586, -0.0102, -0.0106]], device='cuda:0')
tensor([[0., 0., 0.],
        [0., 0., 0.]], device='cuda:1')

Below is my driver configuration：
1739×935 169 KB
And now I use cuda11.1, cudnn8.1.0.
Do you have any more suggestions to help me troubleshoot the cause (software and hardware) of this problem? Thank you very much.