naibaf7 / caffe

Caffe: a fast open framework for deep learning. With OpenCL and CUDA support.
http://caffe.berkeleyvision.org/
Other
85 stars 20 forks source link

Unterminated #ifndef CAFFE_CONFIG_HPP_ #64

Closed psyhtest closed 7 years ago

psyhtest commented 7 years ago

When installing Caffe with libDNN via CK:

$ ck install package:lib-caffe-bvlc-opencl-libdnn-clblast-universal

I get a dozen of errors like:

[  4%] Building CXX object src/caffe/CMakeFiles/caffe.dir/greentea/greentea_math_functions.cpp.o
In file included from /home/anton/CK_TOOLS/lib-caffe-bvlc-opencl-libdnn-clblast-trunk-gcc-5.4.0-linux-64/src/include/caffe/common.hpp:5:0,
                 from /home/anton/CK_TOOLS/lib-caffe-bvlc-opencl-libdnn-clblast-trunk-gcc-5.4.0-linux-64/src/src/caffe/greentea/cl_kernels.cpp:2:
/home/anton/CK_TOOLS/lib-caffe-bvlc-opencl-libdnn-clblast-trunk-gcc-5.4.0-linux-64/obj/caffe_config.h:1:0: error: unterminated #ifndef
 #ifndef CAFFE_CONFIG_HPP_
 ^

Indeed, this (presumably generated) header file has an unterminated #ifndef:

#ifndef CAFFE_CONFIG_HPP_
#define CAFFE_CONFIG_HPP_

/* Sources directory */
#define SOURCE_FOLDER "/home/anton/CK_TOOLS/lib-caffe-bvlc-opencl-libdnn-clblast-trunk-gcc-5.4.0-linux-64/src"

/* Binaries directory */
#define BINARY_FOLDER "/home/anton/CK_TOOLS/lib-caffe-bvlc-opencl-libdnn-clblast-trunk-gcc-5.4.0-linux-64/obj"

/* This is an absolute path so that we can run test from any build
 * directory */
#define ABS_TEST_DATA_DIR "/home/anton/CK_TOOLS/lib-caffe-bvlc-opencl-libdnn-clblast-trunk-gcc-5.4.0-linux-64/src/src/caffe/test/test_data/"

/* Test device */
#define CUDA_TEST_DEVICE 

Please see here how CK configures the build via CMake.

psyhtest commented 7 years ago

OK, this again comes from upstream merge - one #endif removed too many!

naibaf7 commented 7 years ago

@psyhtest Ok thanks, will be fixed ASAP. Didn't catch that one, it compiled fine for me.

psyhtest commented 7 years ago

@naibaf7 Thanks for fixing this so quickly! What would you think about setting up Travis to build several Caffe variants via CK on commit?

naibaf7 commented 7 years ago

I'm not sure it needs to be via CK, but that's beside the point. What's holding me back from setting up any such system is the time, cost and availability (Travis systems with a variation of GPUs, for example). I'd need to compile and test so many variants of compilation/settings that it's currently not in my time to do so. If you can set it up for us, then sure.