ptrblck:

Could you post the error message you were seeing? As we are building it with CUDA11.2, it would be good to see what wasn’t working in your setup.


I am really sorry but as I deleted ‘pytorch’ folder after I failed to build pytorch with CUDA 11.2, it may be hard to find the full error message at that time (By the way, I remember I used this CUDA 11.2 with cudnn 8.1, I installed it by decompressing cudnn-11.2-linux-x64-v8.1.0.77.tgz  , copying the files with
cp cuda/lib64/* /usr/local/cuda-11.2/lib64/
cp cuda/include/* /usr/local/cuda-11.2/include/

Fortunately, I remember some of the details when I encountered this problem. (As I googled some of the error messages.)  I hope it could do some help.


I remember we need about 5990 files to build, right? Then my build error happened on about [5660/5990]. At that point the setup.py seemed building ‘test cudnn library’? or say ‘building with cudnn’  part? Then the error happened.


The final error message is
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--target', 'install', '--config', 'Release', '--', '-j', '32']' returned non-zero exit status 1.
Before that there were many error messages coming out like:
libcublas.so: undefined reference to  xxxxxx
And for now I can find only one exact record that I have ever searched with google… Sorry for that
libcublas.so: undefined reference to `cublasltbiimatmulalgogetheuristic@libcublaslt.so.11'


I searched github and our forum but they were not my situation. Then I searched the internet and found that

One person said in his blog that he is now using CUDA10.1, but he wants to compile a program based on CUDA10.0.
As a result, a similar error would appear, like libnvinfer.so: undefined reference to `__cudaPushCallConfiguration@libcudart.so.10.0'.
So he manually modified cuda100wrapper.map, disguising cudaGetDeviceCount@libcudart.so.10.1 as cudaGetDeviceCount@libcudart.so.10.0.
But he said he did this because of his work needs. He mentioned that actually it could be much faster to avoid this error if you can uninstall CUDA10.1 and then install CUDA10.0.

So I unistalled CUDA11.2 and installed CUDA11.0 and also cudnn with cudnn-11.2-linux-x64-v8.1.0.77.tgz, and this time the building procedure was successful.