Navigation Menu

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 illegal memory acces in CUDA Octree builder #3627

Merged
merged 3 commits into from Feb 18, 2020
Merged

Fix illegal memory acces in CUDA Octree builder #3627

merged 3 commits into from Feb 18, 2020

Conversation

ruslo
Copy link
Contributor

@ruslo ruslo commented Feb 5, 2020

Fixes: #2371

@kunaltyagi
Copy link
Member

@ruslo Thanks for the nice fix 😄

Could you add a test which can be used to test that your fix works? The test will sadly not run on the CI, but will be available for improving the code to fix the second issue that you've reported (regarding normals not being NaN)

Copy link
Contributor Author

@ruslo ruslo left a comment

Choose a reason for hiding this comment

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

Could you add a test which can be used to test that your fix works?

I've found few GPU tests here:

and added new case to test_normals.cpp.

The test will sadly not run on the CI

Yes, I've noticed that this C++ code is not tied to CMake. I did some hacks to run it on my side.

gpu/features/test/test_normals.cpp Outdated Show resolved Hide resolved
gpu/features/test/test_normals.cpp Outdated Show resolved Hide resolved
gpu/features/test/test_normals.cpp Outdated Show resolved Hide resolved
@kunaltyagi
Copy link
Member

I did some hacks to run it on my side

Such as?

@ruslo
Copy link
Contributor Author

ruslo commented Feb 6, 2020

I did some hacks to run it on my side

Such as?

It's expected that GTest is bundled, which is no longer true:

Sources are collected but not used anywhere:

I see that PCL using PCL_ADD_TEST wrapper for add_test. It can't be used
there because it needs custom tests target:

Which is created here:

Since subdirectory gpu will be processed before subdirectory test this target will not be available:

Path to tested *.pcd file is hardcoded:

Tested file office_chair_model.pcd is missing:

I found it, put it in the root folder and have to run the test from there, without using CTest.

I did some trivial tweaks to fix few places but most of the tests failing even without patch. List of tests I have to exclude:

PCL_FeaturesGPU.PrincipalCurvatures
PCL_FeaturesGPU.pfh_high_level1
PCL_FeaturesGPU.pfh_high_level2
PCL_FeaturesGPU.pfh_high_level3
PCL_FeaturesGPU.pfh_high_level4
PCL_FeaturesGPU.pfh_low_level
PCL_FeaturesGPU.pfhrgb
PCL_FeaturesGPU.ppf
PCL_FeaturesGPU.ppfrgb
PCL_FeaturesGPU.vfh1
PCL_FeaturesGPU.vfh_fill_size_component_true
PCL_FeaturesGPU.vfh_norm_bins_false
PCL_FeaturesGPU.vfh_norm_distance_true

@kunaltyagi
Copy link
Member

I'll review the points raised and see what can be done to resolve them. Thanks @ruslo for your work 😄

@kunaltyagi kunaltyagi added the needs: code review Specify why not closed/merged yet label Feb 6, 2020
@ruslo
Copy link
Contributor Author

ruslo commented Feb 6, 2020

Build.Windows Failing after 94m
Build.Windows (Windows VS2017 Build x86) Failing after 94m

I don't think the failure is related to this change. @kunaltyagi Job restart needed?

@kunaltyagi
Copy link
Member

@taketwo @SergioRAgostinho This changeset feels right to me after a dive in the octree module but I'm not confident.

Copy link
Member

@SergioRAgostinho SergioRAgostinho left a comment

Choose a reason for hiding this comment

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

Same opinion here. From my side, it's good to merge.

@kunaltyagi kunaltyagi removed the needs: code review Specify why not closed/merged yet label Feb 18, 2020
@kunaltyagi kunaltyagi merged commit 1a46b5b into PointCloudLibrary:master Feb 18, 2020
@ruslo ruslo deleted the pr.octree branch February 18, 2020 13:01
@ruslo
Copy link
Contributor Author

ruslo commented Feb 18, 2020

Fixes: #2371

Line octree_builder.cu:403 was mentioned here too:

@taketwo taketwo changed the title [CUDA] Octree builder: Check for a maximum level of Morton code Fix illegal memory acces in CUDA Octree builder Mar 18, 2020
@taketwo taketwo added the changelog: fix Meta-information for changelog generation label Mar 18, 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: gpu
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Eucliean Clustering] Illegal memory access in gpu/octree/src/cuda/octree_builder.cu:403
4 participants