conner99 / caffe

Caffe: a fast open framework for deep learning.
http://caffe.berkeleyvision.org/
Other
72 stars 38 forks source link

GPU CUDA_9.0 error #44

Open mercury20160104 opened 6 years ago

mercury20160104 commented 6 years ago

Error 70 error C2292: 'boost::re_detail::perl_matcher<const char ,std::allocator<boost::sub_match<const char >>,boost::regex_traits<char,boost::w32_regex_traits>>': best case inheritance representation: 'virtual_inheritance' declared but 'single_inheritance' required D:\test\DL\vc12\caffe-ssd-microsoft\NugetPackages\boost.1.59.0.0\lib\native\include\boost\regex\v4\perl_matcher.hpp 346 1 libcaffe Error 86 error MSB3721: The command ""C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\bin\nvcc.exe" -gencode=arch=compute_35,code=\"sm_35,compute_35\" -gencode=arch=compute_52,code=\"sm_52,compute_52\" --use-local-env --cl-version 2013 -ccbin "D:\Development_Files\Microsoft Visual Studio 12.0\VC\bin\x86_amd64" -x cu -I"D:\test\DL\vc12\caffe-ssd-microsoft\NugetPackages\lmdb-v120-clean.0.9.14.0\build\native....\lib\native\include" -I"D:\test\DL\vc12\caffe-ssd-microsoft\NugetPackages\LevelDB-vc120.1.2.0.0\build\native../..//build/native/include/" -I"D:\test\DL\vc12\caffe-ssd-microsoft\NugetPackages\protobuf-v120.2.6.1\build\native../..//build/native/include/" -I"D:\test\DL\vc12\caffe-ssd-microsoft\NugetPackages\glog.0.3.3.0\build\native../..//build/native/include/" -I"D:\test\DL\vc12\caffe-ssd-microsoft\NugetPackages\gflags.2.1.2.1\build\native../..///build/native/include/" -I"D:\test\DL\vc12\caffe-ssd-microsoft\NugetPackages\boost.1.59.0.0\build\native....\lib\native\include\" -I"D:\test\DL\vc12\caffe-ssd-microsoft\NugetPackages\hdf5-v120-complete.1.8.15.2\build\native....\lib\native\include" -I"D:\test\DL\vc12\caffe-ssd-microsoft\NugetPackages\OpenBLAS.0.2.14.1\build\native....\lib\native\include" -I"D:\test\DL\vc12\caffe-ssd-microsoft\NugetPackages\OpenCV.2.4.10\build\native../../build/native/include/" -I"D:\test\DL\vc12\caffe-ssd-microsoft\caffe-ssd-microsoft\windows\libcaffe\....\src\" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\include" --keep-dir D:\test\DL\vc12\caffe-ssd-microsoft\caffe-ssd-microsoft\windows..\Build\Int\libcaffe\x64\Release -maxrregcount=0 --machine 64 --compile -cudart static -Xcudafe "--diag_suppress=exception_spec_override_incompat --diag_suppress=useless_using_declaration --diag_suppress=field_without_dll_interface" -D_SCL_SECURE_NO_WARNINGS -DGFLAGS_DLL_DECL= -DHAS_LMDB -DHAS_HDF5 -DHAS_OPENBLAS -DHAS_OPENCV -DNDEBUG -D_SCL_SECURE_NO_WARNINGS -DUSE_OPENCV -DUSE_LEVELDB -DUSE_LMDB -DUSE_CUDNN -D_UNICODE -DUNICODE -Xcompiler "/EHsc /W1 /nologo /Ox /FS /Zi /MD " -o D:\test\DL\vc12\caffe-ssd-microsoft\caffe-ssd-microsoft\windows..\Build\Int\libcaffe\x64\Release\detection_output_layer.cu.obj "D:\test\DL\vc12\caffe-ssd-microsoft\caffe-ssd-microsoft\src\caffe\layers\detection_output_layer.cu"" exited with code 2. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\BuildCustomizations\CUDA 9.0.targets 707 9 libcaffe

mercury20160104 commented 6 years ago

addtional :+1: cuda9.0 +cudnn v7 Result: It has been solved.

zchrissirhcz commented 5 years ago

My solution:

edit libraries_v120_x64_py27_1.1.0\libraries\include\boost-1_61\boost\regex\v4\perl_matcher.hpp, before#include <boost/regex/v4/iterator_category.hpp>, add:

#ifdef _MSC_VER
#pragma pointers_to_members( full_generality, single_inheritance )
#endif