Error building with Cuda9.0
Opened this issue · 5 comments
Here is the log:
[ 1%] Built target proto
[ 1%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile.dir/util/cuda_compile_generated_math_functions.cu.o
/home/jingweih/caffe-rc5/include/caffe/util/cudnn.hpp(112): error: too few arguments in function call
1 error detected in the compilation of "/tmp/tmpxft_00002801_00000000-4_math_functions.cpp4.ii".
CMake Error at cuda_compile_generated_math_functions.cu.o.cmake:266 (message):
Error generating file
/home/jingweih/bilateralNN/build/bin/src/caffe/CMakeFiles/cuda_compile.dir/util/./cuda_compile_generated_math_functions.cu.o
src/caffe/CMakeFiles/caffe.dir/build.make:469: recipe for target 'src/caffe/CMakeFiles/cuda_compile.dir/util/cuda_compile_generated_math_functions.cu.o' failed
make[5]: *** [src/caffe/CMakeFiles/cuda_compile.dir/util/cuda_compile_generated_math_functions.cu.o] Error 1
CMakeFiles/Makefile2:272: recipe for target 'src/caffe/CMakeFiles/caffe.dir/all' failed
make[4]: *** [src/caffe/CMakeFiles/caffe.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make[3]: *** [all] Error 2
CMakeFiles/CaffeUpstream.dir/build.make:111: recipe for target 'CaffeUpstream-prefix/src/CaffeUpstream-stamp/CaffeUpstream-build' failed
make[2]: *** [CaffeUpstream-prefix/src/CaffeUpstream-stamp/CaffeUpstream-build] Error 2
CMakeFiles/Makefile2:99: recipe for target 'CMakeFiles/CaffeUpstream.dir/all' failed
make[1]: *** [CMakeFiles/CaffeUpstream.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
How can I solve this issue? Thanks.
It seems this caffe version is not compatible with Cuda 9.0. Can you try using recent caffe version and 'manually' adding the 'bilateralNN' layers to that? You can follow these instructions in the readme file for manually adding the layers to recent caffe:
Manual way
Alternatively, you can manually copy all but caffe.proto
source files in bilateralNN
folder to the corresponding locations in your Caffe repository. Then, for merging the caffe.proto
file of bilateralNN
to your version of the caffe.proto
:
- the copy the lines 382-383 and 854-922 in
caffe.proto
to the correspondingcaffe.proto
file in the destination Caffe repository. - Change the parameter IDs for
PermutohedralParameter
andPixelFeatureParameter
based on the next availableLayerParameter
ID in your Caffe.
when i executed make -j
here is log:
[ 12%] Creating directories for 'CaffeUpstream'
[ 25%] Performing download step (git clone) for 'CaffeUpstream'
-- CaffeUpstream download command succeeded. See also /home/dlgroup/bilateralNN/build/tmp_caffe_clone/src/CaffeUpstream-stamp/CaffeUpstream-download-*.log
[ 50%] Performing patch step for 'CaffeUpstream'
[ 50%] No update step for 'CaffeUpstream'
-- Copying files from /home/dlgroup/bilateralNN/bilateralnn_code to /home/dlgroup/bilateralNN/build/tmp_caffe_clone/src/CaffeUpstream
-- [BilateralNN] copying file glog.cmake to /home/dlgroup/bilateralNN/build/tmp_caffe_clone/src/CaffeUpstream/cmake/External
-- [BilateralNN] copying file common.cuh to /home/dlgroup/bilateralNN/build/tmp_caffe_clone/src/CaffeUpstream/include/caffe
-- [BilateralNN] copying file permutohedral_layer.hpp to /home/dlgroup/bilateralNN/build/tmp_caffe_clone/src/CaffeUpstream/include/caffe/layers
-- [BilateralNN] copying file pixel_feature_layer.hpp to /home/dlgroup/bilateralNN/build/tmp_caffe_clone/src/CaffeUpstream/include/caffe/layers
-- [BilateralNN] copying file gauss_permutohedral.hpp to /home/dlgroup/bilateralNN/build/tmp_caffe_clone/src/CaffeUpstream/include/caffe/util
-- [BilateralNN] copying file new_math_utils.hpp to /home/dlgroup/bilateralNN/build/tmp_caffe_clone/src/CaffeUpstream/include/caffe/util
-- [BilateralNN] copying file permutohedral.hpp to /home/dlgroup/bilateralNN/build/tmp_caffe_clone/src/CaffeUpstream/include/caffe/util
-- [BilateralNN] copying file permutohedral_layer.cpp to /home/dlgroup/bilateralNN/build/tmp_caffe_clone/src/CaffeUpstream/src/caffe/layers
-- [BilateralNN] copying file permutohedral_layer.cu to /home/dlgroup/bilateralNN/build/tmp_caffe_clone/src/CaffeUpstream/src/caffe/layers
-- [BilateralNN] copying file pixel_feature_layer.cpp to /home/dlgroup/bilateralNN/build/tmp_caffe_clone/src/CaffeUpstream/src/caffe/layers
-- [BilateralNN] copying file pixel_feature_layer.cu to /home/dlgroup/bilateralNN/build/tmp_caffe_clone/src/CaffeUpstream/src/caffe/layers
Files "./left.proto.tmp" to "./right.proto.tmp" are different.
-- [BilateralNN] backing up previous 'caffe.proto' to 'caffe.proto.bak'
-- [BilateralNN] copying file caffe.proto to /home/dlgroup/bilateralNN/build/tmp_caffe_clone/src/CaffeUpstream/src/caffe/proto
-- [BilateralNN] copying file test_permutohedral_layer.cpp to /home/dlgroup/bilateralNN/build/tmp_caffe_clone/src/CaffeUpstream/src/caffe/test
-- [BilateralNN] copying file test_pixel_feature_layer.cpp to /home/dlgroup/bilateralNN/build/tmp_caffe_clone/src/CaffeUpstream/src/caffe/test
-- [BilateralNN] copying file gauss_permutohedral.cpp to /home/dlgroup/bilateralNN/build/tmp_caffe_clone/src/CaffeUpstream/src/caffe/util
-- [BilateralNN] copying file new_math_utils.cpp to /home/dlgroup/bilateralNN/build/tmp_caffe_clone/src/CaffeUpstream/src/caffe/util
-- [BilateralNN] copying file new_math_utils.cu to /home/dlgroup/bilateralNN/build/tmp_caffe_clone/src/CaffeUpstream/src/caffe/util
-- [BilateralNN] copying file permutohedral.cpp to /home/dlgroup/bilateralNN/build/tmp_caffe_clone/src/CaffeUpstream/src/caffe/util
-- [BilateralNN] copying file permutohedral.cu to /home/dlgroup/bilateralNN/build/tmp_caffe_clone/src/CaffeUpstream/src/caffe/util
[ 62%] Performing configure step for 'CaffeUpstream'
CMake Error at /home/dlgroup/bilateralNN/build/tmp_caffe_clone/src/CaffeUpstream-stamp/CaffeUpstream-configure-.cmake:16 (message):
Command failed: 1
'/usr/bin/cmake' '-DCUDA_NVCC_FLAGS= -D_FORCE_INLINES' '-C/home/dlgroup/bilateralNN/build/tmp_caffe_clone/tmp/CaffeUpstream-cache-.cmake' '-GUnix Makefiles' '/home/dlgroup/bilateralNN/build/tmp_caffe_clone/src/CaffeUpstream'
See also
/home/dlgroup/bilateralNN/build/tmp_caffe_clone/src/CaffeUpstream-stamp/CaffeUpstream-configure-*.log
CMakeFiles/CaffeUpstream.dir/build.make:106: recipe for target 'tmp_caffe_clone/src/CaffeUpstream-stamp/CaffeUpstream-configure' failed
make[2]: *** [tmp_caffe_clone/src/CaffeUpstream-stamp/CaffeUpstream-configure] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/CaffeUpstream.dir/all' failed
make[1]: *** [CMakeFiles/CaffeUpstream.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
could you please tell me how to fix it?
Thank you!!
Did you try manual way of adding layers into your caffe, as described in a message above?
Actually I don't really understand part of the instruction about the manual way. you mean I just directly copy the bilateralNN to the Caffe repository without executing Cmake command in the build file?
Yes, copy the relevant layers and use standard caffe cmake and installation, not the cmake given here.