[llvm-dev] NVPTX compilation problems - ptxas error

Pranav Madhikar via llvm-dev llvm-dev at lists.llvm.org
Thu Jun 30 03:56:00 PDT 2016


Hello Lorenz,

I think I may have found what is causing the problem. I had the same 
problem and was able to solve it, see below.

Do you have more than one version of cuda installed? I think however 
clang invokes the compilation of the cuda parts of the code may be 
causing the problem. It may be falling back onto an older version of cuda.

In my case I had cuda-5.5 installed at /usr/local/cuda-5.5 with 
/usr/local/cuda linked to it. And I have cuda-7.5 installed elsewhere, 
that is the version in my $PATH and the one I was linking against during 
compilation. When I ran the compilation with the -v flag, I found that 
/usr/local/cuda/ptxas was being being invoked (cuda-5.5) instead of the 
version of ptxas (cuda-7.5) I had in my $PATH. That is the default 
location that cuda is normally installed to, clang may be defaulting to 
that. If you have root access, you might try installing cuda-7.5 to 
/usr/local/cuda. Doing that fixed it for me.

I think this might be a bug in how cuda code is compiled. clang should 
respect what version you keep in your $PATH.

Best Regards,
Pranav


More information about the llvm-dev mailing list