Your system might be in a bad state and PyTorch is unable to detect the GPUs.
Did you upgrade any drivers or installed a CUDA toolkit without rebooting?
Are you able to run any other CUDA applications?