[cfe-dev] [CUDA] unable to compile the AXPY sample any more

Jingyue Wu via cfe-dev cfe-dev at lists.llvm.org
Mon Jan 11 15:15:02 PST 2016


Environment:
LLVM/Clang version: r257392
CUDA 7.0
Ubuntu 14.04

The axpy code can be found at http://llvm.org/docs/CompileCudaWithLLVM.html.
I also tried the matrixMul in CUDA samples, and saw similar errors. I
haven't tried CUDA 7.5, but do we assume CUDA 7.5 only?

Below is the command line I use and the error messages I got:

jingyue Work% clang++ -I../../common/inc -L/usr/local/cuda/lib64
-I/usr/local/cuda axpy.cu -lcudart_static -lcuda -ldl -lrt -pthread

In file included from <built-in>:614:
In file included from <command line>:1:
/usr/local/google/home/jingyue/Work/llvm/install-git/bin/../lib/clang/3.8.0/include/__clang_cuda_runtime_wrapper.h:169:31:
error: redefinition of '__brkpt'
static inline __device__ void __brkpt(int c) { __brkpt(); }
                              ^
/usr/local/google/home/jingyue/Work/llvm/install-git/bin/../lib/clang/3.8.0/include/cuda_runtime.h:132:31:
note: previous definition is here
static inline __device__ void __brkpt(int c) { __brkpt(); }
                              ^
In file included from <built-in>:614:
In file included from <command line>:1:
In file included from
/usr/local/google/home/jingyue/Work/llvm/install-git/bin/../lib/clang/3.8.0/include/__clang_cuda_runtime_wrapper.h:181:
/usr/local/cuda/include/device_functions.hpp:79:38: error: redefinition of
'mulhi'
__DEVICE_FUNCTIONS_STATIC_DECL__ int mulhi(int a, int b)
                                     ^
/usr/local/cuda/include/device_functions.hpp:79:38: note: previous
definition is here
__DEVICE_FUNCTIONS_STATIC_DECL__ int mulhi(int a, int b)
                                     ^
In file included from <built-in>:614:
In file included from <command line>:1:
In file included from
/usr/local/google/home/jingyue/Work/llvm/install-git/bin/../lib/clang/3.8.0/include/__clang_cuda_runtime_wrapper.h:181:
/usr/local/cuda/include/device_functions.hpp:84:47: error: redefinition of
'mulhi'
__DEVICE_FUNCTIONS_STATIC_DECL__ unsigned int mulhi(unsigned int a,
unsigned int b)
                                              ^
/usr/local/cuda/include/device_functions.hpp:84:47: note: previous
definition is here
__DEVICE_FUNCTIONS_STATIC_DECL__ unsigned int mulhi(unsigned int a,
unsigned int b)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160111/1e724a91/attachment.html>


More information about the cfe-dev mailing list