'pytorch CUDA version vs. Nvidia CUDA version

Till Apr26th, 2022, CUDA has updated to version 11.6, which can be installed by Nvidia Instruction:

wget https://developer.download.nvidia.com/compute/cuda/11.6.2/local_installers/cuda_11.6.2_510.47.03_linux.run
sudo sh cuda_11.6.2_510.47.03_linux.run

I guess the version of cudatoolkit will also be 11.6

However, there is no version of pytorch that matches CUDA11.6.

On the website of pytorch, the newest CUDA version is 11.3, pytorch version will be 1.11.0(stable)

conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch

So if I used CUDA11.6 and pytorch1.11.0 with cudatoolkit=11.3, will it perform normally? and if there is any difference between Nvidia Instruction and conda method below?

conda install cuda -c nvidia

Best regards!



Solution 1:[1]

It should be fine. Otherwise, I saw here that you can build it from the source (I have python=3.8.13) build instructions

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

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 richardec