MiguelMonteiro / permutohedral_lattice

Permutohedral Lattice C++/CUDA implementation + TensorFlow Op (CPU/GPU)
83 stars 18 forks source link

cuda_runtime.h: No such file or directory #25

Closed gvalvano closed 4 years ago

gvalvano commented 4 years ago

Hello! thanks for sharing this code! 😁 😁

Unfortunately, I cannot compile the code. When I run bash build.sh I obtain the following error:

-- The CXX compiler identification is GNU 5.5.0 -- The CUDA compiler identification is NVIDIA 10.1.243 -- Check for working CXX compiler: /usr/bin/g++-5 -- Check for working CXX compiler: /usr/bin/g++-5 -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Check for working CUDA compiler: /home/gabriele/venvs/conda/miniconda3/envs/tf114/bin/nvcc -- Check for working CUDA compiler: /home/gabriele/venvs/conda/miniconda3/envs/tf114/bin/nvcc -- works -- Detecting CUDA compiler ABI info -- Detecting CUDA compiler ABI info - done -- Configuring done -- Generating done -- Build files have been written to: path/to/crf_as_rnn/permutohedral_lattice/build_dir Scanning dependencies of target lattice_filter [ 25%] Building CXX object CMakeFiles/lattice_filter.dir/src/LatticeFilterKernel.cpp.o In file included from path/to/crf_as_rnn/permutohedral_lattice/src/LatticeFilterKernel.h:24:0, from path/to/crf_as_rnn/permutohedral_lattice/src/LatticeFilterKernel.cpp:21: path/to/crf_as_rnn/permutohedral_lattice/src/DeviceMemoryAllocator.h:27:26: fatal error: cuda_runtime.h: No such file or directory compilation terminated. CMakeFiles/lattice_filter.dir/build.make:62: recipe for target 'CMakeFiles/lattice_filter.dir/src/LatticeFilterKernel.cpp.o' failed make[2]: [CMakeFiles/lattice_filter.dir/src/LatticeFilterKernel.cpp.o] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/lattice_filter.dir/all' failed make[1]: [CMakeFiles/lattice_filter.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2

In particular, I use a conda virtual environment with tensorflow 1.14 (at /home/gabriele/venvs/conda/miniconda3/envs/tf114), and I have CUDA Version: 10.2. Inside the build.sh, I modified the following variables:

CUDA_COMPILER=$CONDA_PREFIX/bin/nvcc CXX_COMPILER=/usr/bin/g++-5 CUDA_INCLUDE=$CONDA_PREFIX/lib/python3.7/site-packages/tensorflow/include

Any idea what could raise the error? It seems there is no cuda_runtime.h

Thanks a lot!

MiguelMonteiro commented 4 years ago

Hello, can you try compiling with CUDA 8 and C++ compiler g++-4.8 This is an old project and I am no longer supporting it, but it should work with older versions of CUDA.