Compiling caffe on win 10 with cuda 9 (unable to use cuda 8) and VS 2013 - change boost version

85 views
Skip to first unread message

Tharindu Mathew

unread,
Apr 13, 2018, 2:08:40 AM4/13/18
to Caffe Users
when I try to compile on windows it fails as boost 1.61 is not compatible with cuda 9. How do I change the boost version in cmake configuration? I changed it in dependencies.cmake and that results in this error:

CMake Error at C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1928 (message):
  Unable to find the requested Boost libraries.

  Boost version: 1.61.0

  Boost include path:
  C:/Users/blah/.caffe/dependencies/libraries_v140_x64_py27_1.1.0/libraries/include/boost-1_61


  Detected version of Boost is too old.  Requested version was 1.65 (or
  newer).
Call Stack (most recent call first):
  cmake/Dependencies.cmake:8 (find_package)
  CMakeLists.txt:80 (include)

Tharindu Mathew

unread,
Apr 13, 2018, 11:02:37 AM4/13/18
to Caffe Users
Here's how to do it:


1. Download boost version you want to some location (let's call this BOOST_PATH)

2. Edit the scripts/build_win.cmd cmake command as follows:
:: Configure using cmake and using the caffe-builder dependencies
:: Add -DCUDNN_ROOT=C:/Projects/caffe/cudnn-8.0-windows10-x64-v5.1/cuda ^
:: below to use cuDNN
cmake -G"!CMAKE_GENERATOR!" ^
      -DBLAS=Open ^
      -DCMAKE_BUILD_TYPE:STRING=%CMAKE_CONFIG% ^
       -DBUILD_SHARED_LIBS:BOOL=%CMAKE_BUILD_SHARED_LIBS% ^
       -DBUILD_python:BOOL=%BUILD_PYTHON% ^
       -DBUILD_python_layer:BOOL=%BUILD_PYTHON_LAYER% ^
       -DBUILD_matlab:BOOL=%BUILD_MATLAB% ^
       -DCPU_ONLY:BOOL=%CPU_ONLY% ^
       -DCOPY_PREREQUISITES:BOOL=1 ^
       -DINSTALL_PREREQUISITES:BOOL=1 ^
       -DUSE_NCCL:BOOL=!USE_NCCL! ^
       -DCUDA_ARCH_NAME:STRING=%CUDA_ARCH_NAME% ^
       -DBOOST_NO_BOOST_CMAKE=TRUE ^
       -DBOOST_ROOT=C:/boost_1_65_0 ^ :: The custom boost path version
       -DBOOST_LIBRARYDIR=C:/boost_1_65_0/lib64-msvc12.0 ^ :: The custom boost path library location
       "%~dp0\.."

Not the the options BOOST_ROOT, BOOST_NO_BOOST_CMAKE, BOOST_LIBRARY_DIR
Reply all
Reply to author
Forward
0 new messages