Open zerovirus123 opened 4 years ago
In Issue https://github.com/clab/dynet/issues/1598 they proposed to use at least CMake 3.12.2. Did you try this?
I used CMake 3.17 installed using snap. Do you think that could be the issue?
Sorry I have no clue. I tried myself today with cmake 3.17.3 CUDA 10.2 CUDNN 8.0.1.13 and get the following errors: /home/cyril/projects/dynet/dynet/cudnn-ops.cu(107): error: identifier "CUDNN_CONVOLUTION_FWD_PREFER_FASTEST" is undefined
/home/cyril/projects/dynet/dynet/cudnn-ops.cu(107): error: identifier "cudnnGetConvolutionForwardAlgorithm" is undefined
/home/cyril/projects/dynet/dynet/cudnn-ops.cu(190): error: identifier "CUDNN_CONVOLUTION_BWD_DATA_PREFER_FASTEST" is undefined
/home/cyril/projects/dynet/dynet/cudnn-ops.cu(190): error: identifier "cudnnGetConvolutionBackwardDataAlgorithm" is undefined
/home/cyril/projects/dynet/dynet/cudnn-ops.cu(209): error: identifier "CUDNN_CONVOLUTION_BWD_FILTER_PREFER_FASTEST" is undefined
/home/cyril/projects/dynet/dynet/cudnn-ops.cu(209): error: identifier "cudnnGetConvolutionBackwardFilterAlgorithm" is undefined
6 errors detected in the compilation of "/tmp/tmpxft_00004787_00000000-6_cudnn-ops.cpp1.ii". CMake Error at dynet_generated_cudnn-ops.cu.o.Release.cmake:276 (message): Error generating file /home/cyril/projects/dynet/build_cudnn_release/dynet/CMakeFiles/dynet.dir//./dynet_generated_cudnn-ops.cu.o
dynet/CMakeFiles/dynet.dir/build.make:625: recipe for target 'dynet/CMakeFiles/dynet.dir/dynet_generated_cudnn-ops.cu.o' failed
Does this look similar to yours?
I fixed my above errors. I don't know if this also fixes your errors. But with the following versions and compile flags I can compile dynet and it runs well: System: Ubuntu 18.04 LTS Compiler: gcc 8.4.0 cmake 3.17.3 CUDA 10.2.89-440.33.01_1.0-1 CUDNN 8.0.1.13 Eigen: 3.3.90 MKL: 2020.0.166
Cmake options (maybe you have different installation paths and GPU aschitecture): -DCMAKE_BUILD_TYPE=Release -DRELEASE_OPT_LEVEL=3 -DCMAKE_CXX_FLAGS="-Wno-invalid-partial-specialization -Wno-c++11-narrowing " -DEIGEN3_INCLUDE_DIR=/usr/local/include/eigen3 -DMKL=TRUE -DMKL_ROOT=/opt/intel/compilers_and_libraries_2020.0.166/linux/mkl -DENABLE_BOOST=ON -DBACKEND=cuda -DCUDA_ARCH=75
With the above Eigen version you will get millions of warnings. But nevertheless it works well.
I followed the instructions outlined in Dynet docs. These are my setups.
CMake Command cmake .. -DEIGEN3_INCLUDE_DIR=/usr/local/include/eigen -DENABLE_CPP_EXAMPLES=ON -DBACKEND=cuda -DCUDNN_ROOT=/usr/local/cuda/lib64 -DENABLE_BOOST=ON -DPYTHON=
which python
Running the CMake produces the following output.
I could not find out why CMAKE_HAVE_LIBC_PTHREAD failed and pthread_create could not be found in the CUDA backend. However, I proceeded to run make anyways.
Here is the output from make -j 12.
make.log
The very end of the log showed that make failed because of the following lines.
Does anyone have an idea as to what caused this? Thanks.