[llvm-dev] NVPTX compilation problems - ptxas error

Lorenz Braun via llvm-dev llvm-dev at lists.llvm.org
Tue Jun 7 02:21:31 PDT 2016


Hello everybody,
i am currently testing the NVPTX back-end and playing around with the IR 
it generates. Unfortunately i have come to an compilation error i cannot 
solve on my own. Maybe someone reading this knows what is causing the 
trouble and has a possible solution.

I am using Ubuntu 16.04, Cuda 7.5 and clang version 3.9.0
(https://github.com/llvm-mirror/clang.git 
2869a420162946c5eecaa3742fc9c50a698d7a61) 
(https://github.com/llvm-mirror/llvm.git 
56547528a22d290a2e8b2c40810abb8117a8a6bc)

I have attached my source code which i try to compile with clang++ (it 
is just for testing so the code is not mean to do something useful) and 
here is the command i am using:
$ clang++ --cuda-gpu-arch=sm_20 loops.cu -o loops-clang 
-L/opt/cuda-7.5/lib64 -lcudart_static -ldl -lrt -pthread
ptxas /tmp/loops-36dc47.s, line 5; error   : Unsupported .version 4.2; 
current version is '3.2'
ptxas fatal   : Ptx assembly aborted due to errors
clang-3.9: error: ptxas command failed with exit code 255 (use -v to see 
invocation)

Compilation with nvcc works by the way.

I will be glad about any help and provide more information if needed.
Kind regards
Lorenz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: loops.cu
Type: application/cu-seeme
Size: 3470 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160607/d05f59a2/attachment.cu>


More information about the llvm-dev mailing list