Nerei / kinfu_remake

Optimized and reworked version of Kinfu
BSD 3-Clause "New" or "Revised" License
339 stars 125 forks source link

compile with cuda 10.2 #38

Open OshriHalimi opened 3 years ago

OshriHalimi commented 3 years ago

I'm trying to compile the code on my Ubuntu 18.04 LTS machine, with cuda=10.2, Nvidia driver version=440.33.01. I suspect the code is not compatible with cuda 10. Cuda 9 is not officially supported on Ubuntu 18.04 so I cannot test the compilation with cuda 9. I'm attaching the compilation output below. Is there a way to make the project compile with cuda>=10? I'll appreciate your help!

(base) smosesli@smosesli-gpu:~/dynamicfusion$ make -j16 [ 5%] Building NVCC (Device) object kfusion/CMakeFiles/kfusion.dir/src/cuda/kfusion_generated_tsdf_volume.cu.o [ 11%] Building NVCC (Device) object kfusion/CMakeFiles/kfusion.dir/src/cuda/kfusion_generated_imgproc.cu.o [ 16%] Building NVCC (Device) object kfusion/CMakeFiles/kfusion.dir/src/cuda/kfusion_generated_proj_icp.cu.o In file included from /home/smosesli/dynamicfusion/kfusion/src/cuda/imgproc.cu:1:0: /usr/local/cuda/include/host_defines.h:54:2: warning: #warning "host_defines.h is an internal header file and must not be used directly. This file will be removed in a future CUDA release. Please use cuda_runtime_api.h or cuda_runtime.h instead." [-Wcpp]

warning "host_defines.h is an internal header file and must not be used directly. This file will be removed in a future CUDA release. Please use cuda_runtime_api.h or cuda_runtime.h instead."

^~~ In file included from /home/smosesli/dynamicfusion/kfusion/src/cuda/imgproc.cu:1:0: /usr/local/cuda/include/host_defines.h:54:2: warning: #warning "host_defines.h is an internal header file and must not be used directly. This file will be removed in a future CUDA release. Please use cuda_runtime_api.h or cuda_runtime.h instead." [-Wcpp]

warning "host_defines.h is an internal header file and must not be used directly. This file will be removed in a future CUDA release. Please use cuda_runtime_api.h or cuda_runtime.h instead."

^~~ In file included from /home/smosesli/dynamicfusion/kfusion/src/cuda/imgproc.cu:1:0: /usr/local/cuda/include/host_defines.h:54:2: warning: #warning "host_defines.h is an internal header file and must not be used directly. This file will be removed in a future CUDA release. Please use cuda_runtime_api.h or cuda_runtime.h instead." [-Wcpp]

warning "host_defines.h is an internal header file and must not be used directly. This file will be removed in a future CUDA release. Please use cuda_runtime_api.h or cuda_runtime.h instead."

^~~ In file included from /home/smosesli/dynamicfusion/kfusion/src/cuda/imgproc.cu:1:0: /usr/local/cuda/include/host_defines.h:54:2: warning: #warning "host_defines.h is an internal header file and must not be used directly. This file will be removed in a future CUDA release. Please use cuda_runtime_api.h or cuda_runtime.h instead." [-Wcpp]

warning "host_defines.h is an internal header file and must not be used directly. This file will be removed in a future CUDA release. Please use cuda_runtime_api.h or cuda_runtime.h instead."

^~~ In file included from /home/smosesli/dynamicfusion/kfusion/src/cuda/imgproc.cu:1:0: /usr/local/cuda/include/host_defines.h:54:2: warning: #warning "host_defines.h is an internal header file and must not be used directly. This file will be removed in a future CUDA release. Please use cuda_runtime_api.h or cuda_runtime.h instead." [-Wcpp]

warning "host_defines.h is an internal header file and must not be used directly. This file will be removed in a future CUDA release. Please use cuda_runtime_api.h or cuda_runtime.h instead."

^~~ In file included from /home/smosesli/dynamicfusion/kfusion/src/cuda/imgproc.cu:1:0: /usr/local/cuda/include/host_defines.h:54:2: warning: #warning "host_defines.h is an internal header file and must not be used directly. This file will be removed in a future CUDA release. Please use cuda_runtime_api.h or cuda_runtime.h instead." [-Wcpp]

warning "host_defines.h is an internal header file and must not be used directly. This file will be removed in a future CUDA release. Please use cuda_runtime_api.h or cuda_runtime.h instead."

^~~ /home/smosesli/dynamicfusion/kfusion/src/cuda/temp_utils.hpp(585): warning: function "ballot" /usr/local/cuda/include/sm_20_intrinsics.h(405): here was declared deprecated ("ballot() is deprecated in favor of __ballot_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

/home/smosesli/dynamicfusion/kfusion/src/cuda/temp_utils.hpp(597): warning: function "all" /usr/local/cuda/include/device_atomic_functions.h(179): here was declared deprecated ("all() is deprecated in favor of __all_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

/home/smosesli/dynamicfusion/kfusion/src/cuda/temp_utils.hpp(585): warning: function "ballot" /usr/local/cuda/include/sm_20_intrinsics.h(405): here was declared deprecated ("ballot() is deprecated in favor of __ballot_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

/home/smosesli/dynamicfusion/kfusion/src/cuda/temp_utils.hpp(597): warning: function "all" /usr/local/cuda/include/device_atomic_functions.h(179): here was declared deprecated ("all() is deprecated in favor of __all_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

/home/smosesli/dynamicfusion/kfusion/src/cuda/device.hpp(54): error: identifier "__float2half_rn" is undefined

/home/smosesli/dynamicfusion/kfusion/src/cuda/device.hpp(59): error: identifier "__half2float" is undefined

/home/smosesli/dynamicfusion/kfusion/src/cuda/device.hpp(61): error: identifier "__half2float" is undefined

/home/smosesli/dynamicfusion/kfusion/src/cuda/device.hpp(54): error: identifier "__float2half_rn" is undefined

/home/smosesli/dynamicfusion/kfusion/src/cuda/device.hpp(59): error: identifier "__half2float" is undefined

/home/smosesli/dynamicfusion/kfusion/src/cuda/device.hpp(61): error: identifier "__half2float" is undefined

/home/smosesli/dynamicfusion/kfusion/src/cuda/tsdf_volume.cu(541): warning: function "all" /usr/local/cuda/include/device_atomic_functions.h(179): here was declared deprecated ("all() is deprecated in favor of __all_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

/home/smosesli/dynamicfusion/kfusion/src/cuda/tsdf_volume.cu(541): warning: function "all" /usr/local/cuda/include/device_atomic_functions.h(179): here was declared deprecated ("all() is deprecated in favor of __all_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

/home/smosesli/dynamicfusion/kfusion/src/cuda/tsdf_volume.cu(638): warning: function "ballot" /usr/local/cuda/include/sm_20_intrinsics.h(405): here was declared deprecated ("ballot() is deprecated in favor of __ballot_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

/home/smosesli/dynamicfusion/kfusion/src/cuda/tsdf_volume.cu(638): warning: function "ballot" /usr/local/cuda/include/sm_20_intrinsics.h(405): here was declared deprecated ("ballot() is deprecated in favor of __ballot_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

/home/smosesli/dynamicfusion/kfusion/src/cuda/tsdf_volume.cu(638): warning: function "ballot" /usr/local/cuda/include/sm_20_intrinsics.h(405): here was declared deprecated ("ballot() is deprecated in favor of __ballot_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

/home/smosesli/dynamicfusion/kfusion/src/cuda/temp_utils.hpp(585): warning: function "ballot" /usr/local/cuda/include/sm_20_intrinsics.h(405): here was declared deprecated ("ballot() is deprecated in favor of __ballot_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

/home/smosesli/dynamicfusion/kfusion/src/cuda/temp_utils.hpp(597): warning: function "all" /usr/local/cuda/include/device_atomic_functions.h(179): here was declared deprecated ("all() is deprecated in favor of __all_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")

/home/smosesli/dynamicfusion/kfusion/src/cuda/device.hpp(54): error: identifier "__float2half_rn" is undefined

/home/smosesli/dynamicfusion/kfusion/src/cuda/device.hpp(59): error: identifier "__half2float" is undefined

/home/smosesli/dynamicfusion/kfusion/src/cuda/device.hpp(61): error: identifier "__half2float" is undefined

/home/smosesli/dynamicfusion/kfusion/src/cuda/imgproc.cu(270): error: identifier "__float2half_rn" is undefined

3 errors detected in the compilation of "/tmp/tmpxft_00004468_00000000-9_proj_icp.compute_61.cpp1.ii". 3 errors detected in the compilation of "/tmp/tmpxft_00004467_00000000-9_tsdf_volume.compute_61.cpp1.ii". CMake Error at kfusion_generated_proj_icp.cu.o.cmake:280 (message): Error generating file /home/smosesli/dynamicfusion/kfusion/CMakeFiles/kfusion.dir/src/cuda/./kfusion_generated_proj_icp.cu.o

kfusion/CMakeFiles/kfusion.dir/build.make:642: recipe for target 'kfusion/CMakeFiles/kfusion.dir/src/cuda/kfusion_generated_proj_icp.cu.o' failed make[2]: [kfusion/CMakeFiles/kfusion.dir/src/cuda/kfusion_generated_proj_icp.cu.o] Error 1 make[2]: Waiting for unfinished jobs.... CMake Error at kfusion_generated_tsdf_volume.cu.o.cmake:280 (message): Error generating file /home/smosesli/dynamicfusion/kfusion/CMakeFiles/kfusion.dir/src/cuda/./kfusion_generated_tsdf_volume.cu.o

kfusion/CMakeFiles/kfusion.dir/build.make:935: recipe for target 'kfusion/CMakeFiles/kfusion.dir/src/cuda/kfusion_generated_tsdf_volume.cu.o' failed make[2]: *** [kfusion/CMakeFiles/kfusion.dir/src/cuda/kfusion_generated_tsdf_volume.cu.o] Error 1 4 errors detected in the compilation of "/tmp/tmpxft_0000446e_00000000-9_imgproc.compute_61.cpp1.ii". CMake Error at kfusion_generated_imgproc.cu.o.cmake:280 (message): Error generating file /home/smosesli/dynamicfusion/kfusion/CMakeFiles/kfusion.dir/src/cuda/./kfusion_generated_imgproc.cu.o

kfusion/CMakeFiles/kfusion.dir/build.make:349: recipe for target 'kfusion/CMakeFiles/kfusion.dir/src/cuda/kfusion_generated_imgproc.cu.o' failed make[2]: [kfusion/CMakeFiles/kfusion.dir/src/cuda/kfusion_generated_imgproc.cu.o] Error 1 CMakeFiles/Makefile2:116: recipe for target 'kfusion/CMakeFiles/kfusion.dir/all' failed make[1]: [kfusion/CMakeFiles/kfusion.dir/all] Error 2 Makefile:129: recipe for target 'all' failed make: *** [all] Error 2

TongQY commented 3 years ago

I have faced same problem too. Have you solve it? Thanks

StanleyYake commented 2 years ago

kinfu_remake/kfusion/src/cuda/temp_utils.hpp

if CUDACC_VER_MAJOR >= 9

include

endif

========================= list(APPEND CUDA_NVCC_FLAGS "-gencode;arch=compute_30,code=sm_30;-gencode;arch=compute_35,code=sm_35;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_70;-gencode;arch=compute_75,code=sm_75")

============================ ballot(predicate) change to ballot_sync(activemask(), predicate); all(predicate) change to __all_sync(__activemask(), predicate);