Open mf27 opened 6 years ago
I have met the same error
I'm also having the same problem.
CMake Error at /home/usr/anaconda2/envs/pytorch/share/cmake-3.9/Modules/FindPackageHandleStandardArgs.cmake:137 (message): Could NOT find CUDA (missing: CUDA_INCLUDE_DIRS) (found suitable version "9.1", minimum required is "7.0") Call Stack (most recent call first): /home/usr/anaconda2/envs/pytorch/share/cmake-3.9/Modules/FindPackageHandleStandardArgs.cmake:377 (_FPHSA_FAILURE_MESSAGE)
I solved this error by add the following code into bashrc and profile
export PATH=/usr/local/cuda-9.0/bin:$PATH export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64$LD_LIBRARY_PATH export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/disk4/yesenmao/home/cudnn5/lib64
@small-yellow-duck and I realized the problem was that when you install CUDA on Fedora from the Negativo17 repository, the correct CUDA include dir is /usr/include/cuda
. CMAKE expects the path to end in .../include
.
For anyone else facing this issue, we solved it by creating a dummy CUDA_HOME
tree:
mkdir -p ~/cuda-dummy
cd ~/cuda-dummy
ln -s /usr/bin bin
ln -s /usr/lib64 lib
ln -s /usr/lib64 lib64
ln -s /usr/include/cuda include
ln -s /usr/share/cuda share
and adding export CUDA_HOME=$HOME/cuda-dummy
to .bashrc
.
Not sure if there's a bug in FindCUDA
here — it was impossible to specify the correct include dir to CMAKE, either by setting a CUDA_INCLUDE_DIRS=/usr/include/cuda
environment variable, or passing -DCUDA_INCLUDE_DIRS=/usr/include/cuda
on the CMAKE command line. No matter what we did, CMAKE claimed the variable wasn't set. But it seems like specifying it should be allowed.
Try CUDA_INC_PATH
instead of CUDA_INCLUDE_DIRS
and add
TORCH_NVCC_FLAGS=-D__CUDA_NO_HALF_OPERATORS__
to compile using cuda 9.1 that the Negativo17 repository provides
I have Ubuntu 16.04, CUDA 9.0. I followed the installation steps, and after running ./install.sh I get this error:
I have tried setting the variables CUDA_INCLUDE_DIRS, CUDA_CUDART_LIBRARY and CUDA_HOME, and it didn't help. Did I miss some necessary steps before the installation?