BramVanroy:

Hold up. So you are saying it doesn’t even matter what the default CUDA version (nvcc --version) on my system is?


That is correct, if you are using “pure” PyTorch. To build custom CUDA extensions in PyTorch, you would still need a local CUDA toolkit installation (since you are compiling the extension with nvcc) and I would recommend to install the matching CUDA version. Otherwise your locally compiled CUDA extension would use another CUDA version than the PyTorch runtime and you might run into errors (PyTorch should raise an error if a different local install is detected).
However, if you are just using PyTorch without any extensions and are not rebuilding, you don’t need a local CUDA installation.



 BramVanroy:

What does that mean for other scripts in the environment though? Will they all use the PyTorch loaded CUDA libs (so does PyTorch set some env specific variables to CUDA so the current env knows where those libs are?).


Other frameworks and libraries might either ship with their own runtime libs or might need a local installation. This would depend on the 3rd party library and how they decide to create the package.