카테고리 없음
caffe for windows installation
Roy로이
2018. 1. 3. 13:27
https://github.com/BVLC/caffe/tree/windows 참조
trouble shooting
1. cuda version 관련
위 깃헙에서 사용한 cuda 버전은 8.0
현재 nvidia 최신 버전은 9.1
9.1로 설치 진행하면 빌드에서 오류 발생(nvcc.hpp 관련 오류)
해결
diff --git a/include/boost/config/compiler/nvcc.hpp b/include/boost/config/compiler/nvcc.hpp index b31d4f4..f21b9b5 100644 --- a/include/boost/config/compiler/nvcc.hpp +++ b/include/boost/config/compiler/nvcc.hpp @@ -11,6 +11,13 @@ # define BOOST_COMPILER "NVIDIA CUDA C++ Compiler" #endif +#if defined(__CUDACC_VER_MAJOR__) && defined(__CUDACC_VER_MINOR__) && defined(__CUDACC_VER_BUILD__) +# define BOOST_CUDA_VERSION __CUDACC_VER_MAJOR__ * 1000000 + __CUDACC_VER_MINOR__ * 10000 + __CUDACC_VER_BUILD__ +#else +// We don't really know what the CUDA version is, but it's definitely before 7.5: +# define BOOST_CUDA_VERSION 7000000 +#endif + // NVIDIA Specific support // BOOST_GPU_ENABLED : Flag a function or a method as being enabled on the host and device #define BOOST_GPU_ENABLED __host__ __device__ @@ -19,14 +26,33 @@ // https://svn.boost.org/trac/boost/ticket/11897 // This is fixed in 7.5. As the following version macro was introduced in 7.5 an existance // check is enough to detect versions < 7.5 -#if !defined(__CUDACC_VER__) || (__CUDACC_VER__ < 70500) +#if BOOST_CUDA_VERSION < 7050000 # define BOOST_NO_CXX11_VARIADIC_TEMPLATES #endif // The same bug is back again in 8.0: -#if (__CUDACC_VER__ > 80000) && (__CUDACC_VER__ < 80100) +#if (BOOST_CUDA_VERSION > 8000000) && (BOOST_CUDA_VERSION < 8010000) # define BOOST_NO_CXX11_VARIADIC_TEMPLATES #endif // Most recent CUDA (8.0) has no constexpr support in msvc mode: #if defined(_MSC_VER) # define BOOST_NO_CXX11_CONSTEXPR #endif + +#ifdef __CUDACC__ +// +// When compiing .cu files, there's a bunch of stuff that doesn't work with msvc: +// +#if defined(_MSC_VER) +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +# define BOOST_NO_CXX11_UNICODE_LITERALS +#endif +// +// And this one effects the NVCC front end, +// See https://svn.boost.org/trac/boost/ticket/13049 +// +#if (BOOST_CUDA_VERSION >= 8000000) && (BOOST_CUDA_VERSION < 8010000) +# define BOOST_NO_CXX11_NOEXCEPT +#endif + +#endif
2. 디펜던시 알아서 설치해주는 명령어 scripts\build_win.cmd 에서 컴파일러 에러 발생하는 경우
이유는 잘 모르겠는데, visual studio(VS2013용 개발자 명령 프롬프트) 켜서 실행하니까 해결 됨