Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I can see following problems with your build:

  • you did not set compiler environment
  • you use sudo to build
  • setting compiler via CC and CXX environment do not always work correctly
  • you did not provide any versions: OpenCV? ICC?

And following concerns:

  • I don't think Caffe uses cv::cuda:: methods from OpenCV, so building OpenCV with CUDA support is not necessary
  • disabling IPP can affect performance of functions which are actually used by Caffe

I successfully built latest master version using the following script (ICC 2017.1.132):

. /opt/intel/compilers_and_libraries/linux/bin/compilervars.sh -arch intel64 -platform linux
pushd $BUILDDIR
cmake -GNinja \
    -DCMAKE_C_COMPILER=$(which icc) \
    -DCMAKE_CXX_COMPILER=$(which icc) \
    ../opencv
ninja
popd

Note: add -DCMAKE_INSTALL_PREFIX=/opt/opencv and run sudo ninja install after build to install the library to your paths

Note: using Ninja is optional, it works the same way as make -j <cpu-num> but faster