Build from source for older cuda version

simple question: I need to use pytorch’s latest stable release. Problem is I have CUDA 11.0 so if I build pytorch from source will it work for this CUDA version. And also is build from source possible without root access?

You should be able to build with CUDA 11.0, but note that it’s not tested anymore (I believe the oldest CUDA release used in CI is 11.4). Note however that you might reintroduce already fixed issues in the CUDA stack.
What’s the reason you want to use such an old CUDA release instead of e.g. just installing the binaries with a newer CUDA?

CUDA-11.x is forward compatible, i.e. you don’t need to install new driver to be able to use PyTorch binaries build with CUDA-11.7 or so.

@ptrblck also, oldest CUDA still tested in CI is 11.4 :slight_smile:

Resaon is I use shared cluster in Lab and I could not convience them to update CUDA or our GPUs suppert this version

but when I install newer pytorch with conda it install cpu-only pytorch

You don’t need to install a local CUDA toolkit as it will only be used if you build PyTorch from source or a custom CUDA extension. The PyTorch binaries ship with all CUDA requirements and you only need to properly install an NVIDIA driver as @malfet mentioned.
So what’s the reason you want to use such an old CUDA version?

If I install pytorch normaly it is cpu-only version

Could you post the command you are using as well as the output from your terminal, please?

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