Install pytorch for cuda 11.3 with pip

Running nvcc --version shows me following,

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Sun_Mar_21_19:15:46_PDT_2021
Cuda compilation tools, release 11.3, V11.3.58
Build cuda_11.3.r11.3/compiler.29745058_0

I had already install cudnn on ubuntu 20.04 and tensorflow is picking it.

Now i want to install PyTorch with same cuda and cudnn. I dont want PyTorch to install its own cuda toolkit but use existing installed cuda toolkit. I am unable to find correct pip link for this.

The pip wheels and conda binaries ship with their own CUDA runtime as well as cuDNN, NCCL etc. and won’t be using the system CUDA toolkit.
If you don’t want to use the shipped libraries, you could build PyTorch from source using the locally installed CUDA toolkit.

Previously i have cuda toolkit 11.0 installed. And i am installing pytorch via pip install torch==1.7.1+cu110 torchvision==0.8.2+cu110 torchaudio==0.7.2 -f it mean that its not using already installed 11.0 version, but using its own cuda things?

@ptrblck waiting for your kind response

Yes, the pip wheels and conda binaries ship with their own CUDA runtime as mentioned before. The system-wide installed CUDA toolkit will be used if you are building PyTorch from source or a custom CUDA extenstion.