Closed liferlisiqi closed 6 years ago
Did you change the compilers paths of the gcc and nvcc compiler in the build.sh script to match the compilers in your machine?
Yes, I did. My version g++ 4.8 and cuda 9.0. At the beginning of compiling, there are several information show that both tow compiler is work well. All the errors occur after 50% are compile task is done and i see this [50%] Building CUDA object CMakeFiles/lattice_filter.dir/src/LatticeFilterkernel.cu.o
Ok, what system are you using? Linux, Windows, MAC? If you could provided me with the error log that would also help.
I use Linux, and this is all the error log, thank you very much!!!
/home/mc16/download_models/CRFasRNNLayer/permutohedral_lattice/src/LatticeFilterKernel.cu(88): error: operand types are incompatible ("int" and "void *")
/home/mc16/download_models/CRFasRNNLayer/permutohedral_lattice/src/LatticeFilterKernel.cu(89): error: expected an expression
/home/mc16/download_models/CRFasRNNLayer/permutohedral_lattice/src/LatticeFilterKernel.cu(94): error: operand types are incompatible ("int" and "void *")
/home/mc16/download_models/CRFasRNNLayer/permutohedral_lattice/src/LatticeFilterKernel.cu(95): error: expected an expression
/home/mc16/download_models/CRFasRNNLayer/permutohedral_lattice/src/LatticeFilterKernel.cu(88): error: label "vd" was referenced but not defined
/home/mc16/download_models/CRFasRNNLayer/permutohedral_lattice/src/PermutohedralLatticeGPU.cuh(461): error: no instance of function template "createLattice" matches the argument list
argument types are: (int, const float , float , MatrixEntry
/home/mc16/download_models/CRFasRNNLayer/permutohedral_lattice/src/PermutohedralLatticeGPU.cuh(464): error: no instance of function template "cleanHashTable" matches the argument list
argument types are: (
/home/mc16/download_models/CRFasRNNLayer/permutohedral_lattice/src/PermutohedralLatticeGPU.cuh(468): error: no instance of function template "splatCache" matches the argument list
argument types are: (int, const float , MatrixEntry
/home/mc16/download_models/CRFasRNNLayer/permutohedral_lattice/src/PermutohedralLatticeGPU.cuh(472): error: no instance of function template "blur" matches the argument list
argument types are: (
/home/mc16/download_models/CRFasRNNLayer/permutohedral_lattice/src/PermutohedralLatticeGPU.cuh(477): error: no instance of function template "slice" matches the argument list
argument types are: (int, float , MatrixEntry
/home/mc16/download_models/CRFasRNNLayer/permutohedral_lattice/src/PermutohedralLatticeGPU.cuh(461): error: no instance of function template "createLattice" matches the argument list
argument types are: (int, const double , double , MatrixEntry
/home/mc16/download_models/CRFasRNNLayer/permutohedral_lattice/src/PermutohedralLatticeGPU.cuh(464): error: no instance of function template "cleanHashTable" matches the argument list
argument types are: (
/home/mc16/download_models/CRFasRNNLayer/permutohedral_lattice/src/PermutohedralLatticeGPU.cuh(468): error: no instance of function template "splatCache" matches the argument list
argument types are: (int, const double , MatrixEntry
/home/mc16/download_models/CRFasRNNLayer/permutohedral_lattice/src/PermutohedralLatticeGPU.cuh(472): error: no instance of function template "blur" matches the argument list
argument types are: (
/home/mc16/download_models/CRFasRNNLayer/permutohedral_lattice/src/PermutohedralLatticeGPU.cuh(477): error: no instance of function template "slice" matches the argument list
argument types are: (int, double , MatrixEntry
15 errors detected in the compilation of "/tmp/tmpxft_00002c51_00000000-6_LatticeFilterKernel.cpp1.ii". make[2]: [CMakeFiles/lattice_filter.dir/src/LatticeFilterKernel.cu.o] Error 1 make[1]: [CMakeFiles/lattice_filter.dir/all] Error 2 make: *** [all] Error 2 cp: cannot stat ‘lattice_filter.so’: No such file or directory
I think I know what the problem is. The nvcc of CUDA 9.0 is incompatible with gcc 4.8. Since you need a CMAKE_CUDA_HOST_COMPILER as well as a CMAKE_CUDA_COMPILER to compile GPU code these two need to be compatible. Try using gcc 6 or higher, it will probably solve the problem. You can search the web to see which gcc compilers are compatible with which versions of CUDA.
Thanks very much. You are right, CUDA9.0 is incompatible with gcc 4.8, this should be the problem. I'll update gcc and try again.
hi, I have tried to use your source code to compiler lattice_filter.so, but there are so many error when I excute sh build.sh the final information is 15 errors detected in the compilation of "/tmp/tmpxft_00002c51_00000000-6_LatticeFilterkernal.cpp1.ii", could help me check where lead to there errors? Thank you