Why is cuda10.0 able to work with pytorch1.7?

Recently,I need to install pytorch ,when I check out the website :

download pytorch using pip

It shows four different version 9.2,10.1,10.2,11.0 to choose ,And I have cuda version 10.0 and driver version 450 installed on my computer,I thought it would fail to enable gpu when using pytorch ,After I choose 10.1 and use pip to install pytorch and try torch.cuda.is_available() and it returns True

I have two questions:

  1. Why does everything turn out to be working even my cuda version is not the same as any of one I mentioned ?
  2. What’s the difference between choosing cuda verison 9.2,10.1,10.2,11.0 ?

The CUDA library is included in the download. So it doesn’t matter which CUDA installation you have, when you pip install a version, it download and installs the given CUDA version as well. I also did not realize this until @ptrblck told me. AFAIK that is different from Tensorflow which requires a pre-existing installation.

1 Like