我尝试在计算机(Ubuntu 17.1,CUDA 9.2)上编译caffe2,但是在链接期间仍然出现此错误:
[ 72%] Built target caffe2
[ 72%] Building NVCC (Device) object caffe2/CMakeFiles/caffe2_gpu.dir/sgd/caffe2_gpu_generated_yellowfin_op_gpu.cu.o
/home/john/pytorch/caffe2/sgd/yellowfin_op.h: In constructor ‘caffe2::YellowFinOp<T, Context>::YellowFinOp(const caffe2::OperatorDef&, caffe2::Workspace*)’:
/home/john/pytorch/caffe2/sgd/yellowfin_op.h:20:171: error: ‘GetSingleArgument<int>’ is not a member of ‘caffe2::YellowFinOp<T, Context>’
YellowFinOp(const OperatorDef& operator_def, Workspace* ws)
^
/home/john/pytorch/caffe2/sgd/yellowfin_op.h:20:259: error: ‘GetSingleArgument<int>’ is not a member of ‘caffe2::YellowFinOp<T, Context>’
YellowFinOp(const OperatorDef& operator_def, Workspace* ws)
^
/home/john/pytorch/caffe2/sgd/yellowfin_op.h:20:347: error: ‘GetSingleArgument<bool>’ is not a member of ‘caffe2::YellowFinOp<T, Context>’
YellowFinOp(const OperatorDef& operator_def, Workspace* ws)
^
At global scope:
cc1plus: warning: unrecognized command line option ‘-Wno-aligned-allocation-unavailable’
cc1plus: warning: unrecognized command line option ‘-Wno-inconsistent-missing-override’
cc1plus: warning: unrecognized command line option ‘-Wno-unused-private-field’
cc1plus: warning: unrecognized command line option ‘-Wno-unknown-warning-option’
cc1plus: warning: unrecognized command line option ‘-Wno-typedef-redefinition’
cc1plus: warning: unrecognized command line option ‘-Wno-invalid-partial-specialization’
CMake Error at caffe2_gpu_generated_yellowfin_op_gpu.cu.o.Release.cmake:279 (message):
Error generating file
/home/john/pytorch/build/caffe2/CMakeFiles/caffe2_gpu.dir/sgd/./caffe2_gpu_generated_yellowfin_op_gpu.cu.o
caffe2/CMakeFiles/caffe2_gpu.dir/build.make:889: recipe for target 'caffe2/CMakeFiles/caffe2_gpu.dir/sgd/caffe2_gpu_generated_yellowfin_op_gpu.cu.o' failed
make[2]: *** [caffe2/CMakeFiles/caffe2_gpu.dir/sgd/caffe2_gpu_generated_yellowfin_op_gpu.cu.o] Error 1
CMakeFiles/Makefile2:1441: recipe for target 'caffe2/CMakeFiles/caffe2_gpu.dir/all' failed
make[1]: *** [caffe2/CMakeFiles/caffe2_gpu.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
这是我的系统摘要:
-CMake版本:3.9.1
-CMake命令:/ usr / bin / cmake
-Git版本:v0.1.11-9044-g9c426797a
-系统:Linux
-C ++编译器:/ usr / bin / c ++
-C ++编译器版本:7.2.0
-BLAS:本征
-CXX标志:-fvisibility-inlines-hidden -DONNX_NAMESPACE = onnx_c2 -O2 -fPIC -Wno-narrowing -Wno-invalid-partialspecialization -Wall -Wextra -Wno-missing-field-initializers -Wno-type -limits -Wno-typedef-redefinition -Wno-unknown-warning-option -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused -私有字段-Wno未使用的结果-Wno不一致的丢失覆盖-Wno对齐的分配不可用-Wno-error =弃用的声明-faligned-new
-构建类型:发布 -编译定义: -CMAKE_PREFIX_PATH: -CMAKE_INSTALL_PREFIX:/ usr / local
- -BUILD_CAFFE2:开 -BUILD_ATEN:关闭 -BUILD_BINARY:开 -BUILD_CUSTOM_PROTOBUF:ON -链接本地协议 -BUILD_DOCS:OFF -BUILD_PYTHON:ON -Python版本:2.7.14 -Python包括:/usr/include/python2.7 -BUILD_SHARED_LIBS:开 -BUILD_TEST:关闭 -USE_ASAN:关闭 -USE_ATEN:关闭 -USE_CUDA:开 -CUDA静态链接:关 -USE_CUDNN:开 -CUDA版本:9.2 -cuDNN版本:7.1.4 -CUDA根目录:/ usr / local / cuda -CUDA库:/usr/lib/x86_64-linux-gnu/libcuda.so -cudart库:/usr/local/cuda/lib64/libcudart_static.a; -pthread; dl; /usr/lib/x86_64-linux-gnu/librt.so -cublas库:/usr/local/cuda/lib64/libcublas.so;/usr/local/cuda/lib64/libcublas_device.a -cufft库:/usr/local/cuda/lib64/libcufft.so -curand库:/usr/local/cuda/lib64/libcurand.so -cuDNN库:/usr/lib/x86_64-linux-gnu/libcudnn.so -nvrtc:/usr/lib/x86_64-linux-gnu/libnvrtc.so -CUDA包含路径:/ usr / local / cuda / include -NVCC可执行文件:/ usr / local / cuda / bin / nvcc -CUDA主机编译器:/ usr / bin / cc -USE_TENSORRT:关闭 -USE_ROCM:关闭 -USE_EIGEN_FOR_BLAS:开 -USE_FFMPEG:关闭 -USE_GFLAGS:开 -USE_GLOG:开 -USE_GLOO:开 -USE_GLOO_IBVERBS:关闭 -USE_LEVELDB:开 -LevelDB版本:1.20 -Snappy版本:.. -USE_LITE_PROTO:关闭 -USE_LMDB:开 -LMDB版本:0.9.21 -USE_METAL:关闭 -USE_MKL: -USE_MOBILE_OPENGL:关闭 -USE_MPI:开 -USE_NCCL:开 -USE_SYSTEM_NCCL:关闭 -USE_NERVANA_GPU:关闭 -USE_NNPACK:开 -USE_OBSERVERS:开 -USE_OPENCL:关闭 -USE_OPENCV:开 -OpenCV版本:3.1.0 -USE_OPENMP:关闭 -USE_PROF:关闭 -USE_REDIS:关闭 -USE_ROCKSDB:关闭 -USE_ZMQ:关闭 -公共依赖项:线程::线程; gflags; glog :: glog -私有依赖项:nnpack; cpuinfo; /usr/lib/x86_64-linux-gnu/liblmdb.so; /usr/lib/x86_64-linux-gnu/libleveldb.so; / usr / lib / x86_64-linux-gnu / libsnappy.so; /usr/lib/x86_64-linux-gnu/libnuma.so; opencv_core; opencv_highgui; opencv_imgproc; opencv_imgcodecs; opencv_videoio; opencv_video; / usr / lib / x86_64-linux-gnu / openmpi / lib / libmpi_c。 /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so;gloo;gcc_s;gcc;dl -配置完成
我做错了什么吗?我不知道该如何解决。
感谢您的帮助