gpucc breaks cuda 7.0.28/7_CUDALibraries/simpleCUFFT

Would you mind upload your code? It looks related to device code generation because building was successful.

Hi Jingyue,

as I said, it's 7_CUDALibraries/simpleCUFFT from the nvidia SDK. I'll attach a tarball with the code and the llvm makefile, dubbed Makefile.llvm.

Just unpack the tarball and call the added Makefile
$ tar xf clang-simpleCUFFT.tgz
$ make -C clang-simpleCUFFT/7_CUDALibraries/simpleCUFFT/ -f Makefile.llvm
$ ./clang-simpleCUFFT/7_CUDALibraries/simpleCUFFT/simpleCUFFT.llvm
... : getLastCudaError() CUDA error : Kernel execution failed [ ComplexPointwiseMulAndScale ] : (8) invalid device function.

The problem is reproducible for Fermi and Kepler. ( I am using cuda 7.0 runtime libraries )


clang-simpleCUFFT.tgz (710 KB)


I can’t reproduce the problem with recent clang. I’ve tried compiling the same smaple code with cuda-7.0 and 7.5.clang version 3.9.0 (trunk 268962) (llvm/trunk 268980)

Could you tell me what was clang version you used? If you still see the problem, please file a clang bug on


% clang++ -I…/…/common/inc --cuda-gpu-arch=sm_35 -L/usr/local/cuda-7.5/lib64 -lcufft -lcudart -o simpleCUFFT-clang
% LD_LIBRARY_PATH=/usr/local/cuda-7.5/lib64 ./simpleCUFFT-clang

[simpleCUFFT] is starting…
GPU Device 0: “Tesla K40c” with compute capability 3.5

Transforming signal cufftExecC2C
Launching ComplexPointwiseMulAndScale<<< >>>
Transforming signal back cufftExecC2C

Hi Artem,

the described "bug" is gone with llvm/clang trunk. Are there any news on texture memory support with cuda clang yet?

Thanks a bunch -


I’m glad to hear that it works now.

As for texture lookups, I don’t have any good news – they are still unsupported.