PyTorch + CUDA 11.6

Hello everyone,

As a follow-up to this question PyTorch + CUDA 11.4
I have installed these Nvidia drivers version 510.60.02 along with Cuda 11.6.
I’d like to install Pytorch in a conda virtual environment, and I’ve found in the Pytorch website that we couldn’t choose a stable version that relies on the latest versions of Cuda (the older version is 11.3) Start Locally | PyTorch

How can I install/build Pytorch with the latest version of Cuda in my conda virtual env ?

1 Like

You could build PyTorch from source following these instructions or install the nightly binaries with CUDA11.6 via:

pip install torch --pre --extra-index-url https://download.pytorch.org/whl/nightly/cu116
10 Likes

@ptrblck I installed it using the nightly binaries. Thanks a lot for your help !

Thank you so much. Also worked for torchvision.

1 Like

Just for future ref one can get all packages under that link… torchserve aswell.

1 Like

Hi, sir. I have one question: If I installed cuda 113 version pytorch, but my GPU is cuda 11.6. Is this mismatch of version affect the reproducibility of code. Since I set all random seeds and no deterministic algorithms used in code, but the training loss between different running times is still around 1%.

No, your locally installed libraries should not introduce non-determinism as they should not be used since the PyTorch binaries ship with their own CUDA runtime, cuDNN, cublas etc. and will use these.