簡體   English   中英

在Ubuntu 14.04中安裝Caffe

[英]Caffe installation in ubuntu 14.04

我正在按照https://github.com/BVLC/caffe/wiki/Ubuntu-14.04-ec2-instance鏈接在我的機器上安裝caffe。 但是當我寫命令$ make all我得到這些錯誤

/usr/local/cuda/bin/nvcc -ccbin=g++ -Xcompiler -fPIC -DNDEBUG -O2 -I/usr/local/include/python2.7 -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/local/include -Ibuild/src -I./src -I./include -I/usr/local/cuda/include -gencode arch=compute_20,code=sm_20 -gencode arch=compute_20,code=sm_21 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -c src/caffe/util/math_functions.cu -o build/src/caffe/util/math_functions.cuo

Error 1:
src/caffe/util/math_functions.cu(140): error: calling a __host__ function("std::signbit<float> ") from a __global__ function("caffe::sgnbit_kernel<float> ") is not allowed

Error 2:
src/caffe/util/math_functions.cu(140): error: calling a __host__ function("std::signbit<double> ") from a __global__ function("caffe::sgnbit_kernel<double> ") is not allowed

2 errors detected in the compilation of "/tmp/tmpxft_00003368_00000000-12_math_functions.compute_35.cpp1.ii".
make: *** [build/src/caffe/util/math_functions.cuo] Error 2

我對此並不陌生,無法真正找出缺少的軟件包

(這適用於未合並的longjon caffe分支。)

在caffe / include / caffe / util / math_functions.hpp中

嘗試改變

using std::signbit;
DEFINE_CAFFE_CPU_UNARY_FUNC(sgnbit, y[i] = signbit(x[i])); 

// using std::signbit;
DEFINE_CAFFE_CPU_UNARY_FUNC(sgnbit, y[i] = std::signbit(x[i]));

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM