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

Fix compilation of CUDA/GPU modules #3576

Merged
merged 2 commits into from Jan 21, 2020

Conversation

kunaltyagi
Copy link
Member

Lack of CI. My apologies

@taketwo
Copy link
Member

taketwo commented Jan 21, 2020

Hmm, I still get:

In file included from ../gpu/kinfu/tools/evaluation.cpp:37:0:
../gpu/kinfu/tools/evaluation.h:53:15: error: ‘shared_ptr’ does not name a type; did you mean ‘char16_t’?
   using Ptr = shared_ptr<Evaluation>;
               ^~~~~~~~~~
               char16_t

and a bunch of others in gpu module.

And more surprisingly:

[1/21] Building NVCC (Device) object cuda/segmentation/CMakeFiles/pcl_cuda_segmentation.dir/src/pcl_cuda_segmentation_generated_connected_components.cu.o
FAILED: cuda/segmentation/CMakeFiles/pcl_cuda_segmentation.dir/src/pcl_cuda_segmentation_generated_connected_components.cu.o
cd /home/sergey/Workspace/Libraries/pcl/build-1-10/cuda/segmentation/CMakeFiles/pcl_cuda_segmentation.dir/src && /usr/bin/cmake -E make_directory /home/sergey/Workspace/Libraries/pcl/build-1-10/cuda/segmentation/CMakeFiles/pcl_cuda_segmentation.dir/src/. && /usr/bin/cmake -D verbose:BOOL=OFF -D build_configuration:STRING=Release -D generated_file:STRING=/home/sergey/Workspace/Libraries/pcl/build-1-10/cuda/segmentation/CMakeFiles/pcl_cuda_segmentation.dir/src/./pcl_cuda_segmentation_generated_connected_components.cu.o -D generated_cubin_file:STRING=/home/sergey/Workspace/Libraries/pcl/build-1-10/cuda/segmentation/CMakeFiles/pcl_cuda_segmentation.dir/src/./pcl_cuda_segmentation_generated_connected_components.cu.o.cubin.txt -P /home/sergey/Workspace/Libraries/pcl/build-1-10/cuda/segmentation/CMakeFiles/pcl_cuda_segmentation.dir/src/pcl_cuda_segmentation_generated_connected_components.cu.o.Release.cmake
In file included from /home/sergey/Workspace/Libraries/pcl/common/include/pcl/pcl_macros.h:75:0,
                 from /home/sergey/Workspace/Libraries/pcl/common/include/pcl/point_traits.h:45,
                 from /home/sergey/Workspace/Libraries/pcl/common/include/pcl/make_shared.h:47,
                 from /home/sergey/Workspace/Libraries/pcl/cuda/common/include/pcl/cuda/point_cloud.h:42,
                 from /home/sergey/Workspace/Libraries/pcl/cuda/segmentation/src/connected_components.cu:40:
/usr/include/eigen3/Eigen/Core:42:14: fatal error: math_functions.hpp: No such file or directory
     #include <math_functions.hpp>
              ^~~~~~~~~~~~~~~~~~~~
compilation terminated.

@taketwo
Copy link
Member

taketwo commented Jan 21, 2020

Sorry, did not notice the other PR (can we join them into one?) Still, after applying that patch I still get numerous errors in gpu module.

@kunaltyagi
Copy link
Member Author

I'll apply those changes here. I can't compile gpu kinfu. CMake doesn't recognize my openni. The docker images will really help in this regard

@kunaltyagi kunaltyagi changed the title [cuda] Header fix for compilation [cuda, gpu] Header fix for compilation Jan 21, 2020
@kunaltyagi
Copy link
Member Author

PTAL

Copy link
Member

@taketwo taketwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this solves the shared_ptr-related compiler errors for me.

The math_functions.hpp-related issues are still present. Apparently that's an Eigen issue that has been fixed. Not sure in which release though (definitely not in 3.3.4 that comes with 18.04). According to the referenced commit message, the issue appeared in CUDA 9.1. So what we may want to do is use [Ubuntu 16.04 + CUDA 9.0] image on CI to make sure we don't hit this error. But that's offtopic for this PR anyway.

@taketwo taketwo merged commit f5a73dc into PointCloudLibrary:master Jan 21, 2020
@kunaltyagi kunaltyagi deleted the cuda-fix branch January 21, 2020 19:17
@taketwo taketwo added the changelog: fix Meta-information for changelog generation label Mar 17, 2020
@taketwo taketwo changed the title [cuda, gpu] Header fix for compilation Fix compilation of CUDA/GPU modules Mar 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: fix Meta-information for changelog generation module: cuda module: gpu
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants