Oh, thanks for your reply. It seems like a hardware defect.
When I changed to another machine, everything works fine.
The previous GPU I used is 1080Ti. And it still return 0 in GPU1. I did some searching in forum for the issue you mentioned, but I just couldn’t find it.
This is a really hard debugging process. Again, thanks very much!