CUDA 8.0 compile error
panovr opened this issue · comments
Yili Zhao commented
py-RFCN-priv/caffe-priv/src/caffe/layers/box_annotator_ohem_layer.cu(50):
warning: lambda expressions are a C++11 feature
py-RFCN-priv/caffe-priv/src/caffe/layers/box_annotator_ohem_layer.cu(49):
error: a template argument may not reference a local type
detected during instantiation of "void caffe::BoxAnnotatorOHEMLayer<Dtype>::Forward_gpu(
const std::vector<caffe::Blob<Dtype> *, std::allocator<caffe::Blob<Dtype> *>> &, const
std::vector<caffe::Blob<Dtype> *, std::allocator<caffe::Blob<Dtype> *>> &) [with Dtype=float]"
(80): here
py-RFCN-priv/caffe-priv/src/caffe/layers/box_annotator_ohem_layer.cu(49):
error: a template argument may not reference a local type
detected during instantiation of "void caffe::BoxAnnotatorOHEMLayer<Dtype>::Forward_gpu(
const std::vector<caffe::Blob<Dtype> *, std::allocator<caffe::Blob<Dtype> *>> &, const
std::vector<caffe::Blob<Dtype> *, std::allocator<caffe::Blob<Dtype> *>> &) [with Dtype=double]"
(80): here
XIN commented
@panovr
because box_annotator_ohem_layer.cu need C++11 feature
So add . -std=c++11
. in your Makefile
or modify your_path/py-RFCN-priv/caffe-priv/CMakeLists.txt . line 48
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -Wall -std=c++11)
run
mkdir build
cd build
cmake ..
make all
make install
Hope to help you