CMake Error at cmake/public/cuda.cmake:318 (message):
CUDA 9.1 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
.....
-- Configuring incomplete, errors occurred!
See also "/home/matthew/dev/pytorch/build/CMakeFiles/CMakeOutput.log".
See also "/home/matthew/dev/pytorch/build/CMakeFiles/CMakeError.log".
Failed to run 'bash ../tools/build_pytorch_libs.sh --use-cuda --use-fbgemm --use-nnpack --use-mkldnn --use-qnnpack caffe2'
网上有不少解决办法,参考:https://github.com/pytorch/pytorch/issues/14152
版本不对,大概是先卸载再安装,参考:
step1: remove the previous cuda
sudo apt-get --purge remove nvidia-cuda-toolkit
sudo apt autoremove #删除依赖文件
step2: install cudnn (this will install cudnn7_cuda9.2)
conda install cudnn
我是安装了多个版本,执行完第一步,再查看cuda版本,是11.2,问题解决