Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compile with cuda 10.2 #38

Open
OshriHalimi opened this issue Nov 27, 2020 · 2 comments
Open

compile with cuda 10.2 #38

OshriHalimi opened this issue Nov 27, 2020 · 2 comments

Comments

@OshriHalimi
Copy link

OshriHalimi commented Nov 27, 2020

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
Copy link

TongQY commented Jan 7, 2021

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

@StanleyYake
Copy link

kinfu_remake/kfusion/src/cuda/temp_utils.hpp
#if CUDACC_VER_MAJOR >= 9
#include <cuda_fp16.h>
#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);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants