jiexiong2016 / GCNv2_SLAM

Real-time SLAM system with deep features
Other
769 stars 194 forks source link

libtorch question #54

Open liubamboo opened 3 years ago

liubamboo commented 3 years ago

hello, thank you for your great work. But when I build the libtorch 1.0.1 using command below:

git clone --recursive -b v1.0.1 https://github.com/pytorch/pytorch cd pytorch && mkdir build && cd build python ../tools/build_libtorch.py

I get a bug: -- Caffe2: CUDA detected: 9.0 -- Caffe2: CUDA nvcc is: /usr/local/cuda/bin/nvcc -- Caffe2: CUDA toolkit directory: /usr/local/cuda -- Caffe2: Header version is: 9.0 -- Found cuDNN: v7.5.1 (include: /usr/local/cuda/include, library: /usr/local/cuda/lib64/libcudnn.so.7) CMake Error at cmake/public/cuda.cmake:330 (message): CUDA 9.0 is not compatible with std::tuple from GCC version >= 6. Please upgrade to CUDA 9.2 or use the following option to use another version (for example):

-DCUDA_HOST_COMPILER=/usr/bin/gcc-5

Call Stack (most recent call first): cmake/Dependencies.cmake:656 (include) CMakeLists.txt:201 (include)

-- Configuring incomplete, errors occurred! See also "/home/n609/install/libtorch/pytorch/build/CMakeFiles/CMakeOutput.log". See also "/home/n609/install/libtorch/pytorch/build/CMakeFiles/CMakeError.log". Traceback (most recent call last): File "../tools/build_libtorch.py", line 30, in subprocess.check_call(command, universal_newlines=True, env=my_env) File "/home/n609/install/Anaconda/anaconda3/envs/py36-torch110-cuda90/lib/python3.6/subprocess.py", line 311, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['/home/n609/install/libtorch/pytorch/tools/build_pytorch_libs.sh', '--use-cuda', '--use-nnpack', '--use-mkldnn', '--use-qnnpack', 'caffe2']' returned non-zero exit status 1.

Can this project run on cuda 9.0? Can this project run on different version pytorch c++ api? my environment is : ubuntu 18.04, cuda 9.0, cudnn 7.5.1. Can anybody help me?