Bug#807579: CUDA 7.5 fails to work with GCC-6, stretch may need CUDA (>= 8.0)

lumin cdluminate at gmail.com
Fri Mar 4 02:46:13 UTC 2016


On Tue, 2016-03-01 at 17:15 +0100, Andreas Beckmann wrote:
> 
> amd64 should be more or less ready for going to experimental, more
> testing would be welcome!

I successfully built CUDA 7.5 locally on amd64 with trunk.

> I tried the cuda code samples (see README.Debian), and most built (only
> those few that link with -lcudadevrt seem to miss a -lcudart). I didn't
> try to actually run even one of them :-)

Months ago I tested CUDA 7.5 + GCC-5 for my ITP package "caffe"[1], and
the result shows it works. My experience on an ArchLinux workstation
also confirms that GCC-5.X works very well with CUDA 7.5 .

> What's the status of using CUDA 7.5 with GCC 6 (already in experimental)?
> Right now I blocked this version in the header check and the gcc/g++
> wrappers also ignore that version, so you need to ensure you are really
> testing with g++-6. If it doesn't blow up, we should enable it as well.

It appears that NVCC doesn't work with GCC-6 [2], according to my
preliminary test. So if this is not a BUG of GCC-6, and GCC-6
code is basically frozen, we should block GCC-6 for CUDA 7.5.

However eventually we need CUDA >= 8.0 for stretch, as the
default compiler of stretch will be GCC-6.

-----------------GCC-6----------------------
# make -j1
[  1%] Running C++/Python protocol buffer compiler on /tmp/caffe/src/caffe/proto/caffe.proto
Scanning dependencies of target proto
[  1%] Building CXX object src/caffe/CMakeFiles/proto.dir/__/__/include/caffe/proto/caffe.pb.cc.o
[  2%] Linking CXX static library ../../lib/libproto.a
[  2%] Built target proto
[  4%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile.dir/layers/cuda_compile_generated_eltwise_layer.cu.o
/usr/lib/gcc/x86_64-linux-gnu/6/include/stddef.h(436): error: identifier "nullptr" is undefined
/usr/lib/gcc/x86_64-linux-gnu/6/include/stddef.h(436): error: expected a ";"
/usr/include/x86_64-linux-gnu/c++/6/bits/c++config.h(202): error: expected a ";"

[...Full of error...]

---------------GCC-5------------------------
# make -j1
[  1%] Running C++/Python protocol buffer compiler on /tmp/caffe/src/caffe/proto/caffe.proto
Scanning dependencies of target proto
[  1%] Building CXX object src/caffe/CMakeFiles/proto.dir/__/__/include/caffe/proto/caffe.pb.cc.o
[  2%] Linking CXX static library ../../lib/libproto.a
[  2%] Built target proto
[  4%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile.dir/layers/cuda_compile_generated_eltwise_layer.cu.o
[  4%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile.dir/util/cuda_compile_generated_im2col.cu.o
[  4%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile.dir/util/cuda_compile_generated_math_functions.cu.o

[...Nothing wrong...]

> Looking at ppc64el now ...

Will test ppc64el later.
The upload of CUDA7.5 will unblock one of my ITP bug, thanks!

> 
> Andreas

[1] git.d.o debian-science/caffe
[2] install GCC-6 with aptitude



More information about the pkg-nvidia-devel mailing list