CUDA&CUDNN local installation and using these in conda envs

I have installed CUDA and CUDNN by following NVIDIA guidelines. When I installed CUDA and CUDNN, I did not activate any conda environment.
Would this be a problem when I try to use CUDA&CUDNN in a conda environment? (in PyTorch)

CUDNN Verification does not work with any environment but woks with the base environment.

I assume you’ve installed a local CUDA toolkit (with the nvcc CUDA compiler) and added cuDNN to it.
If so then virtual conda environments wouldn’t change anything as the CUDA toolkit it not a conda or pip package and should be visible in all envs (try to run which nvcc and it should point to e.g. /usr/local/cuda).
Note that a locally installed CUDA toolkit will only be used if you are building PyTorch from source or a custom CUDA extensions. The pip wheels and conda binaries ship with their own CUDA runtime and you would only need to install a sufficiently new NVIDIA driver to execute these binaries.

Hello ptrblck, I know this is an old thread, but I found it while trying to troubleshoot a different problem. Would you recommend the local download from the Nvidia Cudatoolkit over the Conda Nvidia download? Or does it not matter? I do know that nvrtc builtins64_121.dll isn’t in the Cudatoolkit downloaded from Nvidia’s site. This is why I’m curious.

To execute PyTorch workloads with CUDA support you should be able to install the binaries with an NVDIA driver as the locally installed CUDA toolkit won’t be used.

1 Like

I appreciate your quick response, and maybe you can help me understand something better. I was trying to use torcheval, which I know isn’t stable yet, but it only started to work after I copied the file nvrtc-builtins64_121.dll from my Conda PyTorch environment into the locally installed CUDA toolkit bin directory. Otherwise it kept saying that the file was not found.
Is this simply due to the path not going towards the binaries? I’d prefer to delete the local download if I can, but I’m still way to green to fully comprehend.

I’m not using Windows myself, so don’t have an easy way to reproduce issues.
However, if a plain PyTorch installation using the current stale or nightly version is not working on Windows and points towards missing files, could you create a GitHub issue so we could follow up?

Yes, no problem; I appreciate your time.