Is NVIDIA driver already included CUDA and CUDA toolkit?

I installed pytorch to my conda environment (windoes 11)

conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia

I updated my driver using GeForce Experience before, but I didn’t install CUDA toolkit or cuDNN. When I run nvidia-smi, it shows that my CUDA version is 12.2

Also, everything working well, it used my GPU for training

< torch.cuda.device object at xxx >

I just confused…
(1) Is installing CUDA toolkit to local computer necessary for pytorch?
(2) Does NVIDIA driver include CUDA? If not, where does the CUDA come from?

Thank you very much

  1. No, since the PyTorch binaries ship with their own CUDA dependencies (e.g. cuBLAS, cuDNN, NCCL, etc.).
  2. No, it does not. The PyTorch binaries ship with all needed CUDA dependencies and a simple pip install torch will pull them from PyPI.
1 Like