Hi Debian-Science,
Well, seems that the compiling of caffe-cuda is a little tricky.
Initially I can't build caffe-cuda on my machine[1] because
NVCC has trouble compiling *.cu sources with g++-4.9 [2]
Following possibly useful info provided by caffe users [3][4][6]
and other resources [5], I tried several compilers:
* g++-4.9/stable,stable,now 4.9.2-10
Fail with the initial error [2], both make and cmake
* g++-4.8/stable,stable,now 4.8.4-1
Fail with same error as [2], both make and cmake
* g++-4.6/unstable,now 4.6.4-7
Make:
Success, build without error, with *unpatched* Makefile;
cmake:
Success, with -DCMAKE_CXX_COMPILER=g++-4.6 -DCMAKE_C_COMPILER=gcc-4.6
* g++-5/unstable 5.2.1-14 amd64
Not yet tested, unwilling to install g++-5 from Sid on Jessie.
Soon I'll do a test build of caffe-cuda on Sid + g++-5.
Just now I have pushed the compiling way of caffe-cuda to caffe repo,
as the comment in d/rules.
===============================================================================
Another thing is I found that, due to lack of experience I have trouble handling
sources that need to be compiled once or twice according to architecture
$(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
I don't know if following way writing rules is proper.
However I scanned the debian directory of linux kernel
(which is the source that need to be compiled many times)
and learned nothing because it's too complicated :-(
---begin pseudo code----------------------------
%:
dh $@ --parallel \
--buildsystem=cmake \
--builddirectory=${CAFFE_CPU_BUILDDIR}
if build_arch is ( i386 | amd64 )
dh $@ --parallel \
--buildsystem=cmake \
--builddirectory=${CAFFE_CUDA_BUILDDIR}
endif
[...]
---end pseudo code------------------------------
(caffe-cuda only make sense on i386 and amd64)
caffe-cuda and caffe-cpu are build at separate directories,
as the current rules said:
caffe-cuda and caffe-cpu are build at separate directories,
as current rules said:
export CAFFE_CPU_BUILDDIR="caffe_cpu_build"
#export CAFFE_CUDA_BUILDDIR="caffe_cuda_build"
Any advice?
Thank you ;-)
[1] Debian jessie (stable) + gcc 4.9 + g++ 4.9 + cuda 6.0.37
[2] https://github.com/BVLC/caffe/issues/2638
[3] https://github.com/BVLC/caffe/issues/769
[4] https://github.com/BVLC/caffe/issues/337
[5] https://code.google.com/p/thrust/issues/detail?id=359#c5
[6] https://github.com/BVLC/caffe/issues/27
--
.''`. Lumin
: :' :
`. `'
`- 638B C75E C1E5 C589 067E 35DE 6264 5EB3 5F68 6A8A
Attachment:
signature.asc
Description: This is a digitally signed message part