Search code examples
installationpytorch

Is pytorch 1.7 officially enabled for cuda 10.0?


I had to stay on CUDA 10.0 for personal projects.

Rather than installing Pytorch with versions appropriate for CUDA 10.0, I accidentally installed Pytorch 1.7 supported with CUDA 10.1. In particular, I installed it by

pip install torch==1.7.1+cu101 torchvision==0.8.2+cu101 torchaudio==0.7.2 -f https://download.pytorch.org/whl/torch_stable.html

Surprisingly, everything works fine so far although the CUDA versions do not match.

To verify my installation, I've run the code given in collect_env.py, and it was fine.

I am just wondering a few things.

  1. Did the Pytorch team officially comment Pytorch 1.7 is compatible with CUDA 10.0?
  2. Would there be more rigorous ways to verify my Pytorch installation?

Solution

  • Surprisingly, everything works fine so far although the CUDA versions do not match.

    Changes between minor versions should work (mismatch like this worked in my case), although there is no promise of compatibility in 10.x release (source), only since 11.x there will be binary compatibility.

    Did the Pytorch team officially comment Pytorch 1.7 is compatible with CUDA 10.0?

    Not that I'm aware of, but listed wheels do not include 10.0 CUDA and PyTorch 1.7.0 (latest with 10.0 support seems to be 1.4.0).

    Would there be a more rigorous way to verify my Pytorch installation?

    As above, maybe cloning PyTorch's GitHub repo, reverting to tagged release, and running tests (folder here, one of cuda test files here), but for personal projects might be excessive.