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

[feat CudaRansac] Do not use CUDA RNGs. Make number of initial points configurable #28

Merged
merged 2 commits into from
Apr 5, 2024

Conversation

true-real-michael
Copy link
Collaborator

@true-real-michael true-real-michael commented Mar 28, 2024

This PR speeds up RANSAC by eliminating the need to initialize CUDA random number generators

N Clouds   Current (s)    New (s)
10          1.272783     1.205917
20          2.316050     2.098319
30          3.237002     2.969012
50          5.064633     4.742269
80          7.821288     7.056089
100        10.663958     9.202390

The current solution generates random numbers for each voxel and each hypothesis for this voxel independently. It requires initialisation for all RNGs.

We can replace that with generating random float numbers (same for all voxels but different for each hypothesis). Then each voxel would interpret the float numbers differently, converting them into the valid point indices for the voxel.

Another positive feature is that it allows user to configure the number of initial RANSAC points via a parameter for map_leaf_points_cuda_ransac which is impossible in the current solution (only using INITIAL_POINTS_NUMBER constant).

Screenshot 2024-04-04 at 15 41 29

@true-real-michael true-real-michael self-assigned this Mar 28, 2024
@true-real-michael true-real-michael merged commit 5d4309d into main Apr 5, 2024
4 checks passed
@true-real-michael true-real-michael deleted the cuda-ransac-rng-on-host branch April 5, 2024 17:43
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

Successfully merging this pull request may close these issues.

2 participants