How to build Caffe with CUDA 9.0 on Windows 10

April 1, 2019



As I installed all patches (patch1, patch2, patch3, patch4) of CUDA 9.0 from Nvidia, I also encountered a compiler error from BOOST

%userprofile%\.caffe\dependencies\libaries_v140_x64_py27_1.1.0\libraries\include\boost-1_61\boost\config\compiler\nvcc.hpp

From its comment you know this macro is for pre-CUDA 7.5 and CUDA 9.0 cound go without this macro, just comment three line code, then run it again

ATTENTION your build environment is not the same as mine for example python version so the `libaries_v140_x64_py27_1.1.0` maybe a little different, just use your path output by `scripts\build_win.cmd`

After all these modification, you’ll build it successfully!

Bottoms up!