Great thanks to your reply. I had GTX 1070 graphic card and it has GPU.
I followed the link to install cudatoolkit in python (https://developer.nvidia.com/how-to-cuda-python 1.3k) and run the sample test successfully. However, torch.cuda.is_available() still shows False. It will be appreciated If you could tell me how to make CUDA work with torch.